|
@@ -60,7 +60,17 @@
|
|
|
<template slot-scope="scope">
|
|
|
<span v-if="scope.row.NoEdit">{{ scope.row.times }}</span>
|
|
|
|
|
|
- <el-tag v-if="scope.row.Edit" v-for="tag in scope.row.timesArr" :key="tag" closable @close="tag_close(scope.$index,row,tag)" type="success">{{tag}}</el-tag>
|
|
|
+ <el-tag v-if="scope.row.Edit" v-for="tag in scope.row.timesArr" :key="tag" closable @close="tag_close(scope.$index, scope.row, tag)" type="success">{{tag}}</el-tag>
|
|
|
+
|
|
|
+
|
|
|
+ <el-time-picker v-if="scope.row.time_single"
|
|
|
+ v-model="scope.row.times"
|
|
|
+ :picker-options="{ selectableRange: '00:00:00 - 23:59:59' }"
|
|
|
+ value-format="HH:mm"
|
|
|
+ @change="change_time(scope.$index, scope.row, $event)" format="HH:mm"
|
|
|
+ placeholder="任意时间点">
|
|
|
+ </el-time-picker>
|
|
|
+
|
|
|
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -463,14 +473,24 @@ export default {
|
|
|
tag_close1(tag){
|
|
|
console.log("tag", tag)
|
|
|
console.log("timetags1", this.timetags1)
|
|
|
+
|
|
|
+
|
|
|
this.timetags1.splice(this.timetags1.indexOf(tag), 1);
|
|
|
},
|
|
|
+
|
|
|
+
|
|
|
|
|
|
+ change_time(index,row,item){
|
|
|
+ console.log("item", index,row,item)
|
|
|
|
|
|
+ this.table.list[index].timesArr.push(item)
|
|
|
+
|
|
|
+
|
|
|
+ },
|
|
|
tag_close(index,row,tag){
|
|
|
console.log("tag", index,row,tag)
|
|
|
-
|
|
|
- this.timetags1.splice(this.timetags1.indexOf(tag), 1);
|
|
|
+ this.table.list[index].timesArr.splice(this.table.list[index].timesArr.indexOf(tag), 1);
|
|
|
+
|
|
|
},
|
|
|
|
|
|
|
|
@@ -654,6 +674,46 @@ export default {
|
|
|
}, 1000)
|
|
|
|
|
|
|
|
|
+ var timeArrRea = row.timesArr
|
|
|
+ var timesTempArr = []
|
|
|
+ timeArrRea.forEach(function(item){
|
|
|
+ timesTempArr.push({"time":item})
|
|
|
+ })
|
|
|
+
|
|
|
+ var send_data = {
|
|
|
+ "common":{"returnmap":"0"},
|
|
|
+ "data":[
|
|
|
+ {
|
|
|
+ "name":"checkPushing","resultmaps":{"list":timesTempArr},
|
|
|
+ "children":[
|
|
|
+ {
|
|
|
+ "name":"checkPushing","type":"e",
|
|
|
+ "parammaps": {
|
|
|
+ "tmrname":row.tmrname,
|
|
|
+ "tmrid":row.tmrid,
|
|
|
+ "id":row.id,
|
|
|
+ "time":"@checkPushing.time",
|
|
|
+ "type":0
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+
|
|
|
+ PostDataByName(send_data).then(response => {
|
|
|
+ console.log(response)
|
|
|
+ if (response.msg === 'fail') {
|
|
|
+ this.$notify({ title: '删除失败', message: response.data, type: 'warning', duration: 2000 })
|
|
|
+ } else {
|
|
|
+ this.$notify({ title: '成功', message: '删除成功', type: 'success', duration: 2000 })
|
|
|
+
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
if(id == 0){
|
|
|
var send_data = {
|
|
|
"common":{"returnmap":"0"},
|