Commit d27e07b0 authored by xinzhedeai's avatar xinzhedeai

监控配置

parent 29b7995b
...@@ -167,21 +167,58 @@ ...@@ -167,21 +167,58 @@
style="width: 150px" style="width: 150px"
:disabled="editState == 3" :disabled="editState == 3"
/> />
<el-button
v-if="eIndex===dialog1Data.videoChannelList.length-1"
type="primary"
@click="addEmployee"
:disabled="editState == 3"
>新增</el-button
>
<el-button <el-button
type="danger" type="danger"
@click="deleteEmployee(index, eIndex)" @click="deleteEmployee(index, eIndex)"
v-if="eIndex < dialog1Data.videoChannelList.length-1"
:disabled="editState == 3" :disabled="editState == 3"
>删除</el-button >删除</el-button
> >
</div> </div>
<div
style="margin: 10px 0; padding-left: 30px"
>
<el-input
v-model="employeeAddObj.channel"
placeholder="通道(如:1.hd.live)"
type="text"
style="width: 150px"
:disabled="editState == 3"
/>
<el-input
v-model="employeeAddObj.id"
placeholder="萤石云ID(G67791073)"
type="text"
style="width: 150px"
:disabled="editState == 3"
/>
<el-input
v-model="employeeAddObj.name"
placeholder="名称"
type="text"
style="width: 150px"
:disabled="editState == 3"
/>
<el-input
v-model="employeeAddObj.captcha"
placeholder="验证码"
type="text"
style="width: 150px"
:disabled="editState == 3"
/>
<el-input
v-model="employeeAddObj.remark"
placeholder="备注"
type="text"
style="width: 150px"
:disabled="editState == 3"
/>
<el-button
type="primary"
@click="addEmployee"
:disabled="editState == 3"
>添加</el-button
>
</div>
</div> </div>
<div v-show="dialog1Editing" slot="footer" class="dialog-footer"> <div v-show="dialog1Editing" slot="footer" class="dialog-footer">
<el-button type="text" @click="dialog1Show = false">取消</el-button> <el-button type="text" @click="dialog1Show = false">取消</el-button>
...@@ -313,16 +350,15 @@ export default { ...@@ -313,16 +350,15 @@ export default {
appSecret: [{ required: true, message: "请填写" }], appSecret: [{ required: true, message: "请填写" }],
}, },
editState: 0, // (刚打开窗口时)记录了上次窗口作用;(保存编辑时)记录了当前窗口作用; 0无 1新增 2修改 3查看 editState: 0, // (刚打开窗口时)记录了上次窗口作用;(保存编辑时)记录了当前窗口作用; 0无 1新增 2修改 3查看
addingData: { employeeAddObj:{
videoChannelList: [
{
channel: "", channel: "",
id: "", id: "",
name: "", name: "",
remark: "", remark: "",
captcha: '' captcha: ''
}, },
], addingData: {
videoChannelList: [],
}, // 上次正在新增时的内容,下次打开dialog1窗口时记录下来 }, // 上次正在新增时的内容,下次打开dialog1窗口时记录下来
}; };
}, },
...@@ -371,13 +407,14 @@ export default { ...@@ -371,13 +407,14 @@ export default {
}, },
addEmployee() { addEmployee() {
// 添加组成员 // 添加组成员
this.dialog1Data.videoChannelList.push({ this.dialog1Data.videoChannelList.push({...this.employeeAddObj});
this.employeeAddObj = {
channel: "", channel: "",
id: "", id: "",
name: "", name: "",
remark: "", remark: "",
captcha: '' captcha: ''
}); }
}, },
deleteEmployee(index, eIndex) { deleteEmployee(index, eIndex) {
this.dialog1Data.videoChannelList.splice( this.dialog1Data.videoChannelList.splice(
...@@ -411,10 +448,15 @@ export default { ...@@ -411,10 +448,15 @@ export default {
this.$message.warning('所属矿山与所属企业不匹配,请重新选择') this.$message.warning('所属矿山与所属企业不匹配,请重新选择')
return return
} }
if(!this.dialog1Data.videoChannelList.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;
const mineInfo = this.getMineTypeByMineId(this.dialog1Data.mineId) const mineInfo = this.getMineTypeByMineId(this.dialog1Data.mineId)
this.dialog1Data.mineType = mineInfo.type this.dialog1Data.mineType = mineInfo.type
...@@ -479,15 +521,7 @@ export default { ...@@ -479,15 +521,7 @@ export default {
mineId:'', mineId:'',
appKey:'', appKey:'',
appSecret: '', appSecret: '',
videoChannelList: [ videoChannelList: [],
{
channel: "",
id: "",
name: "",
remark: "",
captcha: ''
},
],
} }
this.dialog1Show = true; this.dialog1Show = true;
this.$nextTick(() => { this.$nextTick(() => {
......
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