WXL
2025-04-14 6e54a6688661a05de7c418612cea8b38bbc2dee3
src/views/repositoryai/intention/index.vue
@@ -3,7 +3,7 @@
    <!-- 左侧栏 -->
    <div class="sidecolumn">
      <div class="sidecolumn-top">
        <div class="top-wj">指标类型</div>
        <div class="top-wj">指标分类</div>
        <div class="top-tj" @click="dialogFormVisible = true">+添加</div>
      </div>
      <div class="center-ss">
@@ -104,7 +104,7 @@
                  placeholder="请选择"
                >
                  <el-option
                    v-for="(item, index) in qyoptions"
                    v-for="(item, index) in askvaluetype"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
@@ -152,7 +152,7 @@
                  icon="el-icon-plus"
                  size="medium"
                  @click="handleAdd"
                  v-hasPermi="['system:user:add']"
                  >新增</el-button
                >
              </el-col>
@@ -165,7 +165,7 @@
                  size="medium"
                  :disabled="multiple"
                  @click="handleDelete"
                  v-hasPermi="['system:user:remove']"
                  >删除</el-button
                >
              </el-col>
@@ -187,28 +187,37 @@
                prop="id"
              /> -->
              <el-table-column
                label="指标类型"
                fixed
                align="center"
                key="scriptType"
                prop="scriptType"
                :show-overflow-tooltip="true"
              >
                <template slot-scope="scope">
                  <dict-tag
                    :options="valuetypelb"
                    :value="scope.row.scriptType"
                  />
                </template>
              </el-table-column>
              <el-table-column
                label="指标名称"
                fixed
                align="center"
                key="targetname"
                prop="targetname"
                :show-overflow-tooltip="true"
              >
              </el-table-column>
              <el-table-column
                label="指标描述"
                align="center"
                key="targetdesc"
                prop="targetdesc"
                :show-overflow-tooltip="true"
                width="200"
              />
              <el-table-column
                label="指标类型"
                align="center"
                key="valueType"
                prop="valueType"
                :show-overflow-tooltip="true"
              >
                <template slot-scope="scope">
                  <dict-tag
                    :options="valuetypelb"
                    :value="scope.row.valueType"
                  />
                </template>
              </el-table-column>
              <!-- <el-table-column
                label="正常值范围"
@@ -221,13 +230,7 @@
                  <span>{{ scope.row.warnup }}~{{ scope.row.warndown }}</span>
                </template>
              </el-table-column> -->
              <el-table-column
                label="指标描述"
                align="center"
                key="targetdesc"
                prop="targetdesc"
                width="200"
              /><el-table-column
             <el-table-column
                label="适用场景"
                align="center"
                key="suitWayList"
@@ -250,7 +253,7 @@
                    size="medium"
                    type="text"
                    @click="illnessUpdate(scope.row)"
                    v-hasPermi="['system:user:edit']"
                    ><span class="button-textxg"
                      ><i class="el-icon-date"></i>详情</span
                    ></el-button
@@ -287,7 +290,7 @@
                    size="medium"
                    type="text"
                    @click="handleUpdate(scope.row)"
                    v-hasPermi="['system:user:edit']"
                    ><span class="button-textxg"
                      ><i class="el-icon-edit"></i>修改</span
                    ></el-button
@@ -305,7 +308,7 @@
                    size="medium"
                    type="text"
                    @click="handleDelete(scope.row)"
                    v-hasPermi="['system:user:remove']"
                    ><span class="button-textsc"
                      ><i class="el-icon-delete"></i>删除</span
                    ></el-button
@@ -338,6 +341,10 @@
            :rules="rules"
            label-width="100px"
          >
            <div class="headline">
              <div class="basics">基础信息</div>
            </div>
            <el-divider></el-divider>
            <el-row v-if="!measurement">
              <el-col :span="12">
                <el-form-item label="指标名称" prop="targetname">
@@ -349,20 +356,9 @@
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="版本号" prop="deptId">
                  <el-input
                    v-model="indexform.version"
                    placeholder="默认1.0"
                    maxlength="40"
                  />
                </el-form-item>
              </el-col>
            </el-row>
            <!-- deptOptions -->
            <el-row v-if="!measurement">
              <el-col :span="8">
                <el-form-item label="指标分类" prop="assortid">
                  <el-select
                  style="width: 300px;"
                    v-model="indexform.assortid"
                    size="medium"
                    filterable
