fuliqi
2024-03-20 1a95b0bb8d0f7a9f2a1d18c719f3a8b68f58fc2d
src/views/system/check-template/index.vue
@@ -116,14 +116,15 @@
          <el-input v-model="form.templateName" placeholder="请输入模板名称" />
        </el-form-item>
        <el-form-item label="考核对象" prop="unitName">
          <el-select v-model="form.unitName" placeholder="请选择">
            <el-option
              v-for="item in unitList"
              :key="item.id"
              :label="item.value"
              :value="item.id">
            </el-option>
          </el-select>
          <div class="block">
            <span class="demonstration"></span>
            <el-cascader
              v-model="value"
              :options="options"
              :props = "props"
              @change="handleChange"></el-cascader>
          </div>
        </el-form-item>
        <el-form-item label="考核规则" prop="tempRuleFormList">
          <div class="row-warp">
@@ -193,6 +194,46 @@
  name: "CheckTemplate",
  data() {
    return {
      props: { multiple: true },
      value: [],
      options: [{
        value: 'city',
        label: '区县',
        children: [{
          value: 'fushun',
          label: '富顺县',
        }, {
          value: 'rong',
          label: '荣县',
        },{
          value: 'gaoxin',
          label: '高新区',
        },{
          value: 'ziliujing',
          label: '自流井区',
        },{
          value: 'gongjing',
          label: '贡井区',
        },{
          value: 'daan',
          label: '大安区',
        },{
          value: 'yantan',
          label: '沿滩区',
        },
        ]
      }, {
        value: 'company',
        label: '公司',
        children: [{
          value: 'yunwei',
          label: '成都x运维',
        }, {
          value: 'yunwei2',
          label: '自贡x运维',
        }, ]
      },
      ],
      ruleList: [],
      unitList: [],
      // 临时规则表单
@@ -250,6 +291,9 @@
    this.selectUnit();
  },
  methods: {
    handleChange(value) {
      console.log(value);
    },
    removeRule(form) {
      console.log(form)
      this.ruleFormList = this.ruleFormList.filter(item => item !== form);