From 129e151f68e215ff592bb36ef52eb1ed5c15740d Mon Sep 17 00:00:00 2001
From: zhanghua <314079846@qq.com>
Date: 星期三, 16 十一月 2022 17:50:22 +0800
Subject: [PATCH] Merge branch 'master' of http://42.193.1.25:9521/r/sccg_ui
---
src/views/systemSetting/platform/portalSetting/index.vue | 2
src/views/systemSetting/platform/cockpitManage/index.vue | 7
src/utils/helper.js | 21
src/views/operate/images/updateUser/index.vue | 84 +++-
src/views/operate/video/updateInterface/index.vue | 254 ++++++-------
/dev/null | 314 ----------------
src/views/operate/images/index.vue | 27 +
src/api/operate/imageManagement.js | 4
src/http/index.js | 8
src/api/operate/videoManagement.js | 23 +
src/components/Upload/index.vue | 1
src/utils/index.js | 2
src/views/operate/video/index.vue | 378 +++++--------------
13 files changed, 354 insertions(+), 771 deletions(-)
diff --git a/src/api/operate/imageManagement.js b/src/api/operate/imageManagement.js
index efe5e09..1cecfeb 100644
--- a/src/api/operate/imageManagement.js
+++ b/src/api/operate/imageManagement.js
@@ -1,8 +1,8 @@
import http from "@/http";
export default {
- importImage: (params) => {
- return http.uploadFile('/sccg/file/medias', params);
+ importImage: (data) => {
+ return http.uploadFile('/sccg/file/medias', data);
},
getImageResources: (params) => {
diff --git a/src/api/operate/videoManagement.js b/src/api/operate/videoManagement.js
new file mode 100644
index 0000000..395a84e
--- /dev/null
+++ b/src/api/operate/videoManagement.js
@@ -0,0 +1,23 @@
+import http from "@/http";
+
+export default {
+ getVideoResources: (params) => {
+ return http.get('/sccg/video_resources/query', params);
+ },
+
+ addVideoResource: (params) => {
+ return http.post('/sccg/video_resources/addition', params);
+ },
+
+ updateVideoResource: (params) => {
+ return http.put('/sccg/video_resources/modification', params);
+ },
+
+ deleteVideoRescource: (params) => {
+ return http.delete('/sccg/video_resources/deletion', params);
+ },
+
+ deleteVideoRescources: (params) => {
+ return http.delete('/sccg/video_resources/deletion_batch', params);
+ }
+}
\ No newline at end of file
diff --git a/src/components/Upload/index.vue b/src/components/Upload/index.vue
index 2e7d00a..3bbeb74 100644
--- a/src/components/Upload/index.vue
+++ b/src/components/Upload/index.vue
@@ -23,7 +23,6 @@
},
methods: {
beforeUpload(rawFile) {
- console.log(rawFile);
if (rawFile.type !== 'image/png' && rawFile.type !== 'image/svg+xml' && rawFile.type !== 'image/jpg' && rawFile.type !== 'image/jpeg') {
this.$message.error('鍥剧墖蹇呴』鏄� jpg/svg/jpeg/png 鏍煎紡!')
return false
diff --git a/src/http/index.js b/src/http/index.js
index 53dda95..85f73d8 100644
--- a/src/http/index.js
+++ b/src/http/index.js
@@ -64,10 +64,11 @@
* @param {boolean?} throwError 鏄惁涓嶄娇鐢ㄩ粯璁ょ殑寮傚父澶勭悊鏂规硶锛岃�屾妸寮傚父鎶涘嚭鏉�
* @return {Promise} 杩斿洖涓�涓猵romise瀵硅薄銆傚叾涓璽hen鏂规硶浼犻�掑洖鍖呬腑鐨刣ata鏁版嵁锛沜atch浜嬩欢鍒欎紶閫掓暣涓洖鍖咃紝鍏跺弬鏁颁负{data:{},status{code:123,message:'xxx'}}
*/
- post(url, data = {}, throwError) {
+ post(url, data = {}, params= {}, throwError) {
const config = {
method: 'POST',
url,
+ params,
data: JSON.stringify(data),
errorHandler: (!throwError && this.defaultErrorHandler) || null,
headers: {
@@ -208,8 +209,9 @@
data: formElem instanceof FormData ? formElem : new FormData(formElem),
onUploadProgress,
errorHandler: (!throwError && this.defaultErrorHandler) || null,
- timeout: 500000,
- enableRepeat: true
+ headers: {
+ 'Content-Type': 'multipart/form-data'
+ },
})
}
}
\ No newline at end of file
diff --git a/src/utils/helper.js b/src/utils/helper.js
index e9853bc..e29e5e6 100644
--- a/src/utils/helper.js
+++ b/src/utils/helper.js
@@ -49,15 +49,15 @@
// data: 鏂囦欢, contentDisposition锛氳姹傚ご涓枃浠剁殑鍚嶅瓧
// 榛樿涓嶇敤淇敼锛岀洿鎺ュ皢杩斿洖鐨剅es浼犲叆鍗冲彲
export function downloadFile(res) {
- const blob = new Blob([res.data], { type: 'application/vnd.ms-excel' });
+ const blob = new Blob([res.data], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
const fileName = res.contentDisposition.split('=')[1];
if (window.navigator && window.navigator.msSaveBlob) {
- navigator.msSaveBlob(blob, fileName);
+ navigator.msSaveBlob(blob, `${new Date().getTime()}`);
} else {
const link = document.createElement('a');
link.style.display = 'none';
link.href = URL.createObjectURL(blob);
- link.setAttribute('download', decodeURI(fileName));
+ link.setAttribute('download', decodeURI(`${new Date().getTime()}`));
document.body.appendChild(link);
link.click();
URL.revokeObjectURL(link.href);
@@ -120,3 +120,18 @@
}
return str + '鍒嗛挓'
}
+
+export const EVENT_SOURCE = [
+ { label: '瑙嗛', value: 1 },
+ { label: '鎵嬪姩绛夌骇', value: 2 }
+]
+
+export const CATEGOTY = [
+ { label: '杩濊', value: 1 },
+ { label: '杩濆缓', value: 2 }
+]
+
+export const RESOURCE_TYPE = [
+ { label: '涓婃姤', value: '01' },
+ { label: '澶勭疆', value: '02' }
+]
diff --git a/src/utils/index.js b/src/utils/index.js
index 256fdb9..3132ba3 100644
--- a/src/utils/index.js
+++ b/src/utils/index.js
@@ -54,3 +54,5 @@
}
export const SUCCESS_CODE = 200;
+
+export const FILE_ORIGINAL_URL = 'http://140.143.152.226:8410/'
diff --git a/src/views/operate/images/index.vue b/src/views/operate/images/index.vue
index cb18b53..37708a5 100644
--- a/src/views/operate/images/index.vue
+++ b/src/views/operate/images/index.vue
@@ -42,11 +42,17 @@
</el-table-column>
<el-table-column prop="baseId" label="鎵�灞炰簨浠剁紪鍙�" min-width="18">
</el-table-column>
- <el-table-column prop="category" label="闂绫诲瀷" min-width="8">
+ <el-table-column prop="category" label="闂绫诲埆" min-width="8">
+ <template slot-scope="scope">
+ <span>{{ getCategory(scope.row.category).label }}</span>
+ </template>
</el-table-column>
- <el-table-column prop="eventSource" label="澶х被鍚嶇О" min-width="8">
+ <el-table-column prop="eventSource" label="浜嬩欢鏉ユ簮" min-width="8">
+ <template slot-scope="scope">
+ <span>{{ getEventSource(scope.row.eventSource).label }}</span>
+ </template>
</el-table-column>
- <el-table-column prop="regionName" label="灏忕被鍚嶇О" min-width="8">
+ <el-table-column prop="regionName" label="绀惧尯鍚嶇О" min-width="8">
</el-table-column>
<el-table-column prop="id" label="鍥剧墖Id" min-width="8">
</el-table-column>
@@ -100,6 +106,7 @@
<script>
import updateUser from "./updateUser";
import imageManagement from "@/api/operate/imageManagement";
+import { CATEGOTY, EVENT_SOURCE } from "@/utils/helper";
export default {
components: { updateUser },
@@ -121,7 +128,7 @@
},
data() {
- return {
+ return {
isShowUploadDialog:false,
dialogType: 'create',
originalData: null,
@@ -177,7 +184,7 @@
caseId: '',
caseCode: null,
dialogAdd: false,
- datePicked: null
+ datePicked: null,
}
},
created() {
@@ -289,7 +296,15 @@
closeDialog() {
this.isShowUploadDialog = false;
- }
+ },
+
+ getCategory(value) {
+ return CATEGOTY.find(item => item.value === value);
+ },
+
+ getEventSource(value) {
+ return EVENT_SOURCE.find(item => item.value === value);
+ }
}
}
</script>
diff --git a/src/views/operate/images/updateUser/index.vue b/src/views/operate/images/updateUser/index.vue
index ebcd0ad..7cf2e92 100644
--- a/src/views/operate/images/updateUser/index.vue
+++ b/src/views/operate/images/updateUser/index.vue
@@ -2,29 +2,35 @@
<div class="updateUser">
<main>
<div class="mainContent">
- <el-form :disabled="isDisabled" ref="user" style="width: 100%;">
+ <el-form :model="imagedata" :rules="rules" :disabled="isDisabled" ref="user" style="width: 100%;">
<el-form-item prop="baseId" label="鎵�灞炰簨浠剁紪鍙�">
<el-input v-model="imagedata.baseId"></el-input>
</el-form-item>
- <el-form-item prop="eventSource" label="澶х被鍚嶇О">
+ <el-form-item prop="eventSource" label="浜嬩欢鏉ユ簮">
<el-input v-model="imagedata.eventSource"></el-input>
</el-form-item>
- <el-form-item prop="regionName" label="灏忕被鍚嶇О">
+ <el-form-item prop="category" label="闂绫诲埆">
+ <el-input v-model="imagedata.category"></el-input>
+ </el-form-item>
+ <el-form-item prop="type" label="绫诲瀷">
+ <el-select v-model="imagedata.type">
+ <el-option v-for="item in getResourceType()" :key="item.value" :label="item.label" :value="item.value" />
+ </el-select>
+ </el-form-item>
+ <el-form-item prop="regionName" label="绀惧尯鍚嶇О">
<el-input v-model="imagedata.regionName"></el-input>
</el-form-item>
<el-form-item prop="id" label="鍥剧墖Id">
<el-input v-model="imagedata.id"></el-input>
</el-form-item>
- <el-form-item prop="createTime" label="涓婁紶鏃堕棿">
- <el-input v-model="imagedata.createTime"></el-input>
- </el-form-item>
- <el-form-item prop="eventSource" label="鍥剧墖:" min-width="8">
-<!-- <img style="width: 180px;height: 120px;" :src=imagedata.url>-->
+ <el-form-item prop="url" label="鍥剧墖:" min-width="8">
<el-upload
+ class="avatar-uploader"
action=""
+ ref="image"
:show-file-list="false"
- :on-success="handleImageSuccess"
- :before-upload="beforeImageUpload">
+ :auto-upload="true"
+ :http-request="imageUpload">
<img v-if="imagedata.url" :src="imagedata.url" class="avatar">
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
@@ -38,26 +44,47 @@
</div>
</template>
<script>
-import { deepClone } from "@/utils/helper";
+import { deepClone, RESOURCE_TYPE } from "@/utils/helper";
import imageManagement from "@/api/operate/imageManagement";
+import { FILE_ORIGINAL_URL } from "@/utils";
export default {
data() {
+ const validateImageUrl = (rule, value, callback) => {
+ if (this.imagedata.url) {
+ callback();
+ } else {
+ callback(new Error('璇蜂笂浼犲浘鐗�'));
+ }
+ };
return {
imagedata: {
- code: '',
+ baseId: '',
eventSource: '',
regionName: '',
- smallType: '',
+ category: '',
id: '',
- createTime: '',
- url: ''
+ url: '',
+ type: ''
+ },
+ rules: {
+ baseId: [{ required: true, trigger: 'blur', message: '璇疯緭鍏ユ墍灞炰簨浠剁紪鍙�' }],
+ eventSource: [{ required: true, trigger: 'blur', message: '璇疯緭鍏ヤ簨浠舵潵婧�' }],
+ regionName: [{ required: true, trigger: 'blur', message: '璇疯緭鍏ョぞ鍖哄悕绉�' }],
+ id: [{ required: true, trigger: 'blur', message: '璇疯緭鍏ュ浘鐗嘔d' }],
+ category: [{ required: true, trigger: 'blue', message: '璇疯緭鍏ラ棶棰樼被鍨�' }],
+ url: [{ required: true, validator: validateImageUrl }],
+ type: [{ required: true, trigger: ['blur', 'change'], message: '璇烽�夋嫨绫诲瀷' }]
},
isDisabled: false
}
},
+
created() {
this.imagedata = deepClone(this.originalData);
+ if (this.dialogType !== 'create') {
+ this.imagedata.url = this.imagedata.url.split(',')[0];
+ }
this.isDisabled = this.dialogType === 'view';
},
methods: {
@@ -84,12 +111,22 @@
}
})
},
- handleImageSuccess() {},
- beforeImageUpload(file) {
- imageManagement.importImage(file)
+ imageUpload(file) {
+ const formData = new FormData();
+ formData.append('file', file.file);
+ imageManagement.importImage(formData)
.then(res => {
+ this.$refs.image.clearFiles();
+ this.$set(this.imagedata, 'url', FILE_ORIGINAL_URL + res.url1);
+ this.$message.success('涓婁紶鎴愬姛');
})
- .catch(err => this.$message.error(`${err}`))
+ .catch(err => {
+ this.$message.error(`${err}`);
+ this.$refs.image.clearFiles();
+ })
+ },
+ getResourceType(value) {
+ return value ? RESOURCE_TYPE.find(item => item.value === value) : RESOURCE_TYPE;
}
},
props: {
@@ -115,13 +152,6 @@
padding: 0 55px;
background-color: #09152f;
padding-bottom: 50px;
-
- // .mainTitle {
- // color: #4b9bb7;
- // font-weight: 600;
- // line-height: 100px;
- // font-size: 14px;
- // }
.mainContent {
display: flex;
@@ -257,7 +287,7 @@
color: red;
}
-.el-input {
+.el-input, .el-select {
width: 280px !important;
}
</style>
\ No newline at end of file
diff --git a/src/views/operate/video/createInterface/index.vue b/src/views/operate/video/createInterface/index.vue
deleted file mode 100644
index d9570a9..0000000
--- a/src/views/operate/video/createInterface/index.vue
+++ /dev/null
@@ -1,456 +0,0 @@
-<template>
- <div class="createUser">
- <main>
- <div class="mainContent">
- <el-form
- ref="user"
- label-width="140px"
- autoComplete="on"
- :model="depart"
- :rules="createDepartRules"
- label-position="right"
- >
- <!-- 閮ㄩ棬鍚嶇О -->
- <el-form-item class="optionItem" label="闂绫诲瀷:" prop="departName">
- <el-input
- v-model="depart.departName"
- placeholder="璇疯緭鍏ラ棶棰樼被鍨�"
- ></el-input>
- </el-form-item>
- <!-- 涓婄骇閮ㄩ棬 -->
- <el-form-item class="optionItems" label="澶х被鍚嶇О:" prop="parentId">
- <el-select v-model="depart.parentId" placeholder="璇疯緭鍏ュぇ绫诲悕绉�">
- <el-option :value="mylabel">
- <el-tree
- ref="tree"
- :check-strictly="true"
- :data="departList"
- :props="defaultProps"
- show-checkbox
- @check-change="handleCheck"
- default-expand-all
- node-key="id"
- >
- </el-tree>
- </el-option>
- </el-select>
- </el-form-item>
- <!-- 閮ㄩ棬绫诲瀷 -->
- <el-form-item class="optionItem" label="灏忕被鍚嶇О:" prop="departType">
- <el-select v-model="depart.departType" placeholder="璇烽�夋嫨灏忕被鍚嶇О">
- <el-option
- v-for="item in departTypeList"
- :key="item.id"
- :label="item.name"
- :value="item.id"
- >
- </el-option>
- </el-select>
- </el-form-item>
- <!--娣诲姞浜哄憳 -->
- <el-form-item class="optionItem add" label="娣诲姞瑙嗛:">
- <ul class="addPerson">
- <li
- v-for="(item, index) in checkedList"
- :key="index"
- @click="setLeader(index)"
- >
- <div class="li-item">
- <div class="li-icon">
- <i
- :class="[
- 'el-icon-user-solid',
- item.leader ? 'leader' : '',
- ]"
- ></i>
- </div>
- <label
- style="font-size: 12px"
- :class="[item.leader ? 'leader' : '']"
- >{{ item.username }}</label
- >
- </div>
- </li>
- <li class="li-btn">
- <i class="el-icon-plus" @click="openUser = true"></i>
- </li>
- </ul>
- <div class="card" v-if="openUser">
- <el-card class="box-card">
- <div slot="header" class="myclear">
- <span>宸ヤ綔浜哄憳</span>
- <div @click="addUser">纭</div>
- </div>
- <div class="scrollWrap">
- <el-checkbox-group v-model="checkedUser">
- <el-checkbox
- v-for="user in userList"
- :label="user.id"
- :key="user.id"
- >
- {{ user.username}}
- </el-checkbox>
- </el-checkbox-group>
- </div>
- <div class="hidebar"></div>
- </el-card>
- </div>
- </el-form-item>
- </el-form>
- </div>
- </main>
- <footer>
- <div class="optionBtn">
- <el-button @click="handleClose">鍙栨秷</el-button>
- <el-button type="primary" class="btn submit" @click="handleUser"
- >纭畾</el-button
- >
- </div>
- </footer>
- </div>
-</template>
-<script>
-import { getTypeList } from "@/utils/helper";
-export default {
- data() {
- const validateNickname = (rule, value, callback) => {
- if (!value) {
- callback(new Error("璇峰~鍐欓儴闂ㄥ悕绉�"));
- } else {
- callback();
- }
- };
- const validatePass = (rule, value, callback) => {
- if (!value) {
- callback();
- } else {
- callback();
- }
- };
- const validatePhone = (rule, value, callback) => {
- if (!value) {
- callback();
- } else {
- callback();
- }
- };
- return {
- depart: {
- departName: "",
- parentId: "",
- departType: "",
- departDes: "",
- },
- createDepartRules: {
- departName: [
- { required: true, trigger: "blur", validator: validateNickname },
- ],
- parentId: [
- { required: false, trigger: "blur", validator: validatePass },
- ],
- departType: [
- { required: false, trigger: "blur", validator: validatePhone },
- ],
- departDes: [{ required: false, trigger: "blur" }],
- },
- userList: [],
- departList: [],
- checkedUser: [],
- checkedList: [],
- openUser: false,
- departTypeList: [],
- selectOrg: {
- orgsid: [],
- },
- mylabel: "",
- defaultProps: {
- children: "children",
- label: "departName",
- },
- };
- },
- created() {
- const that = this;
- // 鑾峰彇閮ㄩ棬鏍戝舰缁撴瀯鍥�
- this.getDepartTree();
- // 鑾峰彇鐢ㄦ埛鍒楄〃
- this.getUserList();
- // 鑾峰彇閮ㄩ棬绫诲瀷鍒楄〃
- this.getDepartTypeList();
- },
- methods: {
- handleUser() {
- this.$refs.user.validate((valid) => {
- if (valid) {
- const { depart, checkedList, selectOrg } = this;
- const arr = [];
- checkedList.forEach((item) => {
- arr.push({ leader: item.leader, userId: item.id });
- });
- this.$axios({
- method: "post",
- url: "/sccg/depart/create",
- data: {
- departName: depart.departName,
- parentId: selectOrg.orgsid[0],
- departType: depart.departType,
- departDes: depart.departDes,
- departManagerList: arr,
- },
- }).then((res) => {
- if (res.code === 200) {
- this.$message({
- message: res.message,
- type: "success",
- });
- this.refresh();
- } else if (res.code === 2001) {
- this.$message({
- message: res.message,
- type: "error",
- });
- this.refresh();
- }
- });
- } else {
- return false;
- }
- });
- },
- // 鑾峰彇閮ㄩ棬鏍戝舰缁撴瀯鍥�
- getDepartTree() {
- this.$axios({
- method: "get",
- url: "sccg/depart/tree",
- }).then((res) => {
- // console.log(res);
- // res.data.unshift({ id: 0, departName: "椤剁骇鑿滃崟" });
- this.departList = res.data;
- });
- },
- // 鑾峰彇鎵�鏈夌敤鎴蜂俊鎭�
- getUserList() {
- // 鑾峰彇鎵�鏈夌敤鎴蜂俊鎭�佺敤鎴锋煡璇�(鏆傛椂鏀寔鐢佃瘽鍙风爜)
- this.$axios.get(`/sccg/depart/query_surplus_user`).then((res) => {
- if (res.code === 200) {
- this.userList = res.data;
- }
- });
- },
- addUser() {
- this.checkedList = [];
- this.userList.forEach((item) => {
- this.checkedUser.forEach((child) => {
- if (item.id == child) {
- this.checkedList.push({
- id: item.id,
- username: item.username,
- leader: false,
- });
- }
- });
- });
- this.checkedList[0].leader = true;
- this.openUser = false;
- },
- handleClose() {
- this.$emit("changMyDialog", { flag: false });
- },
- // 鑾峰彇閮ㄩ棬绫诲瀷
- async getDepartTypeList() {
- this.departTypeList = await getTypeList(1, "08");
- },
- handleCheck(data, checked) {
- this.depart.parentId = data.departName;
- // 鑾峰彇褰撳墠閫夋嫨鐨刬d鍦ㄦ暟缁勪腑鐨勭储寮�
- const indexs = this.selectOrg.orgsid.indexOf(data.id);
- // 濡傛灉涓嶅瓨鍦ㄦ暟缁勪腑锛屽苟涓旀暟缁勪腑宸茬粡鏈変竴涓猧d骞朵笖checked涓簍rue鐨勬椂鍊欙紝浠h〃涓嶈兘鍐嶆閫夋嫨銆�
- if (indexs < 0 && this.selectOrg.orgsid.length === 1 && checked) {
- this.$message({
- message: "鍙兘閫夋嫨涓�涓儴闂紒",
- type: "warning",
- showClose: true,
- });
- // 璁剧疆宸查�夋嫨鐨勮妭鐐逛负false 寰堥噸瑕�
- this.$refs.tree.setChecked(data, false);
- } else if (this.selectOrg.orgsid.length === 0 && checked) {
- // 鍙戠幇鏁扮粍涓虹┖ 骞朵笖鏄凡閫夋嫨
- // 闃叉鏁扮粍鏈夊�硷紝棣栧厛娓呯┖锛屽啀push
- this.selectOrg.orgsid = [];
- this.selectOrg.orgsid.push(data.id);
- } else if (
- indexs >= 0 &&
- this.selectOrg.orgsid.length === 1 &&
- !checked
- ) {
- // 鍐嶆鐩存帴杩涜璧嬪�间负绌烘搷浣�
- this.selectOrg.orgsid = [];
- this.depart.parentId = "";
- }
- },
- // 璁剧疆棰嗗
- setLeader(idx) {
- this.checkedList.forEach((item, index) => {
- item.leader = index === idx;
- });
- },
- },
- props: ["refresh", "changMyDialog"],
-};
-</script>
-<style lang="scss" scoped>
-.createUser {
- border-radius: 1px;
- background-color: #09152f;
-
- main {
- text-align: left;
- padding: 0 55px;
- background-color: #09152f;
- padding-bottom: 50px;
-
- .mainContent {
- display: flex;
- justify-content: center;
- padding-top: 50px;
-
- &::v-deep .el-form-item__label {
- color: #4b9bb7;
- }
-
- &::v-deep .el-input__inner {
- background-color: #09152f;
- border: 1px solid #17324c;
- }
-
- &::v-deep .el-textarea__inner {
- background-color: #09152f;
- border: 1px solid #17324c;
- }
-
- .addPerson {
- display: flex;
- list-style: none;
- padding: 0;
- flex-wrap: wrap;
- max-width: 280px;
- li {
- color: #fff;
- text-align: center;
- font-size: 30px;
- margin-left: 10px;
- }
- }
- .li-icon {
- background-color: #cccccc;
- width: 36px;
- height: 36px;
- border-radius: 50%;
- margin: 0 auto;
- }
- .li-btn {
- background-color: #cccccc;
- width: 36px;
- height: 36px;
- border-radius: 50%;
- }
- .el-form-item__content {
- width: 400px;
-
- .el-select {
- width: 100%;
- }
- }
-
- .optionHandleSp {
- display: flex;
-
- .areaNumber,
- .moreNumber {
- flex: 1;
- }
-
- .telNumber {
- flex: 2;
- }
- }
- }
-
- .add {
- position: relative;
-
- .card {
- position: absolute;
- z-index: 2000;
- right: 0;
-
- .box-card {
- min-height: 240px;
- max-height: 260px;
- overflow: hidden;
- background-color: #09152f;
- position: relative;
- max-width: 220px;
-
- .scrollWrap {
- overflow: scroll;
- height: 180px;
- position: relative;
- color: #4b9bb7;
-
- .el-checkbox-group {
- display: flex;
- flex-direction: column;
-
- .el-checkbox {
- line-height: 20px;
- }
- }
- }
-
- .myclear {
- width: 100%;
- line-height: 20px;
- color: #4b9bb7;
- display: flex;
- justify-content: space-between;
- }
-
- .hidebar {
- position: absolute;
- top: 77px;
- right: 20px;
- width: 20px;
- height: 180px;
- background-color: #09152f;
- }
-
- .item {
- line-height: 40px;
- }
- }
- }
- }
- }
-
- .li-item {
- display: flex;
- flex-direction: column;
- }
-
- .leader {
- color: red;
- }
- .el-input {
- width: 280px !important;
- }
- footer {
- border-top: 1px solid #fff;
- height: 80px;
- display: flex;
- align-items: center;
- justify-content: flex-end;
- padding-right: 20px;
- }
-}
-</style>
\ No newline at end of file
diff --git a/src/views/operate/video/detailInterface/index.vue b/src/views/operate/video/detailInterface/index.vue
deleted file mode 100644
index 3f49033..0000000
--- a/src/views/operate/video/detailInterface/index.vue
+++ /dev/null
@@ -1,314 +0,0 @@
-<template>
- <div class="updateUser">
- <main>
- <div class="mainContent">
- <el-form ref="user" style="width: 100%;">
- <el-form-item prop="code" label="鎵�灞炰簨浠剁紪鍙�">
- <el-input v-model="imagedata.code"></el-input>
- </el-form-item>
- <el-form-item prop="code" label="澶х被鍚嶇О">
- <el-input v-model="imagedata.questionType"></el-input>
- </el-form-item>
- <el-form-item prop="code" label="灏忕被鍚嶇О">
- <el-input v-model="imagedata.bigType"></el-input>
- </el-form-item>
- <el-form-item prop="code" label="瑙嗛Id">
- <el-input v-model="imagedata.videoId"></el-input>
- </el-form-item>
- <el-form-item prop="code" label="涓婁紶鏃堕棿">
- <el-input v-model="imagedata.uploadTime"></el-input>
- </el-form-item>
- <el-form-item prop="code" label="瑙嗛锛�">
- <video id="my-video" class="video-js" controls preload="auto" width="210px" height="150px"
- :poster="imagedata.imageUrl" data-setup="{}">
- <source :src="imagedata.videoUrl" type="video/mp4" />
- </video>
- </el-form-item>
-
- <!-- <el-form-item v-if="updateFlag"> -->
- <!-- </el-form-item> -->
- </el-form>
- </div>
- </main>
- </div>
-</template>
-<script src="https://vjs.zencdn.net/7.20.3/video.min.js"></script>
-<script>
-import { getTypeList } from "@/utils/helper";
-export default {
- data() {
-
- return {
-
- imagedata: {
- code: "SJ202211010001",
- questionType: "杩濊",
- bigType: "杩濆弽鍥藉鏈夊叧鏍囧噯缂栧埗鍩庝埂瑙勫垝",
- smallType: "鍦ㄥ眳姘戜綇瀹呮ゼ銆佹湭閰嶅璁剧珛涓撶敤鐑熼亾鐨勫晢浣忕患鍚堟ゼ銆佸晢浣忕患鍚堟ゼ鍐呬笌灞呬綇灞傜浉閭荤殑鍟嗕笟妤煎眰鍐呮柊寤恒�佹敼寤恒�佹墿寤轰骇鐢熸补鐑熴�佸紓鍛炽�佸簾姘旂殑椁愰ギ鏈嶅姟椤圭洰",
- videoId: "1",
- uploadTime: "2022-10-31 20:20:01",
- imageUrl:"https://img0.baidu.com/it/u=1063261925,3306857657&fm=253&fmt=auto&app=138&f=JPEG?w=669&h=500",
- videoUrl:"http://vali-g1.cp31.ott.cibntv.net/youku/65730720cb94e7220271a3c96/0300080100632D30A3E43019FD116537F5162F-1035-48AC-BE1B-602DF0E92893.mp4?sid=166729534400010004780_00_Bda935cf9a33346c593fc27da8e694df3&sign=db39289573d143cf6e1ad8d8dff36682&ctype=50&si=183&psid=c732c4364319e7ef4685d8f1a568015941346"
- },
- }
- },
- created() {
- // const that = this;
- // this.user = JSON.parse(JSON.stringify(that.userInfo));
- // console.log(this.user);
- // this.user.parentId = this.user.parentId === 0 ? '鏆傛棤涓婄骇閮ㄩ棬' : this.user.parentId;
- // this.checkedList = this.user.userInfoDTOS;
- // this.checkedList.forEach((e) => {
- // this.checkedUser.push(e.userId);
- // });
- // console.log(this.checkedUser)
- // this.$axios({
- // method: "get",
- // url: "sccg/depart/tree",
- // }).then((res) => {
- // that.departList = res.data;
- // });
- // this.getUserList(this.user.id);
- // // 鑾峰彇閮ㄩ棬绫诲瀷
- // this.getDepartType();
- },
- methods: {
- // handleUser() {
- // this.$refs["user"].validate((valid) => {
- // if (valid) {
- // const { user, checkedList } = this;
- // const arr = [];
- // checkedList.forEach((item) => {
- // arr.push({ leader: item.leader, userId: item.id ? item.id : item.userId });
- // });
- // if (arr.length === 0) {
- // this.$message({
- // type: 'warning',
- // message: '璇烽�夋嫨閮ㄩ棬浜哄憳',
- // })
- // } else {
- // this.$axios
- // .post("sccg/depart/update", {
- // id: user.id,
- // departName: user.departName,
- // parentId: user.parentId === '鏆傛棤涓婄骇閮ㄩ棬' ? 0 : user.parentId,
- // departDes: user.departDes,
- // departManagerList: arr,
- // })
- // .then((res) => {
- // this.$message({
- // message: res.message,
- // type: res.code === 200 ? "success" : "warning",
- // });
- // this.$emit("changeDialog", { flag: false });
- // this.getDepartList();
- // });
- // }
- // } else {
- // return false;
- // }
- // });
- // },
- // // 鑾峰彇閮ㄩ棬绫诲瀷
- // async getDepartType() {
- // this.typeList = await getTypeList(1, "08");
- // },
-
- // // 璁剧疆棰嗗
- // setLeader(idx) {
- // if (this.updateFlag) {
- // this.checkedList.forEach((item, index) => {
- // item.leader = index === idx;
- // });
- // }
- // },
-
- // // 鑾峰彇鎵�鏈夌敤鎴蜂俊鎭�
- // getUserList(id) {
- // // 鑾峰彇鎵�鏈夌敤鎴蜂俊鎭�佺敤鎴锋煡璇�(鏆傛椂鏀寔鐢佃瘽鍙风爜)
- // this.$axios.get(`/sccg/depart/query_surplus_exist_user?id=`+id).then((res) => {
- // if (res.code === 200) {
- // this.userList = res.data;
- // }
- // });
- // },
- // addUser() {
- // this.checkedList = [];
- // this.userList.forEach((item) => {
- // this.checkedUser.forEach((child) => {
- // if (item.id == child) {
- // this.checkedList.push({
- // id: item.id,
- // username: item.username,
- // leader: false,
- // });
- // }
- // });
- // });
- // this.checkedList[0].leader = true;
- // console.log(this.checkedList);
- // this.openUser = false;
- // },
- // },
- // props: ["userInfo", "updateFlag", "getDepartList", "changeDialog"],
- },
- props:['updateFlag']
-};
-</script>
-<style lang="scss" scoped>
-.updateUser {
- border-radius: 1px;
- background-color: #09152f;
-
- main {
- // border: 1px solid #fff;
- text-align: left;
- padding: 0 55px;
- background-color: #09152f;
- padding-bottom: 50px;
-
- // .mainTitle {
- // color: #4b9bb7;
- // font-weight: 600;
- // line-height: 100px;
- // font-size: 14px;
- // }
-
- .mainContent {
- display: flex;
- justify-content: center;
- padding-top: 50px;
-
- .el-form-item__content {
- width: 400px;
-
- .el-select {
- width: 100%;
- }
- }
-
- .optionHandleSp {
- display: flex;
-
- .areaNumber,
- .moreNumber {
- flex: 1;
- }
-
- .telNumber {
- flex: 2;
- }
- }
-
- .optionBtn {
- display: flex;
- margin-top: 20px;
- justify-content: center;
-
- .btn {
- padding: 12px 50px;
- }
- }
- }
- }
-}
-
-.updateUser::v-deep .el-form-item__label {
- color: #4b9bb7;
-}
-
-.updateUser::v-deep .el-input__inner {
- background-color: #09152f;
- border: 1px solid #17324c;
-}
-
-.addPerson {
- display: flex;
- list-style: none;
- padding: 0;
- flex-wrap: wrap;
- max-width: 280px;
-
- li {
- color: #fff;
- text-align: center;
- font-size: 30px;
- margin-left: 10px;
- }
-}
-
-.li-icon {
- background-color: #cccccc;
- width: 36px;
- height: 36px;
- border-radius: 50%;
- margin: 0 auto;
-}
-
-.li-btn {
- background-color: #cccccc;
- width: 36px;
- height: 36px;
- border-radius: 50%;
-}
-
-.card {
- position: absolute;
- z-index: 2000;
- right: 0;
-
- .box-card {
- min-height: 240px;
- max-height: 260px;
- overflow: hidden;
- background-color: #09152f;
- position: relative;
- max-width: 220px;
-
- .scrollWrap {
- overflow: scroll;
- height: 180px;
- position: relative;
- color: #4b9bb7;
-
- .el-checkbox-group {
- display: flex;
- flex-direction: column;
-
- .el-checkbox {
- line-height: 20px;
- }
- }
- }
-
- .myclear {
- width: 100%;
- line-height: 20px;
- color: #4b9bb7;
- display: flex;
- justify-content: space-between;
- }
-
- .hidebar {
- position: absolute;
- top: 77px;
- right: 20px;
- width: 20px;
- height: 180px;
- background-color: #09152f;
- }
-
- .item {
- line-height: 40px;
- }
- }
-}
-
-.leader {
- color: red;
-}
-
-.el-input {
- width: 280px !important;
-}
-</style>
\ No newline at end of file
diff --git a/src/views/operate/video/index.vue b/src/views/operate/video/index.vue
index c0a78db..b458c79 100644
--- a/src/views/operate/video/index.vue
+++ b/src/views/operate/video/index.vue
@@ -6,22 +6,26 @@
<span>绛涢�夋潯浠�:</span>
<div class="option">
<el-input
- v-model="info.type"
+ v-model="searchContent"
placeholder="璇疯緭鍏ュ唴瀹�"
></el-input>
</div>
<span>涓婁紶鏃堕棿:</span>
<div class="option">
- <el-input
- v-model="info.startTime"
- placeholder="閫夋嫨涓婁紶鏃堕棿"
- ></el-input>
+ <el-date-picker
+ v-model="datePicked"
+ type="datetimerange"
+ value-format="yyyy-MM-dd HH:mm:ss"
+ range-separator="鑷�"
+ start-placeholder="寮�濮嬫棩鏈�"
+ end-placeholder="缁撴潫鏃ユ湡">
+ </el-date-picker>
</div>
<div class="findBtn">
- <el-button type="primary" @click="handleView(scope.row)">鏌ヨ</el-button>
+ <el-button type="primary" @click="searchVideoList">鏌ヨ</el-button>
</div>
<div class="findBtn">
- <el-button type="primary" @click="addVideo">娣诲姞瑙嗛</el-button>
+ <el-button type="primary" @click="handleOpera(null, 'create')">娣诲姞瑙嗛</el-button>
</div>
</div>
</div>
@@ -54,18 +58,24 @@
@selection-change="tableChange"
>
<el-table-column type="selection" min-width="5"> </el-table-column>
- <el-table-column prop="code" label="鎵�灞炰簨浠剁紪鍙�" min-width="18">
+ <el-table-column prop="baseId" label="鎵�灞炰簨浠剁紪鍙�" min-width="18">
</el-table-column>
- <el-table-column prop="questionType" label="闂绫诲瀷" min-width="8">
+ <el-table-column prop="category" label="闂绫诲埆" min-width="8">
+ <template slot-scope="scope">
+ <span>{{ getCategory(scope.row.category)?.label }}</span>
+ </template>
</el-table-column>
- <el-table-column prop="bigType" label="澶х被鍚嶇О" min-width="8">
+ <el-table-column prop="eventSource" label="浜嬩欢鏉ユ簮" min-width="8">
+ <template slot-scope="scope">
+ <span>{{ getEventSource(scope.row.eventSource)?.label }}</span>
+ </template>
</el-table-column>
- <el-table-column prop="smallType" label="灏忕被鍚嶇О" min-width="8">
+ <el-table-column prop="regionName" label="绀惧尯鍚嶇О" min-width="8">
</el-table-column>
- <el-table-column prop="videoId" label="瑙嗛Id" min-width="8">
+ <el-table-column prop="id" label="瑙嗛Id" min-width="8">
</el-table-column>
<el-table-column
- prop="uploadTime"
+ prop="createTime"
label="涓婁紶鏃堕棿"
min-width="15"
v-if="mystatus === 1"
@@ -74,73 +84,21 @@
<el-table-column prop="operation" label="鎿嶄綔" min-width="15">
<template slot-scope="scope">
<div class="operation">
- <span @click="handleFind(scope.row)">鏌ョ湅</span>
+ <span @click="handleOpera(scope.row, 'view')">鏌ョ湅</span>
<span class="line">|</span>
- <span @click="handleUpdate(scope.row)">淇敼</span>
+ <span @click="handleOpera(scope.row, 'update')">淇敼</span>
<span class="line">|</span>
<span @click="handleDelete(scope.row)">鍒犻櫎</span>
</div>
</template>
</el-table-column>
</el-table>
- <!-- 璇︽儏椤靛睍绀� -->
- <el-dialog
- :visible.sync="dialogView"
- width="80%"
- title="鍩虹淇℃伅(浜哄伐)"
- v-if="dialogView"
- :before-close="handleClose"
- >
- <MyDetail :info="info" v-if="mystatus == 1 ? true : false"></MyDetail>
- <MyIllDetail :info="info" v-else></MyIllDetail>
- </el-dialog>
- <!-- 涓婁紶椤甸潰 -->
- <!-- <el-dialog :visible.sync="dialogUpload" width="80%" title="涓婁紶澶勭疆缁撴灉" v-if="dialogUpload"
- :before-close="handleClose"> -->
- <!-- <uploadVio v-if="mystatus === 1" :caseId="caseId" :mycode="caseCode" @closeDialog="closeDialog"></uploadVio>
- <uploadIll v-else :caseId="caseId" :mycode="caseCode" @closeDialog="closeDialog"></uploadIll> -->
- <!-- </el-dialog> -->
- <!-- tools -->
<!-- 鏌ョ湅淇敼椤甸潰 -->
<el-dialog
- :visible.sync="dialogUpdate"
+ :visible.sync="isShowDialog"
width="40%"
- title="淇敼"
- v-if="dialogUpdate"
- :before-close="handleClose"
- >
- <updateInterface />
- <!-- :updateFlag="updateFlag"
- :userInfo="userInfo"
- :getDepartList="context === '' ? getUserList : search"
- @changeDialog="changMyDialog" -->
- </el-dialog>
- <el-dialog
- :visible.sync="dialogcheck"
- width="40%"
- title="鏌ョ湅"
- v-if="dialogcheck"
- :before-close="handleClose"
- >
- <detailInterface />
- <!-- :updateFlag="updateFlag"
- :userInfo="userInfo"
- :getDepartList="context === '' ? getUserList : search"
- @changeDialog="changMyDialog" -->
- </el-dialog>
-
- <el-dialog
- :visible.sync="dialogAdd"
- width="40%"
- title="娣诲姞"
- v-if="dialogAdd"
- :before-close="handleClose"
- >
- <createInterface />
- <!-- :updateFlag="updateFlag"
- :userInfo="userInfo"
- :getDepartList="context === '' ? getUserList : search"
- @changeDialog="changMyDialog" -->
+ :title="dialogTitle">
+ <updateInterface :isUpdate="isUpdate" :dialogData="dialogData" @closeDialog="closeDialog" />
</el-dialog>
<div class="tools">
@@ -181,8 +139,6 @@
:total="totalNum"
:page-size="pageSize"
@current-change="changeCurrentPage"
- @prev-click="handlePrev"
- @next-click="handleNext"
>
</el-pagination>
</div>
@@ -191,87 +147,21 @@
</main>
</div>
</template>
-<script src="https://vjs.zencdn.net/7.20.3/video.min.js"></script>
<script>
-import createInterface from "./createInterface";
import updateInterface from "./updateInterface";
-import detailInterface from "./detailInterface";
+import videoManagement from "@/api/operate/videoManagement";
+import { CATEGOTY, EVENT_SOURCE } from "@/utils/helper";
+
export default {
- components: {
- createInterface,
- updateInterface,
- detailInterface
- },
+ components: { updateInterface },
data() {
return {
- dialogUpdate: false,
- dialogcheck: false,
- tableData: [
- {
- code: "VID202210010001",
- questionType: "杩濊",
- bigType: "鍩庡競缁垮寲",
- smallType:
- "鎺掓斁娌圭儫鐨勯楗湇鍔′笟缁忚惀鑰呮湭瀹夎娌圭儫鍑�鍖栬鏂姐�佷笉姝e父浣跨敤娌圭儫鍑�鍖栬鏂�",
- videoId: "12010",
- uploadTime: "2022-10-31 20:20:01",
- imageUrl:"https://img0.baidu.com/it/u=1063261925,3306857657&fm=253&fmt=auto&app=138&f=JPEG?w=669&h=500",
- videoUrl:"http://vali-g1.cp31.ott.cibntv.net/youku/65730720cb94e7220271a3c96/0300080100632D30A3E43019FD116537F5162F-1035-48AC-BE1B-602DF0E92893.mp4?sid=166729534400010004780_00_Bda935cf9a33346c593fc27da8e694df3&sign=db39289573d143cf6e1ad8d8dff36682&ctype=50&si=183&psid=c732c4364319e7ef4685d8f1a568015941346"
- },
- {
- code: "VID202210010002",
- questionType: "杩濊",
- bigType: "鍩庡競缁垮寲",
- smallType:
- "鎺掓斁娌圭儫鐨勯楗湇鍔′笟缁忚惀鑰呮湭瀹夎娌圭儫鍑�鍖栬鏂姐�佷笉姝e父浣跨敤娌圭儫鍑�鍖栬鏂�",
- videoId: "12010",
- uploadTime: "2022-10-31 20:20:01",
- imageUrl:"https://img0.baidu.com/it/u=1063261925,3306857657&fm=253&fmt=auto&app=138&f=JPEG?w=669&h=500",
- videoUrl:"http://vali-g1.cp31.ott.cibntv.net/youku/65730720cb94e7220271a3c96/0300080100632D30A3E43019FD116537F5162F-1035-48AC-BE1B-602DF0E92893.mp4?sid=166729534400010004780_00_Bda935cf9a33346c593fc27da8e694df3&sign=db39289573d143cf6e1ad8d8dff36682&ctype=50&si=183&psid=c732c4364319e7ef4685d8f1a568015941346"
- }
- ,
- {
- code: "VID202210010003",
- questionType: "杩濊",
- bigType: "鍩庡競缁垮寲",
- smallType:
- "鎺掓斁娌圭儫鐨勯楗湇鍔′笟缁忚惀鑰呮湭瀹夎娌圭儫鍑�鍖栬鏂姐�佷笉姝e父浣跨敤娌圭儫鍑�鍖栬鏂�",
- videoId: "12010",
- uploadTime: "2022-10-31 20:20:01",
- imageUrl:"https://img0.baidu.com/it/u=1063261925,3306857657&fm=253&fmt=auto&app=138&f=JPEG?w=669&h=500",
- videoUrl:"http://vali-g1.cp31.ott.cibntv.net/youku/65730720cb94e7220271a3c96/0300080100632D30A3E43019FD116537F5162F-1035-48AC-BE1B-602DF0E92893.mp4?sid=166729534400010004780_00_Bda935cf9a33346c593fc27da8e694df3&sign=db39289573d143cf6e1ad8d8dff36682&ctype=50&si=183&psid=c732c4364319e7ef4685d8f1a568015941346"
- }
- ,
- {
- code: "VID202210010004",
- questionType: "杩濊",
- bigType: "鍩庡競缁垮寲",
- smallType:
- "鎺掓斁娌圭儫鐨勯楗湇鍔′笟缁忚惀鑰呮湭瀹夎娌圭儫鍑�鍖栬鏂姐�佷笉姝e父浣跨敤娌圭儫鍑�鍖栬鏂�",
- videoId: "12010",
- uploadTime: "2022-10-31 20:20:01",
- imageUrl:"https://img0.baidu.com/it/u=1063261925,3306857657&fm=253&fmt=auto&app=138&f=JPEG?w=669&h=500",
- videoUrl:"http://vali-g1.cp31.ott.cibntv.net/youku/65730720cb94e7220271a3c96/0300080100632D30A3E43019FD116537F5162F-1035-48AC-BE1B-602DF0E92893.mp4?sid=166729534400010004780_00_Bda935cf9a33346c593fc27da8e694df3&sign=db39289573d143cf6e1ad8d8dff36682&ctype=50&si=183&psid=c732c4364319e7ef4685d8f1a568015941346"
- }
- ,
- {
- code: "VID202210010005",
- questionType: "杩濊",
- bigType: "鍩庡競缁垮寲",
- smallType:
- "鎺掓斁娌圭儫鐨勯楗湇鍔′笟缁忚惀鑰呮湭瀹夎娌圭儫鍑�鍖栬鏂姐�佷笉姝e父浣跨敤娌圭儫鍑�鍖栬鏂�",
- videoId: "12010",
- uploadTime: "2022-10-31 20:20:01",
- imageUrl:"https://img0.baidu.com/it/u=1063261925,3306857657&fm=253&fmt=auto&app=138&f=JPEG?w=669&h=500",
- videoUrl:"http://vali-g1.cp31.ott.cibntv.net/youku/65730720cb94e7220271a3c96/0300080100632D30A3E43019FD116537F5162F-1035-48AC-BE1B-602DF0E92893.mp4?sid=166729534400010004780_00_Bda935cf9a33346c593fc27da8e694df3&sign=db39289573d143cf6e1ad8d8dff36682&ctype=50&si=183&psid=c732c4364319e7ef4685d8f1a568015941346"
- }
- ],
- context: "",
- dialogUpload: false,
- // dialogUpdate: false,
- dialogView: false,
- updateFlag: false,
- userInfo: {},
+ isShowDialog: false,
+ searchContent: '',
+ datePicked: null,
+ tableData: [],
+ isUpdate: false,
+ dialogData: null,
info: {},
totalNum: 5,
pageSize: 10,
@@ -314,55 +204,49 @@
],
statusArr: [],
mystatus: 1,
- caseId: "",
- caseCode: null,
- dialogAdd: false,
};
+ },
+ computed: {
+ dialogTitle() {
+ if (this.isUpdate && this.dialogData) {
+ return '鏇存柊';
+ }
+ if (this.isUpdate && !this.dialogData) {
+ return '鍒涘缓';
+ }
+ if (!this.isUpdate) {
+ return '鏌ョ湅';
+ }
+ }
},
created() {
this.statusArr[0] = 6;
+ this.searchVideoList();
this.typeList.forEach((item) => {
if (item.checked) {
this.statusArr[1] = item.value;
}
});
- this.getUserList();
},
methods: {
- //淇敼
- handleUpdate() {
- this.dialogUpdate = true;
- },
- // 鏌ョ湅
- handleFind(data) {
- console.log(data);
- this.userInfo = data;
- this.dialogcheck = true;
- },
// 椤堕儴涓嬫媺妗�
setMystatus(value) {
- console.log(value);
this.statusArr[1] = value;
this.changeTypeChecked(value - 1);
- this.getUserList();
},
// 鎵归噺鍒犻櫎
mulDelete(idArr) {
- console.log(idArr);
- this.$axios({
- method: "delete",
- url: "sccg/violations/batch_delete?ids=" + idArr,
- }).then((res) => {
- this.getUserList();
- this.$message({
- message: res.message,
- type: res.code === 200 ? "success" : "warning",
- });
- });
+ videoManagement.deleteVideoRescources({ ids: idArr })
+ .then(() => {
+ this.$message.success('鎿嶄綔鎴愬姛');
+ this.searchVideoList();
+ })
+ .catch(err => {
+ this.$message.error(`${err}`);
+ })
},
// 鎵ц涓嬫媺妗嗘搷浣�
selectChange(list) {
- console.log(this.tempList);
if (this.tempList.length !== 0) {
if (list === 3) {
this.preMyIdx = list;
@@ -382,11 +266,7 @@
list.forEach((item) => {
this.tempList.push(item.code);
});
- if (list.length === this.tableData.length) {
- this.all = true;
- } else {
- this.all = false;
- }
+ this.all = list.length === this.tableData.length;
},
// 鍏ㄩ��
selectAll() {
@@ -399,129 +279,81 @@
});
},
// 鍒犻櫎鍗曟潯鏁版嵁
- handleDelete({ number }) {
- console.log(number);
+ handleDelete({ id }) {
this.$confirm("纭鍒犻櫎锛�")
- .then((_) => {
- console.log(1);
- this.$axios({
- method: "delete",
- url: `sccg/violations/delete?id=${number}`,
- }).then((res) => {
- this.$message({
- type: res.code === 200 ? "success" : "warning",
- message: res.message,
- });
-
- this.getUserList();
- });
+ .then(() => {
+ videoManagement.deleteVideoRescource({ id })
+ .then(() => {
+ this.$message.success('鎿嶄綔鎴愬姛');
+ this.searchVideoList();
+ })
+ .catch(err => {
+ this.$message.error(`${err}`);
+ })
})
- .catch((_) => {
- console.log(2);
- });
},
- // 鑾峰彇鐢ㄦ埛鍒楄〃
- getUserList() {
- const { currentPage, pageSize, context, statusArr } = this;
- // this.$axios({
- // method: 'get',
- // url: `sccg/base_case/query?state=${statusArr[0]}¤t=${currentPage}&size=${pageSize}&resource=2&type=${statusArr[1]}`
- // }).then(res => {
- // this.totalNum = res.data.total;
- // this.tableData = res.data.records;
- // console.log(res);
- // })
+ searchVideoList() {
+ const startTime = this.datePicked ? this.datePicked[0] : null;
+ const endTime = this.datePicked ? this.datePicked[1] : null;
+ videoManagement.getVideoResources({ current: this.currentPage, size: this.pageSize,
+ type: this.searchContent, startTime, endTime })
+ .then(res => {
+ this.tableData = res.records;
+ this.totalNum = res.total;
+ })
+ .catch(err => this.$message.error(`${err}`))
},
// 鏇存敼杩濊/杩濆缓
changeTypeChecked(idx) {
this.typeList.forEach((item, index) => {
- if (index === idx) {
- item.checked = true;
- } else {
- item.checked = false;
- }
+ item.checked = index === idx;
});
this.mystatus = idx + 1;
- console.log(this.mystatus);
this.statusArr[1] = this.typeList[idx].value;
- this.getUserList();
},
// 璁剧疆琛ㄦ牸鏂戦┈绾�
tableRowClassName({ row, rowIndex }) {
- if ((rowIndex + 1) % 2 == 0) {
+ if ((rowIndex + 1) % 2 === 0) {
return "warning-row";
} else {
return "success-row";
}
- return "";
},
// 褰撳墠椤垫敼鍙樿Е鍙戜簨浠�
changeCurrentPage(page) {
this.currentPage = page;
- this.getUserList();
+ this.searchVideoList();
},
- // 涓婁竴椤电偣鍑讳簨浠�
- handlePrev(page) {
- this.currentPage = page;
- this.getUserList();
+
+ handleOpera(data, type) {
+ this.isShowDialog = true;
+ this.isUpdate = type !== 'view';
+ this.dialogData = data;
},
- // 涓嬩竴椤电偣鍑讳簨浠�
- handleNext(page) {
- this.currentPage = page;
- this.getUserList();
- },
- addVideo() {
- this.dialogAdd = true;
- },
+
handleClose(done) {
this.$confirm("纭鍏抽棴锛�")
- .then((_) => {
- this.dialogUpload = false;
- // this.dialogUpdate = false;
+ .then(() => {
done();
})
- .catch((_) => {});
- },
- handleClose(done) {
- this.$confirm("纭鍏抽棴锛�")
- .then((_) => {
- this.dialogUpload = false;
- // this.dialogUpdate = false;
- done();
- })
- .catch((_) => {});
- },
- async JumpView(data) {
- await this.getEventInfo(data.code);
- },
- // 鑾峰彇妗堜欢淇℃伅
- async getEventInfo(code) {
- await this.$axios({
- method: "get",
- url: `sccg/base_case/baseCaseDetail/${code}`,
- }).then((res) => {
- this.info = res.data;
- this.dialogView = true;
- });
- },
- opernDialog(data) {
- this.dialogUpload = true;
- this.caseId = data.id;
- this.caseCode = data.code;
- // console.log(data);
},
// 鍏抽棴涓婁紶鐣岄潰
- closeDialog({ flag }) {
- this.dialogUpload = flag;
- this.getUserList();
+ closeDialog() {
+ this.isShowDialog = false;
+ this.searchVideoList();
},
- // 澶勭悊鏃堕棿
- filterTime(time) {
- return helper(time);
+
+ getCategory(value) {
+ return CATEGOTY.find(item => item.value === value);
},
+
+ getEventSource(value) {
+ return EVENT_SOURCE.find(item => item.value === value);
+ }
},
};
</script>
+
<style lang="scss" scoped>
.userList {
text-align: left;
@@ -530,7 +362,6 @@
header {
background-color: #09152f;
- border: 1pox solid #fff;
.headerContent {
padding: 0 40px;
@@ -589,7 +420,6 @@
background-color: #09152f;
margin-top: 20px;
padding-bottom: 50px;
- border: 1pox solid #fff;
.btn span:hover {
cursor: pointer;
@@ -708,5 +538,9 @@
.line {
padding: 0 5px;
}
+
+ :deep(.el-range-input) {
+ background-color: #09152f;
+ }
}
</style>
\ No newline at end of file
diff --git a/src/views/operate/video/updateInterface/index.vue b/src/views/operate/video/updateInterface/index.vue
index 63f233f..438d666 100644
--- a/src/views/operate/video/updateInterface/index.vue
+++ b/src/views/operate/video/updateInterface/index.vue
@@ -2,160 +2,143 @@
<div class="updateUser">
<main>
<div class="mainContent">
- <el-form ref="user" style="width: 100%;">
- <el-form-item prop="code" label="鎵�灞炰簨浠剁紪鍙�">
- <el-input v-model="imagedata.code"></el-input>
+ <el-form :model="videoData" :rules="rules" :disabled="isDisabled" ref="user" style="width: 100%;">
+ <el-form-item prop="baseId" label="鎵�灞炰簨浠剁紪鍙�">
+ <el-input v-model="videoData.baseId"></el-input>
</el-form-item>
- <el-form-item prop="code" label="澶х被鍚嶇О">
- <el-input v-model="imagedata.questionType"></el-input>
+ <el-form-item prop="eventSource" label="浜嬩欢鏉ユ簮">
+ <el-input v-model="videoData.eventSource"></el-input>
</el-form-item>
- <el-form-item prop="code" label="灏忕被鍚嶇О">
- <el-input v-model="imagedata.bigType"></el-input>
+ <el-form-item prop="category" label="闂绫诲埆">
+ <el-input v-model="videoData.category"></el-input>
</el-form-item>
- <el-form-item prop="code" label="瑙嗛Id">
- <el-input v-model="imagedata.videoId"></el-input>
+ <el-form-item prop="type" label="绫诲瀷">
+ <el-select v-model="videoData.type">
+ <el-option v-for="item in getResourceType()" :key="item.value" :label="item.label" :value="item.value" />
+ </el-select>
</el-form-item>
- <el-form-item prop="code" label="涓婁紶鏃堕棿">
- <el-input v-model="imagedata.uploadTime"></el-input>
+ <el-form-item prop="regionName" label="绀惧尯鍚嶇О">
+ <el-input v-model="videoData.regionName"></el-input>
</el-form-item>
- <el-form-item prop="code" label="瑙嗛锛�">
- <video id="my-video" class="video-js" controls preload="auto" width="210px" height="150px"
- :poster="imagedata.imageUrl" data-setup="{}">
- <source :src="imagedata.videoUrl" type="video/mp4" />
- </video>
+ <el-form-item prop="id" label="瑙嗛Id">
+ <el-input v-model="videoData.id"></el-input>
</el-form-item>
- <!-- <el-form-item v-if="updateFlag"> -->
- <div class="optionBtn">
- <el-button type="primary" class="btn submit" @click.native.prevent="handleUser">鎻愪氦
- </el-button>
+ <el-form-item prop="url" label="瑙嗛" min-width="8">
+ <el-upload
+ class="avatar-uploader"
+ action=""
+ ref="image"
+ :show-file-list="false"
+ :auto-upload="true"
+ :http-request="videoUpload">
+ <video controls v-if="videoData.url" :src="videoData.url" />
+ <i v-else class="el-icon-plus avatar-uploader-icon"></i>
+ </el-upload>
+ </el-form-item>
+ <div v-if="!isDisabled" class="optionBtn">
+ <el-button type="primary" class="btn submit" @click.native.prevent="onSubmit">鎻愪氦</el-button>
</div>
- <!-- </el-form-item> -->
</el-form>
</div>
</main>
</div>
</template>
-<script src="https://vjs.zencdn.net/7.20.3/video.min.js"></script>
<script>
-import { getTypeList } from "@/utils/helper";
+import { deepClone, RESOURCE_TYPE } from "@/utils/helper";
+import videoManagement from "@/api/operate/videoManagement";
+import { FILE_ORIGINAL_URL } from "@/utils";
+import imageManagement from "@/api/operate/imageManagement";
+
+
export default {
data() {
-
+ const validateVideoUrl = (rule, value, callback) => {
+ if (this.videoData.url) {
+ callback();
+ } else {
+ callback(new Error('璇蜂笂浼犺棰�'));
+ }
+ };
return {
-
- imagedata: {
- code: "SJ202211010001",
- questionType: "杩濊",
- bigType: "杩濆弽鍥藉鏈夊叧鏍囧噯缂栧埗鍩庝埂瑙勫垝",
- smallType: "鍦ㄥ眳姘戜綇瀹呮ゼ銆佹湭閰嶅璁剧珛涓撶敤鐑熼亾鐨勫晢浣忕患鍚堟ゼ銆佸晢浣忕患鍚堟ゼ鍐呬笌灞呬綇灞傜浉閭荤殑鍟嗕笟妤煎眰鍐呮柊寤恒�佹敼寤恒�佹墿寤轰骇鐢熸补鐑熴�佸紓鍛炽�佸簾姘旂殑椁愰ギ鏈嶅姟椤圭洰",
- videoId: "1",
- uploadTime: "2022-10-31 20:20:01",
- imageUrl:"https://img0.baidu.com/it/u=1063261925,3306857657&fm=253&fmt=auto&app=138&f=JPEG?w=669&h=500",
- videoUrl:"http://vali-g1.cp31.ott.cibntv.net/youku/65730720cb94e7220271a3c96/0300080100632D30A3E43019FD116537F5162F-1035-48AC-BE1B-602DF0E92893.mp4?sid=166729534400010004780_00_Bda935cf9a33346c593fc27da8e694df3&sign=db39289573d143cf6e1ad8d8dff36682&ctype=50&si=183&psid=c732c4364319e7ef4685d8f1a568015941346"
+ videoData: {
+ baseId: '',
+ eventSource: '',
+ regionName: '',
+ category: '',
+ id: '',
+ url: '',
+ type: ''
},
+ rules: {
+ baseId: [{ required: true, trigger: 'blur', message: '璇疯緭鍏ユ墍灞炰簨浠剁紪鍙�' }],
+ eventSource: [{ required: true, trigger: 'blur', message: '璇疯緭鍏ヤ簨浠舵潵婧�' }],
+ regionName: [{ required: true, trigger: 'blur', message: '璇疯緭鍏ョぞ鍖哄悕绉�' }],
+ id: [{ required: true, trigger: 'blur', message: '璇疯緭鍏ュ浘鐗嘔d' }],
+ category: [{ required: true, trigger: 'blue', message: '璇疯緭鍏ラ棶棰樼被鍨�' }],
+ url: [{ required: true, validator: validateVideoUrl }],
+ type: [{ required: true, trigger: ['blur', 'change'], message: '璇烽�夋嫨绫诲瀷' }]
+ },
+ isDisabled: false
}
},
+
created() {
- // const that = this;
- // this.user = JSON.parse(JSON.stringify(that.userInfo));
- // console.log(this.user);
- // this.user.parentId = this.user.parentId === 0 ? '鏆傛棤涓婄骇閮ㄩ棬' : this.user.parentId;
- // this.checkedList = this.user.userInfoDTOS;
- // this.checkedList.forEach((e) => {
- // this.checkedUser.push(e.userId);
- // });
- // console.log(this.checkedUser)
- // this.$axios({
- // method: "get",
- // url: "sccg/depart/tree",
- // }).then((res) => {
- // that.departList = res.data;
- // });
- // this.getUserList(this.user.id);
- // // 鑾峰彇閮ㄩ棬绫诲瀷
- // this.getDepartType();
+ this.videoData = deepClone(this.dialogData);
+ this.videoData.url = this.videoData.url ? this.videoData.url.split(',')[0] : '';
+ this.isDisabled = !this.isUpdate;
},
methods: {
- // handleUser() {
- // this.$refs["user"].validate((valid) => {
- // if (valid) {
- // const { user, checkedList } = this;
- // const arr = [];
- // checkedList.forEach((item) => {
- // arr.push({ leader: item.leader, userId: item.id ? item.id : item.userId });
- // });
- // if (arr.length === 0) {
- // this.$message({
- // type: 'warning',
- // message: '璇烽�夋嫨閮ㄩ棬浜哄憳',
- // })
- // } else {
- // this.$axios
- // .post("sccg/depart/update", {
- // id: user.id,
- // departName: user.departName,
- // parentId: user.parentId === '鏆傛棤涓婄骇閮ㄩ棬' ? 0 : user.parentId,
- // departDes: user.departDes,
- // departManagerList: arr,
- // })
- // .then((res) => {
- // this.$message({
- // message: res.message,
- // type: res.code === 200 ? "success" : "warning",
- // });
- // this.$emit("changeDialog", { flag: false });
- // this.getDepartList();
- // });
- // }
- // } else {
- // return false;
- // }
- // });
- // },
- // // 鑾峰彇閮ㄩ棬绫诲瀷
- // async getDepartType() {
- // this.typeList = await getTypeList(1, "08");
- // },
-
- // // 璁剧疆棰嗗
- // setLeader(idx) {
- // if (this.updateFlag) {
- // this.checkedList.forEach((item, index) => {
- // item.leader = index === idx;
- // });
- // }
- // },
-
- // // 鑾峰彇鎵�鏈夌敤鎴蜂俊鎭�
- // getUserList(id) {
- // // 鑾峰彇鎵�鏈夌敤鎴蜂俊鎭�佺敤鎴锋煡璇�(鏆傛椂鏀寔鐢佃瘽鍙风爜)
- // this.$axios.get(`/sccg/depart/query_surplus_exist_user?id=`+id).then((res) => {
- // if (res.code === 200) {
- // this.userList = res.data;
- // }
- // });
- // },
- // addUser() {
- // this.checkedList = [];
- // this.userList.forEach((item) => {
- // this.checkedUser.forEach((child) => {
- // if (item.id == child) {
- // this.checkedList.push({
- // id: item.id,
- // username: item.username,
- // leader: false,
- // });
- // }
- // });
- // });
- // this.checkedList[0].leader = true;
- // console.log(this.checkedList);
- // this.openUser = false;
- // },
- // },
- // props: ["userInfo", "updateFlag", "getDepartList", "changeDialog"],
+ onSubmit() {
+ this.$refs.user.validate(valid => {
+ if (valid) {
+ if (this.isUpdate && !this.dialogData) {
+ videoManagement.addVideoResource(this.videoData)
+ .then(() => {
+ this.$message.success('鎿嶄綔鎴愬姛');
+ this.$emit('closeDialog');
+ })
+ .catch(err => this.$message.error(`${err}`))
+ } else {
+ videoManagement.updateVideoResource(this.videoData)
+ .then(() => {
+ this.$message.success('鎿嶄綔鎴愬姛');
+ this.$emit('closeDialog');
+ })
+ .catch(err => this.$message.error(`${err}`))
+ }
+ } else {
+ this.$message.warning('璇锋鏌ュ繀濉」');
+ }
+ })
+ },
+ videoUpload(file) {
+ const formData = new FormData();
+ formData.append('file', file.file);
+ imageManagement.importImage(formData)
+ .then(res => {
+ this.$refs.image.clearFiles();
+ this.$set(this.videoData, 'url', FILE_ORIGINAL_URL + res.url1);
+ this.$message.success('涓婁紶鎴愬姛');
+ })
+ .catch(err => {
+ this.$message.error(`${err}`);
+ this.$refs.image.clearFiles();
+ })
+ },
+ getResourceType(value) {
+ return value ? RESOURCE_TYPE.find(item => item.value === value) : RESOURCE_TYPE;
+ }
},
- props: ['updateFlag']
+ props: {
+ dialogData: {
+ type: Object,
+ default: () => null
+ },
+ isUpdate: {
+ type: Boolean,
+ default: () => false
+ }
+ }
};
</script>
<style lang="scss" scoped>
@@ -169,13 +152,6 @@
padding: 0 55px;
background-color: #09152f;
padding-bottom: 50px;
-
- // .mainTitle {
- // color: #4b9bb7;
- // font-weight: 600;
- // line-height: 100px;
- // font-size: 14px;
- // }
.mainContent {
display: flex;
@@ -311,7 +287,7 @@
color: red;
}
-.el-input {
+.el-input, .el-select {
width: 280px !important;
}
</style>
\ No newline at end of file
diff --git a/src/views/systemSetting/platform/cockpitManage/index.vue b/src/views/systemSetting/platform/cockpitManage/index.vue
index 0a1d317..331f1ca 100644
--- a/src/views/systemSetting/platform/cockpitManage/index.vue
+++ b/src/views/systemSetting/platform/cockpitManage/index.vue
@@ -30,7 +30,6 @@
:http-request="importTable"
:show-file-list="false"
:auto-upload="true"
- multiple
:limit="1">
<el-button type="primary">瀵煎叆</el-button>
</el-upload>
@@ -162,6 +161,7 @@
unsame: false,
myIdx: 0,
preMyIdx: 0,
+ file: null,
options: [
{
value: 0,
@@ -246,7 +246,9 @@
// 瀵煎叆
importTable(file) {
- importTeamInfo(file.file)
+ const formData = new FormData();
+ formData.append('file', file.file);
+ importTeamInfo(formData)
.then(() => {
this.$message({ type: 'success', message: '鎿嶄綔鎴愬姛' });
this.getDepartmentList();
@@ -254,6 +256,7 @@
})
.catch(err => {
this.$message({ type: 'error', message: err });
+ this.$refs.uploadFile.clearFiles();
});
},
diff --git a/src/views/systemSetting/platform/portalSetting/index.vue b/src/views/systemSetting/platform/portalSetting/index.vue
index 5d2da31..4157562 100644
--- a/src/views/systemSetting/platform/portalSetting/index.vue
+++ b/src/views/systemSetting/platform/portalSetting/index.vue
@@ -134,7 +134,6 @@
})
}
} else {
- console.log(obj);
// 鍙戦�佽姹�
this.$axios({
method: 'put',
@@ -147,7 +146,6 @@
})
})
}
- localStorage.removeItem('pic');
window.location.href = '';
}
--
Gitblit v1.8.0