WXL
2024-05-28 5c559f708ff934711d6417ae7909d919f6e3ebf6
src/views/repositoryai/templateku/index.vue
@@ -1,7 +1,7 @@
<template>
  <div class="Questionnairemanagement">
    <!-- 左侧栏 -->
    <div class="sidecolumn" v-show="topactiveName == 'Local'">
    <div class="sidecolumn">
      <div class="sidecolumn-top">
        <div class="top-wj">模版类型</div>
        <div class="top-tj" @click="dialogFormVisible = true">+添加</div>
@@ -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"
@@ -39,12 +39,23 @@
              >
              </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>
        </el-tree>
      </div>
    </div>
    <!-- 右侧数据 -->
    <div :class="topactiveName == 'Local' ? 'leftvlue' : 'leftvlues'">
    <div class="leftvlue">
      <div class="leftvlue-bg">
        <el-row :gutter="20">
          <!--用户数据-->
@@ -66,16 +77,21 @@
                  @keyup.enter.native="handleQuery"
                />
              </el-form-item>
              <el-form-item label="适用科室" prop="status">
                <el-select v-model="queryParams.status" placeholder="请选择">
                  <el-option
                    v-for="item in languagelist"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  >
                  </el-option>
                </el-select>
              <el-form-item label="适用科室" prop="region">
                <el-cascader
                  v-model="queryParams.administrative"
                  :options="deptList"
                  :props="props"
                  :show-all-levels="false"
                  clearable
                >
                  <template slot-scope="{ node, data }">
                    <span>{{ data.deptName }}</span>
                    <span v-if="!node.isLeaf">
                      ({{ data.children.length }})
                    </span>
                  </template>
                </el-cascader>
              </el-form-item>
              <el-form-item label="可用状态" prop="status">
                <el-select v-model="queryParams.status" placeholder="请选择">
@@ -157,16 +173,22 @@
            </el-row>
            <!-- 标准模版 -->
            <el-table
              v-if="topactiveName == 'Local'"
              v-loading="loading"
              :data="userList"
              :border="true"
              @selection-change="handleSelectionChange"
            >
              <el-table-column type="selection" width="50" align="center" />
              <el-table-column label="序号" align="center" key="id" prop="id" />
              <el-table-column
                label="序号"
                fixed
                align="center"
                key="id"
                prop="id"
              />
              <el-table-column
                label="模版名称"
                fixed
                align="center"
                key="templateName"
                prop="templateName"
@@ -202,22 +224,6 @@
              </el-table-column>
              <el-table-column
                label="适用科室"
                align="center"
                key="deptNames"
                prop="deptNames"
                width="120"
              >
                <template slot-scope="scope">
                  <div v-if="scope.row.deptNames">
                    <span v-for="item in scope.row.deptNames.split(",")"
                      >{{ item }}
                    </span>
                  </div>
                  <div v-else>''</div>
                </template>
              </el-table-column>
              <el-table-column
                label="标签"
                align="center"
                key="labelInfo"
@@ -225,15 +231,15 @@
                width="160"
                :show-overflow-tooltip="true"
              >
                <template slot-scope="scope" >
                <template slot-scope="scope">
                  <div v-if="scope.row.labelInfo">
                    <span v-for="item in JSON.parse(scope.row.labelInfo)"
                      >{{ item.tagname }}</span>
                    <span v-for="item in JSON.parse(scope.row.labelInfo)">{{
                      item.tagname
                    }}</span>
                  </div>
                  <div v-else>
                    <span>无</span>
                  </div>
                  </span>
                </template>
              </el-table-column>
              <el-table-column
@@ -244,9 +250,11 @@
                width="160"
                :show-overflow-tooltip="true"
              >
                <template slot-scope="scope"  >
                <template slot-scope="scope">
                  <div v-if="scope.row.campus">
                    <span v-for="item in JSON.parse(scope.row.campus)">{{ item.label }} </span>
                    <span v-for="item in scope.row.campus.split(',')"
                      >{{ item }}、
                    </span>
                  </div>
                  <div v-else>
                    <span>无</span>
@@ -290,6 +298,7 @@
              <el-table-column
                label="操作"
                fixed="right"
                align="center"
                width="200"
                class-name="small-padding fixed-width"
@@ -367,7 +376,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>
@@ -429,16 +438,19 @@
  getFollowupclassify,
  delFollowupclassify,
  addFollowupclassify,
  editFollowupclassify,
  addtargetillness,
  getvFollowup,
  compileFollowup,
  delFollowupinfo,
  getverbaltricklist,
  Followupinfo,
  getFollowuplist,
  getillnesslist,
  illnesslistget,
  getillness,
} from "@/api/AiCentre/index";
import { listDept } from "@/api/system/dept";
export default {
  name: "templateku",
  data() {
@@ -510,6 +522,8 @@
        children: "ivrLibaTemplateAssortList",
        label: "indexAssortName",
      },
      deptList: [],
      props: { multiple: true, value: "deptId", label: "deptName" },
      mode: [],
      languagelist: [],
      qyoptions: [],
@@ -538,6 +552,11 @@
        console.log(this.userList);
        this.userList = res.rows;
        this.total = res.total;
        console.log(this.userList[0].campus.split(","));
      });
      listDept({ pageNum: 1, pageSize: 10 }).then((response) => {
        this.deptList = this.handleTree(response.data, "deptId");
      });
    },
@@ -602,7 +621,12 @@
      this.multiple = !selection.length;
    },
    /** 新增按钮操作 */
    handleAdd() {},
    handleAdd() {
      this.$router.push({
        path: "/knowledge/templateku/configurat/",
        query: { id: null, assortid: this.queryParams.assortid },
      });
    },
    /** 删除按钮操作 */
    handleDelete(row) {
@@ -629,12 +653,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 &&
@@ -655,6 +688,8 @@
      addFollowupclassify(this.classifyform).then((res) => {
        this.getDeptTree();
        this.$modal.msgSuccess("新增成功");
        this.classifyform = {};
        this.dialogFormVisible = false;
      });
    },
    remove(a, b) {
@@ -685,6 +720,16 @@
          })
          .catch(() => {});
      }
    },
    altertag(a, b) {
      this.dialogFormVisible = true;
      if (!b.pid) {
        this.radio = "主分类";
      } else {
        this.radio = "子分类";
      }
      this.classifyform = b;
      this.dialogFormVisible = true;
    },
    // 筛选节点
@@ -783,8 +828,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);
@@ -929,6 +974,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;