@@ -383,6 +379,31 @@
                    </el-option-group>
                  </el-select>
                </el-form-item>
              </el-col>
            </el-row>
            <el-row v-if="!measurement">
              <el-col :span="24">
                <el-form-item label="指标描述" prop="targetdesc">
                  <el-input
                    v-model="indexform.targetdesc"
                    placeholder="请输入指标描述"
                    id="targetdesc"
                    @focus="currentInputId = 'targetdesc'"
                    maxlength="40"
                  />
                </el-form-item> </el-col
            ></el-row>
            <!-- deptOptions -->
            <el-row v-if="!measurement">
              <el-col :span="8">
                <el-form-item label="版本号" prop="deptId">
                  <el-input
                    v-model="indexform.version"
                    placeholder="默认1.0"
                    maxlength="40"
                  />
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="语言" prop="language">
@@ -401,38 +422,23 @@
              </el-col>
              <el-col :span="8">
                <el-form-item label="是否可用" prop="isAvailable">
                  <el-select
                    v-model="indexform.isAvailable"
                    placeholder="请选择"
                  >
                    <el-option
                      v-for="index in qyoptions"
                      :key="index.value"
                      :label="index.label"
                      :value="index.value"
                    ></el-option>
                  </el-select>
                  <el-radio-group v-model="indexform.isAvailable">
                    <el-radio
                      v-for="(item, index) in usable"
                      :label="item.value"
                      >{{ item.label }}</el-radio
                    >
                  </el-radio-group>
                </el-form-item>
              </el-col>
            </el-row>
            <el-row v-if="!measurement">
              <el-col :span="24">
                <el-form-item label="指标描述" prop="targetdesc">
                  <el-input
                    v-model="indexform.targetdesc"
                    placeholder="请输入指标描述"
                    id="targetdesc"
                    @focus="currentInputId = 'targetdesc'"
                    maxlength="40"
                  />
                </el-form-item> </el-col
            ></el-row>
            <el-form-item label="插入填空" prop="scriptContent">
            <!-- <el-form-item label="插入填空" prop="scriptContent">
              <div style="display: flex; margin-bottom: 10px">
                <div class="tsgname" @click="tsgnameto">插入填空</div>
              </div>
            </el-form-item>
            <el-form-item label="标签" prop="desc" v-if="!measurement">
            </el-form-item> -->
            <el-form-item label="标签" prop="dynamicTags" v-if="!measurement">
              <div class="xinz-inf">
                <el-tag
                  :key="tag.tagname"
@@ -472,7 +478,19 @@
            </el-form-item>
            <el-row v-if="!measurement">
              <el-col :span="24">
                <el-form-item label="值类型">
                <el-form-item prop="valueType">
                  <template #label>
                    结果类型
                    <el-tooltip
                      class="item"
                      effect="light"
                      content="本类型为结果收集类型;选项用于指向性题目如是否等;文本适用复杂情况;数值用于收集数值型数据"
                      placement="top-start"
                    >
                      <i class="el-icon-warning-outline"></i>
                    </el-tooltip>
                    <!-- 在标签后插入红色星号 -->
                  </template>
                  <el-radio-group v-model="indexform.valueType">
                    <el-radio :label="1">选项</el-radio>
                    <el-radio :label="2">文本</el-radio>
@@ -483,14 +501,14 @@
            >
            <el-row v-if="!measurement">
              <el-col :span="24">
                <el-form-item label="题目类型">
                <el-form-item label="适用题型" prop="scriptType">
                  <el-radio-group
                    @input="Changtype"
                    v-model="indexform.scriptType"
                  >
                    <el-radio :label="1">单选</el-radio>
                    <el-radio :label="2">多选</el-radio>
                    <el-radio :label="3">填空</el-radio>
                    <!-- <el-radio :label="3">填空</el-radio> -->
                    <el-radio :label="4">问答</el-radio>
                  </el-radio-group>
                </el-form-item>
@@ -500,24 +518,20 @@
            <el-row v-if="!measurement">
              <el-col :span="24">
                <el-form-item label="适用场景" prop="suitWayList">
                  <el-select
                    class="el-select1"
                    v-model="indexform.suitWayList"
                    multiple
                    @change="changeselect"
                    placeholder="请选择"
                  >
                    <el-option
                      v-for="index in mode"
                      :key="index.value"
                      :label="index.label"
                      :value="index.value"
                    ></el-option>
                  </el-select>
                  <el-checkbox-group v-model="indexform.suitWayList">
                    <el-checkbox v-for="item in mode" :label="item.value">{{
                      item.label
                    }}</el-checkbox>
                  </el-checkbox-group>
                </el-form-item>
              </el-col>
            </el-row>
            <div v-if="indexform.scriptType == 1 || indexform.scriptType == 2">
              <div class="headline">
                <div class="basics">选项设置</div>
              </div>
              <el-divider></el-divider>
            </div>
            <el-card
              class="box-card"
              style="margin-bottom: 20px"
