Browse Source

完善设备管控

wangqin
hui 7 months ago
parent
commit
579c555376
  1. 12
      ruoyi-ui/src/views/JiHeExpressway/pages/control/device/strategy/components/AddNEditDialog.vue
  2. 20
      ruoyi-ui/src/views/JiHeExpressway/pages/control/device/strategy/components/TaskItem.vue
  3. 10
      ruoyi-ui/src/views/JiHeExpressway/pages/control/device/strategy/components/taskEditDialog.vue
  4. 8
      ruoyi-ui/src/views/JiHeExpressway/pages/control/device/strategy/index.vue

12
ruoyi-ui/src/views/JiHeExpressway/pages/control/device/strategy/components/AddNEditDialog.vue

@ -9,9 +9,9 @@
<el-form-item label="描述" prop="remark">
<el-input v-model="editData.remark" placeholder="任务组描述"></el-input>
</el-form-item>
<el-form-item label="状态" prop="status">
<!-- <el-form-item label="状态" prop="status">
<el-switch v-model="editData.status" active-value="1" inactive-value="0"></el-switch>
</el-form-item>
</el-form-item> -->
<div style="display: flex; justify-content: flex-end;">
<el-button @click="(modelVisible = false), (submitting = false)">
取消
@ -173,7 +173,7 @@ export default {
this.editData = {
id: res.data.id,
groupName: res.data.groupName,
status: res.data.status,
// status: res.data.status,
remark: res.data.remark,
detailedConfiguration: res.data.detailedConfiguration
}
@ -206,7 +206,7 @@ export default {
this.editData = {
id: res.data.id,
groupName: res.data.groupName,
status: res.data.status,
// status: res.data.status,
remark: res.data.remark,
detailedConfiguration: res.data.detailedConfiguration
}
@ -256,7 +256,7 @@ export default {
this.editData = {
id: this.propData.id,
groupName : this.propData.groupName,
status: this.propData.status,
// status: this.propData.status,
remark: this.propData.remark,
detailedConfiguration: this.propData.detailedConfiguration
}
@ -264,7 +264,7 @@ export default {
this.mode = "add"
this.editData = {
groupName: "",
status: "1",
// status: "1",
remark: "",
detailedConfiguration: ""
}

20
ruoyi-ui/src/views/JiHeExpressway/pages/control/device/strategy/components/TaskItem.vue

@ -22,21 +22,21 @@
</template>
<template v-if="editData.deviceType == '10'">
<div class="center">
<p>{{ gzmsDic[editData.params.SETMD] }}</p>
<p>时长{{ editData.params.SETTM }}</p>
<p>{{ awakerModeDic[editData.params.SETMD] }}</p>
<p>时长{{ editData.params.SETTM }}分钟</p>
</div>
</template>
<template v-if="editData.deviceType == '12'">
<div class="center">
<p>{{ gzmsDic[editData.params.SETMD] }}</p>
<p>时长{{ editData.params.SETTM }}</p>
<p>{{ induceModeDic[editData.params.SETMD] }}</p>
<p>时长{{ editData.params.SETTM }}分钟</p>
</div>
</template>
<template v-if="editData.deviceType == '13'">
<div class="center">
<p>{{ gzmsDic[editData.params.SETMD] }}</p>
<p>时长{{ editData.params.SETTM }}</p>
<p>{{ awakerModeDic[editData.params.SETMD] }}</p>
<p>时长{{ editData.params.SETTM }}分钟</p>
</div>
</template>
@ -55,7 +55,7 @@
<script>
import request from "@/utils/request";
import { deviceTypeDic, gzmsMap } from "@screen/utils/enum.js"
import { deviceTypeDic, gzmsMap, gzztMap } from "@screen/utils/enum.js"
import { getDeviceList } from "@screen/utils/api/device.js"
import taskEditDialog from "./taskEditDialog.vue";
import BoardRecordPreview from '@screen/components/infoBoard/BoardRecordPreview.vue'
@ -76,7 +76,8 @@ export default {
isEditingTask: false,
selectedType:"",
deviceTypeDic:"",
gzmsMap:"",
awakerModeDic:"",
induceModeDic:"",
deviceDic:{},
deviceList:[]
};
@ -89,7 +90,8 @@ export default {
},
mounted() {
this.deviceTypeDic = deviceTypeDic;
this.gzmsDic = gzmsMap;
this.awakerModeDic = gzmsMap;
this.induceModeDic = gzztMap;
this.isCompReady = true;
console.log(JSON.parse(this.propData.callParameter || '[{}]')[0], "++++=====######");
this.initBasicData().then(res=>{

10
ruoyi-ui/src/views/JiHeExpressway/pages/control/device/strategy/components/taskEditDialog.vue

@ -77,7 +77,7 @@
<el-col :span="8">
<el-input-number v-model="editData.type10.SETTM" :min="0" :max="100000" />
</el-col>
<!-- <el-col :span="4" style="margin-left: 10px;">分钟</el-col> -->
<el-col :span="4" style="margin-left: 10px;">分钟</el-col>
</el-form-item>
</template>
@ -85,14 +85,14 @@
<!-- 行车诱导 -->
<el-form-item label="工作模式">
<el-select v-model="editData.type12.SETMD" placeholder="请选择">
<el-option v-for="value, key in gzmsMap" :key="key" :label="value" :value="key" />
<el-option v-for="value, key in gzztMap" :key="key" :label="value" :value="key" />
</el-select>
</el-form-item>
<el-form-item label="工作时长">
<el-col :span="8">
<el-input-number v-model="editData.type12.SETTM" :min="0" :max="100000" />
</el-col>
<!-- <el-col :span="4" style="margin-left: 10px;">分钟</el-col> -->
<el-col :span="4" style="margin-left: 10px;">分钟</el-col>
</el-form-item>
</template>
@ -107,12 +107,12 @@
<el-col :span="8">
<el-input-number v-model="editData.type13.SETTM" :min="0" :max="100000" />
</el-col>
<!-- <el-col :span="4" style="margin-left: 10px;">分钟</el-col> -->
<el-col :span="4" style="margin-left: 10px;">分钟</el-col>
</el-form-item>
</template>
<el-form-item>
<el-form-item style="display: flex; justify-content: flex-end;">
<el-button size="mini" type="primary" @click="onSubmit">保存</el-button>
</el-form-item>
</el-form>

8
ruoyi-ui/src/views/JiHeExpressway/pages/control/device/strategy/index.vue

@ -40,8 +40,8 @@
<template #button>
<!-- <Switcher class="switcher" :activeOption="activeOption"
@change="(value) => handleSwitcherChange(value, item) " /> -->
<el-switch v-model="item.status" active-color="#0BD" inactive-color="#999" active-value="1"
inactive-value="0" @change="(value) => handleSwitcherChange(value, item) ">
<el-switch v-model="item.status" active-color="#0BD" inactive-color="#999" active-value="0"
inactive-value="1" @change="(value) => handleSwitcherChange(value, item) ">
</el-switch>
<Button @click.native="() => onAddEdit(item)">
编辑
@ -137,8 +137,8 @@ export default {
async handleSwitcherChange(value, item) {
// item.status == "1" ? item.status = "0" : item.status = "1" ;
request({
url: `/business/dcBatchFunctionsJobGroup`,
method: "PUT",
url: `/business/dcBatchFunctionsJobGroup/changeStatus`,
method: "POST",
data: {
id:item.id,
status:value

Loading…
Cancel
Save