Commit 2cd028f4 authored by xinzhedeai's avatar xinzhedeai

监控配置

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