|
@@ -155,10 +155,10 @@
|
|
style="width: 160px"
|
|
style="width: 160px"
|
|
>
|
|
>
|
|
<el-option
|
|
<el-option
|
|
- v-for="dict in inspectTimeList"
|
|
|
|
- :key="dict.dictValue"
|
|
|
|
- :label="dict.dictValue"
|
|
|
|
- :value="dict.dictValue"
|
|
|
|
|
|
+ v-for="dict in implementTimeStart"
|
|
|
|
+ :key="dict.value"
|
|
|
|
+ :label="dict.value"
|
|
|
|
+ :value="dict.value"
|
|
/>
|
|
/>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -172,10 +172,10 @@
|
|
style="width: 160px"
|
|
style="width: 160px"
|
|
>
|
|
>
|
|
<el-option
|
|
<el-option
|
|
- v-for="dict in inspectTimeList"
|
|
|
|
- :key="dict.dictValue"
|
|
|
|
- :label="dict.dictValue"
|
|
|
|
- :value="dict.dictValue"
|
|
|
|
|
|
+ v-for="dict in implementTimeEnd"
|
|
|
|
+ :key="dict.value"
|
|
|
|
+ :label="dict.value"
|
|
|
|
+ :value="dict.value"
|
|
/>
|
|
/>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -286,7 +286,8 @@ export default {
|
|
{dictValue:"2",dictLabel:"周"},
|
|
{dictValue:"2",dictLabel:"周"},
|
|
{dictValue:"3",dictLabel:"月"},
|
|
{dictValue:"3",dictLabel:"月"},
|
|
],
|
|
],
|
|
- inspectTimeList:[],
|
|
|
|
|
|
+ implementTimeStart:[],//执行开始时段
|
|
|
|
+ implementTimeEnd:[],//执行结束时段
|
|
|
|
|
|
dateRange:[],
|
|
dateRange:[],
|
|
teamList:[],
|
|
teamList:[],
|
|
@@ -295,7 +296,8 @@ export default {
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
this.getList();//初始化table
|
|
this.getList();//初始化table
|
|
- this.zxtime()//执行时间
|
|
|
|
|
|
+ this.zxtimeStart()
|
|
|
|
+ this.zxtimeEnd()
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
|
|
@@ -307,6 +309,7 @@ export default {
|
|
// 取消按钮
|
|
// 取消按钮
|
|
cancel() {
|
|
cancel() {
|
|
this.open = false;
|
|
this.open = false;
|
|
|
|
+ this.loading = false
|
|
this.reset();
|
|
this.reset();
|
|
},
|
|
},
|
|
/** 重置按钮操作 */
|
|
/** 重置按钮操作 */
|
|
@@ -330,30 +333,55 @@ export default {
|
|
this.queryParams.current = 1;
|
|
this.queryParams.current = 1;
|
|
this.getList();
|
|
this.getList();
|
|
},
|
|
},
|
|
- /** 执行时间 */
|
|
|
|
- zxtime(){
|
|
|
|
|
|
+ /** 执行开始时间 */
|
|
|
|
+ zxtimeStart(){
|
|
let arr = []
|
|
let arr = []
|
|
for(let i = 0; i<48;i++){
|
|
for(let i = 0; i<48;i++){
|
|
arr[i] = {}
|
|
arr[i] = {}
|
|
if(i%2 == "NaN"){
|
|
if(i%2 == "NaN"){
|
|
- arr[i].dictValue="00:00:00"
|
|
|
|
|
|
+ arr[i].value="00:00:00"
|
|
}
|
|
}
|
|
if(i%2 == "0"){
|
|
if(i%2 == "0"){
|
|
if(i/2>=10){
|
|
if(i/2>=10){
|
|
- arr[i].dictValue= i/2 + ":00:00"
|
|
|
|
|
|
+ arr[i].value= i/2 + ":00:00"
|
|
}else{
|
|
}else{
|
|
- arr[i].dictValue="0" + i/2 + ":00:00"
|
|
|
|
|
|
+ arr[i].value="0" + i/2 + ":00:00"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if(i%2 == "1"){
|
|
if(i%2 == "1"){
|
|
if(i/2>=10){
|
|
if(i/2>=10){
|
|
- arr[i].dictValue=(i-1)/2 + ":30:00"
|
|
|
|
|
|
+ arr[i].value=(i-1)/2 + ":30:00"
|
|
}else{
|
|
}else{
|
|
- arr[i].dictValue="0" + (i-1)/2 + ":30:00"
|
|
|
|
|
|
+ arr[i].value="0" + (i-1)/2 + ":30:00"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- this.inspectTimeList = arr
|
|
|
|
|
|
+ this.implementTimeStart = arr
|
|
|
|
+ },
|
|
|
|
+ /** 执行开结束时间 */
|
|
|
|
+ zxtimeEnd(){
|
|
|
|
+ let arr = []
|
|
|
|
+ for(let i = 0; i<49;i++){
|
|
|
|
+ arr[i] = {}
|
|
|
|
+ if(i%2 == "NaN"){
|
|
|
|
+ arr[i].value="00:00:00"
|
|
|
|
+ }
|
|
|
|
+ if(i%2 == "0"){
|
|
|
|
+ if(i/2>=10){
|
|
|
|
+ arr[i].value= i/2 + ":00:00"
|
|
|
|
+ }else{
|
|
|
|
+ arr[i].value="0" + i/2 + ":00:00"
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if(i%2 == "1"){
|
|
|
|
+ if(i/2>=10){
|
|
|
|
+ arr[i].value=(i-1)/2 + ":30:00"
|
|
|
|
+ }else{
|
|
|
|
+ arr[i].value="0" + (i-1)/2 + ":30:00"
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ this.implementTimeEnd = arr.slice(1,arr.length)
|
|
},
|
|
},
|
|
/** 查询参数列表 */
|
|
/** 查询参数列表 */
|
|
getList() {
|
|
getList() {
|
|
@@ -444,25 +472,34 @@ export default {
|
|
}
|
|
}
|
|
this.loading = true
|
|
this.loading = true
|
|
if (this.form.id != undefined) {
|
|
if (this.form.id != undefined) {
|
|
- updateMaintianPlan(this.form).then(response => {
|
|
|
|
- this.loading = false,
|
|
|
|
- this.msgSuccess("修改成功");
|
|
|
|
- this.open = false;
|
|
|
|
- this.getList();
|
|
|
|
- }).catch(()=>{
|
|
|
|
- this.loading = false
|
|
|
|
- })
|
|
|
|
- } else {
|
|
|
|
- addMaintianPlan(this.form).then(response => {
|
|
|
|
- this.loading = false
|
|
|
|
- if(response.status == "SUCCESS"){
|
|
|
|
- this.msgSuccess("新增成功");
|
|
|
|
|
|
+ if(this.form.planPathId){
|
|
|
|
+ updateMaintianPlan(this.form).then(response => {
|
|
|
|
+ this.loading = false,
|
|
|
|
+ this.msgSuccess("修改成功");
|
|
this.open = false;
|
|
this.open = false;
|
|
this.getList();
|
|
this.getList();
|
|
- }
|
|
|
|
- }).catch((err)=>{
|
|
|
|
- this.loading = false
|
|
|
|
- })
|
|
|
|
|
|
+ }).catch(()=>{
|
|
|
|
+ this.loading = false
|
|
|
|
+ })
|
|
|
|
+ }else{
|
|
|
|
+ this.msgError("巡更路线不能为空");
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ if(this.form.planPathId){
|
|
|
|
+ addMaintianPlan(this.form).then(response => {
|
|
|
|
+ this.loading = false
|
|
|
|
+ if(response.status == "SUCCESS"){
|
|
|
|
+ this.msgSuccess("新增成功");
|
|
|
|
+ this.open = false;
|
|
|
|
+ this.getList();
|
|
|
|
+ }
|
|
|
|
+ }).catch((err)=>{
|
|
|
|
+ this.loading = false
|
|
|
|
+ })
|
|
|
|
+ }else{
|
|
|
|
+ this.msgError("巡更路线不能为空");
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|
|
}
|
|
}
|
|
});
|
|
});
|
|
@@ -481,17 +518,18 @@ export default {
|
|
this.msgSuccess("删除成功");
|
|
this.msgSuccess("删除成功");
|
|
}).catch(() => {});
|
|
}).catch(() => {});
|
|
},
|
|
},
|
|
- /** table */
|
|
|
|
|
|
+ /** 路线选择 */
|
|
dialogCheck(selection, row){
|
|
dialogCheck(selection, row){
|
|
this.$refs.dataTable.clearSelection()
|
|
this.$refs.dataTable.clearSelection()
|
|
if (selection.length === 0) { // 判断selection是否有值存在
|
|
if (selection.length === 0) { // 判断selection是否有值存在
|
|
|
|
+ this.form.planPathId = undefined
|
|
|
|
+ this.form.planPathName = undefined
|
|
return
|
|
return
|
|
- }
|
|
|
|
- if (row) {
|
|
|
|
|
|
+ }else{
|
|
this.selectioned = row
|
|
this.selectioned = row
|
|
this.$refs.dataTable.toggleRowSelection(row, true)
|
|
this.$refs.dataTable.toggleRowSelection(row, true)
|
|
- this.form.planPathId = row.id
|
|
|
|
- this.form.planPathName = row.name
|
|
|
|
|
|
+ this.form.planPathId = selection[selection.length-1].id
|
|
|
|
+ this.form.planPathName = selection[selection.length-1].name
|
|
}
|
|
}
|
|
},
|
|
},
|
|
/** 导出按钮操作 */
|
|
/** 导出按钮操作 */
|