Browse Source

预案

wangqin
zhoule 8 months ago
parent
commit
4d71b10416
  1. 9
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/addAndEditDialog/index.vue
  2. 20
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/formTable/index.vue

9
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/addAndEditDialog/index.vue

@ -35,7 +35,7 @@
<div class="text"><i style="color: red;">*</i>执行操作:</div> <div class="text"><i style="color: red;">*</i>执行操作:</div>
</el-col> </el-col>
<el-col :span="22"> <el-col :span="22">
<FormTable ref="secondFormTable" :tableData="secondFormData"></FormTable> <FormTable ref="secondFormTable" :tableData="secondFormData" :type="1"></FormTable>
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
@ -45,7 +45,7 @@
<div class="text"><i style="color: red;">*</i>恢复操作:</div> <div class="text"><i style="color: red;">*</i>恢复操作:</div>
</el-col> </el-col>
<el-col :span="22"> <el-col :span="22">
<FormTable ref="thirdFormTable" :tableData="thirdFormData"></FormTable> <FormTable ref="thirdFormTable" :tableData="thirdFormData" :type="2"></FormTable>
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
@ -89,7 +89,8 @@ export default {
}, },
provide() { provide() {
return { return {
loadData: throttle(this.loadData, 1000) // loadData: throttle(this.loadData, 100)
loadData: this.loadData
} }
}, },
props: { props: {
@ -238,7 +239,7 @@ export default {
this.thirdFormData.push(action); this.thirdFormData.push(action);
} }
}) })
console.log('secondFormData', this.secondFormData) // console.log('secondFormData', this.secondFormData)
}).catch((err) => { }).catch((err) => {
console.log(err) console.log(err)
Message.error("查询事件预案列表失败", err); Message.error("查询事件预案列表失败", err);

20
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/formTable/index.vue

@ -41,7 +41,7 @@
:value="item.id"> :value="item.id">
</el-option> </el-option>
</el-select> </el-select>
<el-input @click.native="clickQbb(scope.$index)" v-if="scope.row.deviceType == 2" <el-input @click.native="clickQbb(scope.$index)" v-if="type == 1 && scope.row.deviceType == 2"
placeholder="请选择" v-model="scope.row.qbb" readonly> placeholder="请选择" v-model="scope.row.qbb" readonly>
<i slot="suffix" class="el-input__icon el-icon-search"></i> <i slot="suffix" class="el-input__icon el-icon-search"></i>
</el-input> </el-input>
@ -115,6 +115,7 @@ export default {
props: { props: {
visible: Boolean, visible: Boolean,
eventType: Number, eventType: Number,
type: Number,
tableData: { tableData: {
type: Array, type: Array,
default: () => [{ default: () => [{
@ -219,10 +220,21 @@ export default {
index: 1 index: 1
} }
}, },
async created() { watch: {
let loadData = await this.loadData(1); async tableData(newValue) {
// console.log('aa',loadData) console.log('newValue', newValue)
if (newValue) {
const item = this.tableData.find(it => it.searchRule == 1);
console.log('item', item);
if (item && item.deviceType) {
let loadData = await this.loadData(item.deviceType);
console.log('aa', loadData)
this.sbOptions = loadData; this.sbOptions = loadData;
}
}
}
},
mounted() {
}, },
methods: { methods: {
initData() { initData() {

Loading…
Cancel
Save