WXL
2024-02-01 79925204a4e1588d1031ca0429ae318a608a8928
src/views/repositoryai/intention/index.vue
@@ -172,12 +172,14 @@
              <el-table-column type="selection" width="50" align="center" />
              <el-table-column
                label="序号"
                fixed
                align="center"
                key="targetID"
                prop="targetID"
                key="id"
                prop="id"
              />
              <el-table-column
                label="值类型"
                fixed
                align="center"
                key="isenable"
                prop="isenable"
@@ -266,6 +268,7 @@
              <el-table-column
                label="操作"
                fixed="right"
                align="center"
                width="200"
                class-name="small-padding fixed-width"
@@ -345,8 +348,33 @@
                </el-form-item>
              </el-col>
            </el-row>
            <!-- deptOptions -->
            <el-row v-if="!measurement">
              <el-col :span="12">
              <el-col :span="8">
                <el-form-item label="指标分类">
                  <el-select
                    v-model="indexform.assortid"
                    size="medium"
                    filterable
                    placeholder="请选择分类"
                  >
                    <el-option-group
                      v-for="group in deptOptions"
                      :key="group.id"
                      :label="group.indexAssortName"
                    >
                      <el-option
                        v-for="item in group.ivrLibaTargetAssortList"
                        :key="item.id"
                        :label="item.indexAssortName"
                        :value="item.id"
                      >
                      </el-option>
                    </el-option-group>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="语言" prop="deptId">
                  <el-select
                    v-model="indexform.language"
@@ -361,7 +389,7 @@
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="12">
              <el-col :span="8">
                <el-form-item label="是否可用" prop="isAvailable">
                  <el-select
                    v-model="indexform.isAvailable"
@@ -541,6 +569,9 @@
                </el-table-column>
              </el-table>
            </el-card>
            <el-card class="box-card" style="margin-bottom: 20px">
              <Regular :TargetoptionList="testuserList" />
            </el-card>
            <el-row :gutter="20">
              <el-col :span="12">
                <el-form-item label="测试输入" prop="nickName">