@@ -533,7 +547,7 @@
                @xiayioption="xiayioption"
              />
            </el-card>
            <div v-if="indexform.scriptType == 3">
            <!-- <div v-if="indexform.scriptType == 3">
              <el-form-item label="收集信息">
                <el-card class="box-card">
                  <div v-for="item in testuserList" style="margin-bottom: 10px">
@@ -554,7 +568,11 @@
                  </div>
                </el-card>
              </el-form-item>
            </div> -->
            <div class="headline">
              <div class="basics">指标测试</div>
            </div>
            <el-divider></el-divider>
            <el-row :gutter="20">
              <el-col :span="12">
                <el-form-item label="测试输入" prop="nickName">
@@ -637,7 +655,7 @@
      </span>
    </el-dialog>
    <!-- 添加类别弹框 -->
    <el-dialog title="新增类别" width="30%" :visible.sync="dialogFormVisible">
    <el-dialog title="类别编辑" width="30%" :visible.sync="dialogFormVisible">
      <div style="text-align: center; margin-bottom: 20px">
        <el-radio-group v-model="radio">
          <el-radio-button label="主分类"></el-radio-button>
@@ -768,7 +786,6 @@
      illnesslist: [],
      illnesslistapi: [],
      optionsillness: [],
      qyoptions: [],
      mode: [],
      optionstag: [],
      targetoptionList: [],
@@ -779,7 +796,7 @@
        pageNum: 1,
        pageSize: 10,
      },
      valuetypelb: [],
      askvaluetype: [],
      // 表单校验
      rules: {
@@ -790,10 +807,22 @@
          { required: true, message: "指标分类不能为空", trigger: "blur" },
        ],
        language: [
          { required: true, message: "指标语言不能为空", trigger: "blur" },
          { required: true, message: "语言不能为空", trigger: "blur" },
        ],
        isAvailable: [
          { required: true, message: "指标语言不能为空", trigger: "blur" },
          { required: true, message: "可用状态不能为空", trigger: "blur" },
        ],
        targetdesc: [
          { required: true, message: "指标描述不能为空", trigger: "blur" },
        ],
        valueType: [
          { required: true, message: "结果类型不能为空", trigger: "blur" },
        ],
        scriptType: [
          { required: true, message: "适用题型不能为空", trigger: "blur" },
        ],
        suitWayList: [
          { required: true, message: "适用场景不能为空", trigger: "blur" },
        ],
      },
    };
@@ -811,9 +840,9 @@
    this.gettabList();
    this.getDeptTree();
    this.mode = store.getters.mode;
    this.valuetypelb = store.getters.askvaluetype;
    this.askvaluetype = store.getters.askvaluetype;
    this.valuetypelb = store.getters.valuetypelb;
    this.languagelist = store.getters.languagelist;
    this.qyoptions = store.getters.askvaluetype;
    this.usable = store.getters.usable;
  },
  methods: {
@@ -1107,6 +1136,7 @@
          targetoptionid: item.targetoptionid,
          isabnormal: item.isabnormal,
          picturePath: item.picturePath,
          optiondesc: item.optiondesc,
        };
      });
      console.log(this.testuserList);
@@ -1253,6 +1283,7 @@
      this.indexform = {
        ivrLibaTargetTagList: [],
        targetoptionList: [],
        suitWayList: [],
      };
      this.dynamicTags = [];
      this.testuserList = [
@@ -1262,6 +1293,7 @@
          targetregex: "",
          targetregex2: "",
          isoperation: 1,
          isabnormal:0,
          picturePath: "",
          dynamiccruxs: [],
          nodynamiccruxs: [],
@@ -1497,6 +1529,14 @@
.tsgname:hover {
  background: #20894d;
}
.headline {
  display: flex;
  justify-content: space-between;
  font-size: 20px;
  border-left: 4px solid #41a1be;
  padding-left: 5px;
  margin: 15px 0;
}
.qrcode-dialo {
  text-align: center;
  //   display: flex;
@@ -1516,9 +1556,6 @@
    width: 300px;
    height: 400px;
  }
}
.el-select {
  width: 40%;
}
::v-deep.el-tabs--left,
.el-tabs--right {