|
|
@@ -9,7 +9,7 @@
|
|
|
<div class="textTitle">调阅记录</div>
|
|
|
</van-col>
|
|
|
<van-col span="24">
|
|
|
- <div class="text">{{videoChannelName}}</div>
|
|
|
+ <div class="text">{{ videoChannelName }}</div>
|
|
|
</van-col>
|
|
|
</van-row>
|
|
|
<!-- //主体内容 -->
|
|
|
@@ -22,18 +22,23 @@
|
|
|
<div class="mainItem">
|
|
|
<van-row class="rowItem" v-for="item in dataList" :key="item.id">
|
|
|
<van-col class="itemCls" span="10"
|
|
|
- ><van-checkbox v-model="item.isChecked" @change="checkedFc($event, item)" :disabled="disabled" icon-size="16px" shape="square">{{
|
|
|
- item.dictLabel
|
|
|
- }}</van-checkbox>
|
|
|
+ style="display: flex;"
|
|
|
+ ><van-checkbox
|
|
|
+ v-model="item.isChecked"
|
|
|
+ @change="checkedFc($event, item)"
|
|
|
+ :disabled="disabled"
|
|
|
+ icon-size="16px"
|
|
|
+ shape="square"
|
|
|
+ >
|
|
|
+ </van-checkbox>
|
|
|
+ <span @click.stop="textTitleHandler(item.remark)" class="info">{{ item.dictLabel }}</span>
|
|
|
</van-col>
|
|
|
<van-radio-group v-model="item.situation" @change="checkHandler($event, item)">
|
|
|
<van-col class="itemCls" span="7" v-for="itemDict in dictList" :key="itemDict.dictValue">
|
|
|
- <van-radio icon-size="16px" :name="itemDict.dictValue">{{
|
|
|
- itemDict.dictLabel
|
|
|
- }}</van-radio></van-col
|
|
|
+ <van-radio icon-size="16px" :name="itemDict.dictValue">{{ itemDict.dictLabel }}</van-radio></van-col
|
|
|
>
|
|
|
</van-radio-group>
|
|
|
-
|
|
|
+
|
|
|
<van-col span="24" v-if="item.situation == '1'">
|
|
|
<van-field
|
|
|
v-model="item.abnormalIllustrate"
|
|
|
@@ -69,13 +74,8 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
-import {
|
|
|
-
|
|
|
- updateInfo,
|
|
|
- getEditInfo,
|
|
|
-
|
|
|
-} from '@/api/toConsult.js'
|
|
|
-import { Toast } from 'vant'
|
|
|
+import { updateInfo, getEditInfo } from '@/api/toConsult.js'
|
|
|
+import { Toast, Dialog } from 'vant'
|
|
|
|
|
|
export default {
|
|
|
name: 'SocAppTaskInfo',
|
|
|
@@ -115,7 +115,6 @@ export default {
|
|
|
this.$set(item, 'situation', '') //异常情况初始化默认值
|
|
|
this.$set(item, 'isChecked', false) //选中初始值
|
|
|
this.$set(item, 'abnormalIllustrate', '') //情况说明初始化默认值
|
|
|
-
|
|
|
})
|
|
|
//获取异常情况字典
|
|
|
this.getDictHandler('core_check_type', res => {
|
|
|
@@ -130,44 +129,39 @@ export default {
|
|
|
},
|
|
|
//复选框选中变化
|
|
|
checkHandler(val, item) {
|
|
|
- if(val){
|
|
|
- item.isChecked=true
|
|
|
+ if (val) {
|
|
|
+ item.isChecked = true
|
|
|
}
|
|
|
- if (val&&item.situation=='0') {
|
|
|
+ if (val && item.situation == '0') {
|
|
|
item.abnormalIllustrate = ''
|
|
|
}
|
|
|
},
|
|
|
- checkedFc(val,item){
|
|
|
- if(val){
|
|
|
- if(!item.situation){
|
|
|
- item.situation='0'
|
|
|
- }
|
|
|
-
|
|
|
- }else{
|
|
|
- item.situation=''
|
|
|
- item.abnormalIllustrate=''
|
|
|
+ checkedFc(val, item) {
|
|
|
+ if (val) {
|
|
|
+ if (!item.situation) {
|
|
|
+ item.situation = '0'
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ item.situation = ''
|
|
|
+ item.abnormalIllustrate = ''
|
|
|
}
|
|
|
-
|
|
|
},
|
|
|
getInfoHandler(id, videoId, hostId) {
|
|
|
//获取卡片详情数据
|
|
|
- getEditInfo({ taskId: id+'', videoId: videoId+'', hostId: hostId+'' }).then(res => {
|
|
|
+ getEditInfo({ taskId: id + '', videoId: videoId + '', hostId: hostId + '' }).then(res => {
|
|
|
let { data, msg, code } = res
|
|
|
if (code == 200) {
|
|
|
-
|
|
|
- this.dataList.forEach(item => {
|
|
|
- data.coreMonitoringTaskMonitorInfoList.forEach(i => {
|
|
|
- if (i.project === item.dictValue) {
|
|
|
-
|
|
|
- //查询赋值
|
|
|
- this.$set(item, 'isChecked', true)
|
|
|
- this.$set(item, 'situation', i.situation)
|
|
|
- this.$set(item, 'abnormalIllustrate', i.abnormalIllustrate)
|
|
|
-
|
|
|
- }
|
|
|
- })
|
|
|
+ this.dataList.forEach(item => {
|
|
|
+ data.coreMonitoringTaskMonitorInfoList.forEach(i => {
|
|
|
+ if (i.project === item.dictValue) {
|
|
|
+ //查询赋值
|
|
|
+ this.$set(item, 'isChecked', true)
|
|
|
+ this.$set(item, 'situation', i.situation)
|
|
|
+ this.$set(item, 'abnormalIllustrate', i.abnormalIllustrate)
|
|
|
+ }
|
|
|
})
|
|
|
- console.log(this.dataList);
|
|
|
+ })
|
|
|
+ console.log(this.dataList)
|
|
|
//赋值主机&通道名称
|
|
|
this.host = data.hostName
|
|
|
this.hostId = data.host
|
|
|
@@ -175,8 +169,6 @@ export default {
|
|
|
this.videoChannel = data.videoChannel
|
|
|
this.taskRegistrationId = data.registrationId
|
|
|
this.id = data.id
|
|
|
-
|
|
|
-
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
@@ -186,12 +178,11 @@ export default {
|
|
|
this.falg = false
|
|
|
|
|
|
this.dataList.forEach(item => {
|
|
|
-
|
|
|
if (item.isChecked) {
|
|
|
- console.log(item);
|
|
|
+ console.log(item)
|
|
|
if (item.situation == '1' && item.abnormalIllustrate == '') {
|
|
|
Toast(`${item.dictLabel}的异常情况说明不能为空!`)
|
|
|
-
|
|
|
+
|
|
|
this.falg = true
|
|
|
}
|
|
|
}
|
|
|
@@ -206,7 +197,7 @@ export default {
|
|
|
|
|
|
this.dataList.forEach(item => {
|
|
|
if (item.isChecked) {
|
|
|
- item.project=item.dictValue
|
|
|
+ item.project = item.dictValue
|
|
|
list.push(item)
|
|
|
}
|
|
|
})
|
|
|
@@ -216,18 +207,22 @@ export default {
|
|
|
host: this.hostId,
|
|
|
videoChannel: this.videoChannel,
|
|
|
taskRegistrationId: this.taskRegistrationId,
|
|
|
- id: this.id||'',
|
|
|
+ id: this.id || '',
|
|
|
coreMonitoringTaskMonitorInfoList: list
|
|
|
}).then(res => {
|
|
|
let { data, msg, code } = res
|
|
|
if (code == 200) {
|
|
|
Toast('编辑成功!')
|
|
|
- this.show=false
|
|
|
- this.$emit('resetList')
|
|
|
+ this.show = false
|
|
|
+ this.$emit('resetList')
|
|
|
}
|
|
|
this.falg = false
|
|
|
})
|
|
|
}
|
|
|
+ },
|
|
|
+ //文字提示
|
|
|
+ textTitleHandler(text) {
|
|
|
+ Dialog({ message: text ? text : '提示' })
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -288,4 +283,8 @@ export default {
|
|
|
.btn {
|
|
|
width: 90%;
|
|
|
}
|
|
|
+.info {
|
|
|
+ color: #1989fa;
|
|
|
+ text-decoration: underline;
|
|
|
+}
|
|
|
</style>
|