@@ -659,13 +690,6 @@
<script>
import {
  listUser,
  getUser,
  delUser,
  addUser,
  updateUser,
} from "@/api/system/user";
import {
  gettargetInfo,
  particulartarget,
  gettargetInfoedit,
@@ -682,6 +706,7 @@
} from "@/api/AiCentre/index";
import { getToken } from "@/utils/auth";
import Treeselect from "@riophae/vue-treeselect";
import Regular from "@/components/Regular"; //正则组件
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import { listtag } from "@/api/system/label";
import store from "@/store";
@@ -689,7 +714,7 @@
export default {
  name: "questionnaire",
  dicts: ["sys_normal_disable", "sys_user_sex"],
  components: { Treeselect },
  components: { Treeselect, Regular },
  data() {
    return {
      topactiveName: "Local", //顶部选择
@@ -752,7 +777,7 @@
      dynamicTags: [],
      illnesslist: [],
      illnesslistapi: [],
      optionsillness: [],
     optionsillness: [],
      qyoptions: [],
      mode: [],
      optionstag: [],
@@ -762,11 +787,6 @@
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        userName: undefined,
        phonenumber: undefined,
        status: undefined,
        deptId: undefined,
        IDnumber: undefined,
      },
      // 表单校验
@@ -776,10 +796,12 @@
  watch: {
    // 根据名称筛选部门树
    sidecolumnval(val) {
      console.log(val);
      this.$refs.tree.filter(val);
    },
  },
  created() {
    // 初始化数据
    this.getList();
    this.gettabList();
    this.getDeptTree();
@@ -788,7 +810,6 @@
    this.languagelist = store.getters.languagelist;
    this.qyoptions = store.getters.usable;
  },
  methods: {
    /** 查询指标列表 */
    getList() {
@@ -801,13 +822,15 @@
      });
    },
    processElement(element) {
   processElement(element) {
      // 返回一个新的对象,将element对象的属性isoperation设置为1
      return { ...element, isoperation: 1 };
    },
    // 返回数组中指定元素的索引
    getIndexInArray(arr, obj) {
      // 返回数组中指定元素的索引
      return arr.indexOf(obj);
    },
    //删除分类
    deletefenlei(row) {
      if (this.deleteVisible) {
@@ -827,7 +850,7 @@
    // 疾病-----------------------
    illnessUpdate(row) {
      this.illnessVisible = true;
      this.indexid = row.targetID;
      this.indexid = row.id;
      this.illnesslistapi = [];
      const illnessqueryParams = {
        pageNum: 1,
@@ -837,7 +860,7 @@
        console.log(response);
        this.optionsillness = response.rows;
      });
      getillness({ outid: row.targetID, type: 1 }).then((res) => {
      getillness({ outid: row.id, type: 1 }).then((res) => {
        this.illnesslist = res.rows;
        console.log(res);
      });
@@ -849,7 +872,6 @@
      }
    },
    remoteMethod(value) {
      console.log(value);
      const illnessqueryParams = {
        pageNum: 1,
        pageSize: 100,
@@ -949,7 +971,7 @@
    addoption() {
      const objvakue = {
        guid: 1,
        targetid: this.indexform.targetid,
        id: this.indexform.id,
        targettype: this.indexform.targettype,
        targetvalue: "贫血",
        targetregex: "(?!不.*|没.*|未.*)^.*([贫平凭血]|贫血|评学|评学),10",
@@ -989,7 +1011,7 @@
          targetvalue: item.targetvalue,
          targetregex: item.targetregex,
          targetoptionid: item.targetoptionid,
          targetid: this.indexform.targetid,
          id: this.indexform.id,
          targettype: this.indexform.targettype,
          isoperation: item.targetoptionid ? 2 : 1,
          categoryName: item.categoryName,
@@ -1004,7 +1026,6 @@
    getDeptTree() {
      selectIvrLibaTargetAssortList({}).then((res) => {
        this.deptOptions = res.rows;
        console.log(res);
      });
    },
    // 筛选节点
@@ -1036,6 +1057,8 @@
      addtreeselectIvrLibaTargetAssort(this.classifyform).then((res) => {
        this.getDeptTree();
        this.$modal.msgSuccess("新增成功");
        this.classifyform = {};
        this.dialogFormVisible = false;
      });
    },
    remove(a, b) {
@@ -1082,7 +1105,7 @@
    reset() {
      this.indexform = {
        suitWay: undefined,
        targetID: undefined,
        id: undefined,
        targetdesc: undefined,
        baseTagList: [],
        targetoptionList: [],
@@ -1098,13 +1121,16 @@
    resetQuery() {
      this.dateRange = [];
      this.resetForm("queryForm");
      this.queryParams.deptId = undefined;
      this.queryParams={
        pageNum: 1,
        pageSize: 10,
      };
      this.$refs.tree.setCurrentKey(null);
      this.handleQuery();
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
      this.ids = selection.map((item) => item.targetID);
      this.ids = selection.map((item) => item.id);
      this.single = selection.length != 1;
      this.multiple = !selection.length;
    },
@@ -1161,7 +1187,7 @@
          this.targetoptionList
        );
        if (valid) {
          if (this.indexform.targetID != undefined) {
          if (this.indexform.id != undefined) {
            this.indexform.isoperation = 2;
            gettargetInfoedit(this.indexform).then((response) => {
              this.$modal.msgSuccess("修改成功");
@@ -1182,7 +1208,7 @@
    },
    /** 删除按钮操作 */
    handleDelete(row) {
      const userIds = row.targetID || this.ids;
      const userIds = row.id || this.ids;
      this.$modal
        .confirm('是否确认删除指标名称为"' + row.targetname + '"的数据项?')
        .then(function () {
@@ -1257,7 +1283,7 @@
  margin-top: 20px;
  margin: 20px;
  padding: 30px;
  background: #edf1f7;
  background: #fff;
  border: 1px solid #dcdfe6;
  -webkit-box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12),
    0 0 6px 0 rgba(0, 0, 0, 0.04);
@@ -1349,6 +1375,21 @@
  font-size: 20px;
  cursor: pointer;
}
::v-deep .el-tree{
  position: relative;
    cursor: default;
    border-radius: 5px;
    background: #EFF8FE;
    color: #606266;
  border: 1px solid #bbe1fa;
      // border: 1px solid #dcdfe6;
    -webkit-box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12), 0 0 6px 0 rgba(0, 0, 0, 0.04);
}
::v-deep .el-tree--highlight-current .el-tree-node.is-current > .el-tree-node__content {
    background-color: #7799FB ;
    color: #fff;
}
::v-deep .el-button--mini.is-circle {
  padding: 7px;
  margin: 0;