WXL
2024-06-05 f488fea65d0c0e96fb3e3c3ec835e4f324d11caa
src/views/repositoryai/templateku/index.vue
@@ -29,7 +29,7 @@
        >
          <span class="custom-tree-node" slot-scope="{ node, data }">
            <span>{{ node.label }}</span>
            <span>
            <span v-if="data.id > 0">
              <el-button
                type="text"
                icon="el-icon-delete"
@@ -37,6 +37,17 @@
                size="mini"
                @click="() => remove(node, data)"
              >
              </el-button>
            </span>
            <span v-if="data.id > 0">
              <el-button
                type="text"
                circle
                size="mini"
                @click="() => altertag(node, data)"
                ><span class="button-textxg"
                  ><i class="el-icon-edit-outline"></i
                ></span>
              </el-button>
            </span>
          </span>
@@ -168,7 +179,13 @@
              @selection-change="handleSelectionChange"
            >
              <el-table-column type="selection" width="50" align="center" />
              <el-table-column label="序号" fixed align="center" key="id" prop="id" />
              <el-table-column
                label="序号"
                fixed
                align="center"
                key="id"
                prop="id"
              />
              <el-table-column
                label="模版名称"
                fixed
@@ -331,11 +348,16 @@
      </div>
    </div>
    <!-- 添加类别弹框 -->
    <el-dialog title="新增类别" width="30%" :visible.sync="dialogFormVisible">
    <el-dialog
      :title="title"
      width="30%"
      :close-on-click-modal="false"
      :visible.sync="dialogFormVisible"
    >
      <div style="text-align: center; margin-bottom: 20px">
        <el-radio-group v-model="radio">
          <el-radio-button label="主分类"></el-radio-button>
          <el-radio-button label="子分类"></el-radio-button>
          <el-radio-button label="主分类" v-show="zifon"></el-radio-button>
          <el-radio-button label="子分类" v-show="zufon"></el-radio-button>
        </el-radio-group>
      </div>
      <el-divider></el-divider>
@@ -359,7 +381,7 @@
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click="dialogFormVisible = false">取 消</el-button>
        <el-button @click="getDeptTree()">取 消</el-button>
        <el-button type="primary" @click="submitsidecolumn">确 定</el-button>
      </div>
    </el-dialog>
@@ -421,6 +443,7 @@
  getFollowupclassify,
  delFollowupclassify,
  addFollowupclassify,
  editFollowupclassify,
  addtargetillness,
  getvFollowup,
  compileFollowup,
@@ -463,7 +486,7 @@
      // 表格数据
      userList: [],
      // 弹出层标题
      title: "",
      title: "新增类别",
      // 是否显示弹出层
      open: false,
      // 日期范围
@@ -494,6 +517,8 @@
      indexid: null,
      inputValue: "",
      radio: "主分类",
      zufon: true,
      zifon: true,
      inputVisible: false,
      illnessVisible: false, //指标疾病弹框
      deptOptions: [],
@@ -520,6 +545,8 @@
  created() {
    this.getList();
    this.getDeptTree();
    this.zufon = true;
    this.zifon = true;
    this.mode = store.getters.mode;
    this.languagelist = store.getters.languagelist;
    this.qyoptions = store.getters.usable;
@@ -537,7 +564,7 @@
        console.log(this.userList[0].campus.split(","));
      });
      listDept(this.queryParams).then((response) => {
      listDept({ pageNum: 1, pageSize: 10 }).then((response) => {
        this.deptList = this.handleTree(response.data, "deptId");
      });
    },
@@ -603,7 +630,12 @@
      this.multiple = !selection.length;
    },
    /** 新增按钮操作 */
    handleAdd() {},
    handleAdd() {
      this.$router.push({
        path: "/knowledge/templateku/configurat/",
        query: { id: null, assortid: this.queryParams.assortid },
      });
    },
    /** 删除按钮操作 */
    handleDelete(row) {
@@ -630,12 +662,21 @@
    getDeptTree() {
      getFollowupclassify({}).then((res) => {
        this.deptOptions = res.rows;
        console.log(res);
        this.dialogFormVisible = false;
      });
    },
    // 添加类别树
    submitsidecolumn() {
      if (this.classifyform.id) {
        editFollowupclassify(this.classifyform).then((res) => {
          this.getDeptTree();
          this.$modal.msgSuccess("修改成功");
          this.classifyform = {};
          this.dialogFormVisible = false;
        });
        return;
      }
      let calssvalue = {};
      if (
        this.classifyform.pid &&
@@ -688,6 +729,20 @@
          })
          .catch(() => {});
      }
    },
    altertag(a, b) {
      this.dialogFormVisible = true;
      if (!b.pid) {
        this.radio = "主分类";
        this.title="修改主分类";
        this.zufon = false;
      } else {
        this.radio = "子分类";
        this.title="修改子分类";
        this.zifon = false;
      }
      this.classifyform = b;
      this.dialogFormVisible = true;
    },
    // 筛选节点
@@ -786,8 +841,8 @@
  //   display: flex;
  margin-top: 20px;
  margin: 20px;
  padding: 30px;
  background: #edf1f7;
  padding: 20px;
  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);
@@ -932,6 +987,24 @@
  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;