Commit 2cd028f4 authored by xinzhedeai's avatar xinzhedeai

监控配置

parent 22c444b2
......@@ -64,7 +64,7 @@
<el-card class="box-card" shadow="never">
<div slot="header" class="clearfix">
<el-button type="primary" size="mini">上传文件</el-button>
<el-input v-model="query.blurry" size="small" clearable placeholder="输入名称或者描述搜索" style="width: 200px;" class="filter-item" @keyup.enter.native="crud.toQuery" />
<el-input v-model="query.blurry" size="small" clearable placeholder="查询文件分类" style="width: 200px;" class="filter-item" @keyup.enter.native="crud.toQuery" />
<date-range-picker v-model="query.createTime" class="date-item" />
<el-input v-model="query.blurry" size="small" clearable placeholder="查询文件名称" style="width: 200px;" class="filter-item" @keyup.enter.native="crud.toQuery" />
<el-button type="primary" size="mini">查询</el-button>
......@@ -72,11 +72,10 @@
<el-table ref="table" style="width: 100%;" :data="crud.data">
<el-table-column type="" width="55" />
<el-table-column prop="name" label="文件名称"/>
<el-table-column label="文件类型" prop="level" width="100" />
<el-table-column label="文件分类" prop="level" width="100" />
<el-table-column :show-overflow-tooltip="true" width="200px" prop="createTime" label="录入时间" />
<el-table-column v-if="checkPer(['admin','roles:edit','roles:del'])" label="操作" width="230px" align="center">
<template slot-scope="scope">
<el-button type="primary" size="mini">查看</el-button>
<el-button type="success" size="mini">下载</el-button>
<el-button type="danger" size="mini">删除</el-button>
</template>
......
......@@ -77,9 +77,9 @@
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="所属矿山:" prop="mine_id">
<el-form-item label="所属矿山:" prop="mineId">
<el-select
v-model="mine_id"
v-model="dialog1Data.mineId"
placeholder="请选择"
clearable
size="small"
......@@ -186,6 +186,18 @@
<!--表格-->
<el-table ref="table" v-loading="searching" :data="tableData" row-key="id">
<el-table-column
:show-overflow-tooltip="true"
prop="enterpriseName"
label="所属企业"
align="center"
/>
<el-table-column
:show-overflow-tooltip="true"
prop="mineName"
label="所属矿山"
align="center"
/>
<el-table-column
:show-overflow-tooltip="true"
prop="id"
......@@ -207,10 +219,11 @@
/>
<el-table-column
:show-overflow-tooltip="true"
prop="mineName"
label="所属矿山"
prop="channelNumber"
label="通道数量"
align="center"
/>
<el-table-column label="操作" width="300px" align="center" fixed="right">
<template slot-scope="scope">
<el-button size="mini" round @click="doEdit(scope.row, false)"
......@@ -252,7 +265,6 @@ export default {
name: "videoConfig", // 本页面名
data() {
return {
mine_id: '',
options4enterpriseIdList: [],
mineList: [],
selectedMine: {},
......@@ -283,7 +295,7 @@ export default {
dialog1Rules: {
enterpriseId: [{ required: true, message: '请选择' }],
appKey: [{ required: true, message: "请填写" }],
mine_id: [{ required: true, message: "请选择" }],
mineId: [{ required: true, message: "请选择" }],
appSecret: [{ required: true, message: "请填写" }],
},
editState: 0, // (刚打开窗口时)记录了上次窗口作用;(保存编辑时)记录了当前窗口作用; 0无 1新增 2修改 3查看
......@@ -316,9 +328,9 @@ export default {
},
methods: {
getMineTypeByMineId(mineId){
return this.mineList.find((item)=>{
return item.id = mineId
})['type']
return this.mineList.find((item)=>{
return item.id = mineId
})
},
validData(data){
return data.filter((item) => {
......@@ -326,7 +338,7 @@ export default {
}).length
},
enterpriseChange(value){
this.mine_id = ''
// this.addingData.mineId = ''
// 矿山选项卡
this.getAllMineByEnterpriseId(value)
},
......@@ -335,7 +347,7 @@ export default {
enterpriseId
}).then(response => {
this.mineList = response.body
// this.mine_id = ''
// this.dialog1Data.mineId = ''
})
},
addEmployee() {
......@@ -365,6 +377,8 @@ export default {
console.log()
this.searching = false;
this.searchResult.results = response.body.results;
this.searchResult.total = response.body.total;
})
.catch(() => {
this.searching = false;
......@@ -373,14 +387,19 @@ export default {
dialog1Submit() {
this.$refs["dialog1Form"].validate((valid) => {
if (valid) {
if(!this.mineList.length){
this.$message.warning('所属矿山与所属企业不匹配,请重新选择')
return
}
if(!!this.validData(this.dialog1Data.videoChannelList)){
this.$message.warning('通道数据存在空项,请确认')
return
}
this.dialog1Saving = true;
this.dialog1Data.mineType = this.getMineTypeByMineId(this.mine_id)
this.dialog1Data.mineId = this.mine_id
// this.mine_id = "1"; // 地下矿山
const mineInfo = this.getMineTypeByMineId(this.dialog1Data.mineId)
this.dialog1Data.mineType = mineInfo.type
this.dialog1Data.mineName = mineInfo.name
// this.dialog1Data.mineId = "1"; // 地下矿山
if (this.editState === 1) {
videoConfigApi
.add(this.dialog1Data)
......@@ -441,7 +460,7 @@ export default {
this.beforeDialog1Open();
this.editState = isEdit ? 2 : 3;
this.dialog1Data = row;
this.mine_id = row.mineId
this.dialog1Data.mineId = row.mineId
this.dialog1Editing = isEdit;
this.dialog1Show = true;
this.$refs["dialog1Form"].clearValidate();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment