调整增加底库form的样式, 国标刷新按钮增加loading
| | |
| | | <div class="tree-edit gb-refresh" v-show="!TreeDataPool.gbReadonly"> |
| | | <el-tooltip content="刷新" placement="top" popper-class="atooltip"> |
| | | <button @click="refreshGB"> |
| | | <i class="el-icon-refresh" style="font-size:16px"></i> |
| | | <i v-if="loadingGBTree" class="el-icon-loading" style="font-size:16px"></i> |
| | | <i v-else class="el-icon-refresh" style="font-size:16px"></i> |
| | | </button> |
| | | </el-tooltip> |
| | | </div> |
| | |
| | | }, |
| | | |
| | | computed: { |
| | | showTab () { |
| | | showTab() { |
| | | return true; |
| | | }, |
| | | showCam () { |
| | | showCam() { |
| | | return this.appName === "Camera" || this.appName === 'Cluster' || (this.appName === "Search" && (this.buttonAuthority.indexOf("search:camera") >= 0 || this.isAdmin)); |
| | | }, |
| | | showCluster () { |
| | | showCluster() { |
| | | return this.appName === "Cluster"; |
| | | }, |
| | | // 数据栈配置必须显示。 检索通过权限控制显示, 未安装数据栈也不显示 |
| | | showDataStack () { |
| | | showDataStack() { |
| | | if (this.appName === "DataStack") { |
| | | return true; |
| | | } |
| | |
| | | |
| | | return false; |
| | | }, |
| | | showLock () { |
| | | showLock() { |
| | | return this.edit; |
| | | }, |
| | | openeds () { |
| | | openeds() { |
| | | let arry = []; |
| | | for (let i = 0; i < this.TreeDataPool.openeds.length; i++) { |
| | | if (this.TreeDataPool.openeds[i]) { |
| | |
| | | } |
| | | return arry; |
| | | }, |
| | | isAdmin () { |
| | | isAdmin() { |
| | | if ( |
| | | sessionStorage.getItem("userInfo") && |
| | | sessionStorage.getItem("userInfo") !== "" |
| | |
| | | return false; |
| | | } |
| | | }, |
| | | data () { |
| | | data() { |
| | | return { |
| | | cameraAuth: "videoMonitor:camera", |
| | | dataStack: "videoMonitor:dataStack", |
| | |
| | | menuLoading: false |
| | | }; |
| | | }, |
| | | created () { |
| | | created() { |
| | | console.log(this.appName) |
| | | console.log(this.showCam) |
| | | if (this.showCam) { |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | searchAreaData () { |
| | | searchAreaData() { |
| | | this.TreeDataPool.fetchTreeData(); |
| | | }, |
| | | searchDataStack () { |
| | | searchDataStack() { |
| | | this.DataStackPool.fetchFiles(); |
| | | }, |
| | | searchClusterData () { |
| | | searchClusterData() { |
| | | this.TreeDataPool.fetchClusterTree(); |
| | | }, |
| | | lockSwitch () { |
| | | lockSwitch() { |
| | | this.TreeDataPool.readonly = !this.TreeDataPool.readonly; |
| | | }, |
| | | gbLockSwitch () { |
| | | gbLockSwitch() { |
| | | this.TreeDataPool.gbReadonly = !this.TreeDataPool.gbReadonly; |
| | | }, |
| | | dataStackLockSwitch () { |
| | | dataStackLockSwitch() { |
| | | this.DataStackPool.readonly = !this.DataStackPool.readonly; |
| | | }, |
| | | closeTree () { |
| | | closeTree() { |
| | | this.TreeDataPool.showTreeBox = false; |
| | | bus.$emit('refreshCompareImg') |
| | | }, |
| | | addNode (event) { |
| | | addNode(event) { |
| | | this.$refs.tree.addNode(event, { id: 0 }); |
| | | }, |
| | | addCamera (node) { |
| | | addCamera(node) { |
| | | bus.$emit("addCameraOnTree", node); |
| | | }, |
| | | addDir (node) { |
| | | addDir(node) { |
| | | bus.$emit("addDirOnTree", node); |
| | | }, |
| | | menuOpen (index) { |
| | | menuOpen(index) { |
| | | this.TreeDataPool.openeds[index] = true; |
| | | }, |
| | | menuClose (index) { |
| | | menuClose(index) { |
| | | this.TreeDataPool.openeds[index] = false; |
| | | }, |
| | | refreshGB () { |
| | | refreshGB() { |
| | | // 防止重复刷新 |
| | | if (this.loadingGBTree) { |
| | | return; |
| | |
| | | this.loadingGBTree = false; |
| | | }, 1000 * 60); |
| | | }, |
| | | querySearchAsync (type) { |
| | | querySearchAsync(type) { |
| | | clearTimeout(this.timeout); |
| | | this.timeout = setTimeout(() => { |
| | | if (type === "camera") { |
| | |
| | | } |
| | | }, 500); |
| | | }, |
| | | handleClick (event) { |
| | | handleClick(event) { |
| | | if (event.name == 'dataStack') { |
| | | this.DataStackPool.fetchFiles(); |
| | | this.DataStackPool.clean(); |
| | |
| | | this.TreeDataPool.treeActiveName = event.name |
| | | console.log("当前激活name:", this.TreeDataPool.treeActiveName) |
| | | }, |
| | | async changeEnable () { |
| | | async changeEnable() { |
| | | if (this.PollData.localVideo === 0) { |
| | | this.$notify({ |
| | | title: "失败", |
| | |
| | | console.log(res, '切换本地文件分析开关') |
| | | } |
| | | }, |
| | | getCheckedFiles () { |
| | | getCheckedFiles() { |
| | | let list1 = this.TreeDataPool.localVedioList.filter(i => { |
| | | return i.checkStatus |
| | | }) |
| | | return list1 |
| | | }, |
| | | async stopVedio (status) { |
| | | async stopVedio(status) { |
| | | // let list1 = this.getCheckedFiles(); |
| | | if (this.TreeDataPool.checkedLocalVedio.length == 0) { |
| | | this.$notify({ |
| | |
| | | console.log(res, '开启暂停参数') |
| | | } |
| | | }, |
| | | async deleteLocalFiles () { |
| | | async deleteLocalFiles() { |
| | | let list1 = this.getCheckedFiles(); |
| | | console.log(list1, '已勾选的视频') |
| | | if (list1.length == 0) { |
| | |
| | | } |
| | | }, |
| | | |
| | | refrash (current, pageSize) { |
| | | refrash(current, pageSize) { |
| | | this.TreeDataPool.localCurrentPage = current; |
| | | }, |
| | | |
| | | importCameras (area) { |
| | | importCameras(area) { |
| | | this.importAreaId = area |
| | | this.$refs["import-btn"].click() |
| | | }, |
| | | |
| | | async uploadFile (params) { |
| | | async uploadFile(params) { |
| | | const _file = params.file; |
| | | const fileReader = new FileReader(); |
| | | fileReader.onload = (ev) => { |
| | |
| | | }; |
| | | fileReader.readAsBinaryString(_file); |
| | | }, |
| | | exceed () { |
| | | exceed() { |
| | | this.$message.error("最多只能上传1个xls文件"); |
| | | }, |
| | | //删除文件 |
| | | remove () { |
| | | remove() { |
| | | |
| | | }, |
| | | newCamera () { |
| | | newCamera() { |
| | | return { |
| | | latitude: 0, |
| | | rtsp: "", |
| | |
| | | color: #606266; |
| | | } |
| | | } |
| | | .flex-box{ |
| | | .flex-box { |
| | | display: flex; |
| | | } |
| | | </style> |
| | |
| | | :model="form" |
| | | :rules="rules" |
| | | label-width="150px" |
| | | class="mt50" |
| | | class="add-base-form" |
| | | label-position="left" |
| | | > |
| | | <el-row> |
| | |
| | | required |
| | | prop="startTime" |
| | | > |
| | | <el-col :span="11" class=""> |
| | | <el-col :span="11" class> |
| | | <el-date-picker |
| | | size="small" |
| | | type="datetime" |
| | |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> --> |
| | | </el-row>--> |
| | | <el-row> |
| | | <el-col :span="6" :offset="15"> |
| | | <el-form-item style="margin-top:50px;text-align:right;" label-width="0px"> |
| | |
| | | baseObject: function (newVal, oldVal) { |
| | | this.foreverChecked = false |
| | | this.form = newVal |
| | | console.log(this.form,'baseObject') |
| | | console.log(this.form, 'baseObject') |
| | | if (!newVal.endTime || newVal.endTime === undefined || newVal.endTime === null) { |
| | | this.form.isForever = '1' |
| | | this.foreverChecked = true |
| | |
| | | tableName: this.form.tableName, |
| | | startTime: this.$moment(this.form.startTime).format('YYYY-MM-DD HH:mm:ss'), |
| | | tableType: this.form.tableType, |
| | | isForever: this.foreverChecked ? '1':'0', |
| | | isForever: this.foreverChecked ? '1' : '0', |
| | | id: this.form.id, |
| | | endTime: this.form.endTime ? this.$moment(this.form.endTime).format('YYYY-MM-DD HH:mm:ss') : '', |
| | | bwType: this.form.bwType, |
| | |
| | | tableName: this.form.tableName, |
| | | startTime: this.$moment(this.form.startTime).format('YYYY-MM-DD 00:00:00'), |
| | | tableType: this.form.tableType, |
| | | isForever: this.foreverChecked ? '1':'0', |
| | | isForever: this.foreverChecked ? '1' : '0', |
| | | id: this.form.id, |
| | | endTime: this.form.endTime ? this.$moment(this.form.endTime).format('YYYY-MM-DD 23:59:59') : '', |
| | | bwType: this.form.bwType, |
| | |
| | | }) |
| | | } |
| | | }, |
| | | onCancle(){ |
| | | onCancle() { |
| | | this.$emit('closeAdd') |
| | | }, |
| | | forever(value) { |
| | |
| | | }, |
| | | init() { |
| | | console.log('添加底库表单收到的数据', this.baseObject, this.type) |
| | | if(Object.keys(this.baseObject).length > 3){ |
| | | if (Object.keys(this.baseObject).length > 3) { |
| | | this.form = this.baseObject |
| | | if (!this.form.endTime) { |
| | | this.foreverChecked = true |
| | | } else { |
| | | this.foreverChecked = false |
| | | } |
| | | }else{ |
| | | } else { |
| | | this.$refs.baseForm.resetFields() |
| | | } |
| | | }, |
| | |
| | | } |
| | | </script> |
| | | <style lang="scss"> |
| | | .add-base-form { |
| | | margin-top: 50px; |
| | | } |
| | | .el-radio__inner { |
| | | border: 1px solid #dcdfe6; |
| | | border-radius: 100%; |
| | |
| | | line-height: 40px; |
| | | outline: none; |
| | | padding: 0 0 0 15px; |
| | | -webkit-transition: border-color .2s cubic-bezier(.645,.045,.355,1); |
| | | transition: border-color .2s cubic-bezier(.645,.045,.355,1); |
| | | -webkit-transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1); |
| | | transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1); |
| | | width: 100%; |
| | | } |
| | | .el-input--prefix .el-input__inner { |
| | | padding-left: 22px; |
| | | } |
| | | .el-input--suffix .el-input__inner { |
| | | padding-right: 0; |
| | | padding-right: 0; |
| | | } |
| | | .el-input__prefix { |
| | | position: absolute; |
| | |
| | | left: 0px; |
| | | top: 0; |
| | | text-align: center; |
| | | color: #C0C4CC; |
| | | color: #c0c4cc; |
| | | -webkit-transition: all 0.3s; |
| | | transition: all 0.3s; |
| | | } |
| | |
| | | right: -2px; |
| | | top: 0; |
| | | text-align: center; |
| | | color: #C0C4CC; |
| | | color: #c0c4cc; |
| | | -webkit-transition: all 0.3s; |
| | | transition: all 0.3s; |
| | | pointer-events: none; |