WXL
2024-09-03 a346cfbcb03a303dca252d910d2181f00e7adc20
src/views/repositoryai/verbaltrick/index.vue
@@ -4,7 +4,7 @@
    <div class="sidecolumn">
      <div class="sidecolumn-top">
        <div class="top-wj">问题类型</div>
        <div class="top-tj" @click="dialogFormVisible = true">+添加</div>
        <div class="top-tj" @click="Newcategory">+添加</div>
      </div>
      <div class="center-ss">
        <el-input
@@ -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>
@@ -57,48 +68,27 @@
              v-show="showSearch"
              label-width="98px"
            >
              <el-form-item label="可用院区" prop="status">
                <el-select v-model="queryParams.courtyard" placeholder="请选择">
                  <el-option
                    v-for="item in languagelist"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  >
                  </el-option>
                </el-select>
              </el-form-item>
              <el-form-item label="问题主题" prop="userName">
              <el-form-item label="问题标题" prop="scriptTopic">
                <el-input
                  v-model="queryParams.userName"
                  v-model="queryParams.scriptTopic"
                  placeholder="请输入"
                  clearable
                  style="width: 200px"
                  @keyup.enter.native="handleQuery"
                />
              </el-form-item>
              <el-form-item label="关联指标" prop="userName">
              <el-form-item label="关联指标" prop="targetname">
                <el-input
                  v-model="queryParams.userName"
                  v-model="queryParams.targetname"
                  placeholder="请输入"
                  clearable
                  style="width: 200px"
                  @keyup.enter.native="handleQuery"
                />
              </el-form-item>
              <el-form-item label="适用方式" prop="status">
                <el-select v-model="queryParams.applyway" placeholder="请选择">
                  <el-option
                    v-for="item in languagelist"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  >
                  </el-option>
                </el-select>
              </el-form-item>
              <el-form-item label="语言" prop="status">
                <el-select v-model="queryParams.status" placeholder="请选择">
                <el-select v-model="queryParams.language" placeholder="请选择">
                  <el-option
                    v-for="item in languagelist"
                    :key="item.value"
@@ -108,8 +98,11 @@
                  </el-option>
                </el-select>
              </el-form-item>
              <el-form-item label="是否可用" prop="status">
                <el-select v-model="queryParams.status" placeholder="请选择">
              <el-form-item label="是否可用" prop="isavailable">
                <el-select
                  v-model="queryParams.isavailable"
                  placeholder="请选择"
                >
                  <el-option
                    v-for="item in qyoptions"
                    :key="item.value"
@@ -170,30 +163,31 @@
              @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="问题主题"
                label="序号"
                fixed
                align="center"
                key="questiontitle"
                prop="questiontitle"
                key="id"
                prop="id"
              />
              <el-table-column
                label="问题标题"
                fixed
                align="center"
                key="scriptTopic"
                prop="scriptTopic"
                :show-overflow-tooltip="true"
              />
              <el-table-column
                label="问题文本"
                align="center"
                key="questiontext"
                prop="questiontext"
                key="scriptContent"
                prop="scriptContent"
                width="200"
                :show-overflow-tooltip="true"
              />
              <el-table-column
                label="问题语音"
                align="center"
                key="questionvoice"
                prop="questionvoice"
                width="200"
              /><el-table-column
             <el-table-column
                label="关联指标"
                align="center"
                key="targetname"
@@ -204,12 +198,12 @@
              /><el-table-column
                label="适用方式"
                align="center"
                key="application"
                prop="application"
                key="suitway"
                prop="suitway"
                width="120"
              >
                <template slot-scope="scope">
                  <dict-tag :options="mode" :value="scope.row.suitWay" />
                  <dict-tag :options="mode" :value="scope.row.suitway" />
                </template>
              </el-table-column>
              <el-table-column
@@ -266,6 +260,7 @@
              <el-table-column
                label="操作"
                fixed="right"
                align="center"
                width="250"
                class-name="small-padding fixed-width"
@@ -314,11 +309,11 @@
      </div>
    </div>
    <!-- 添加类别弹框 -->
    <el-dialog title="新增类别" width="30%" :visible.sync="dialogFormVisible">
    <el-dialog :title="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>
          <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>
@@ -343,7 +338,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>
@@ -395,6 +390,55 @@
        <el-button type="primary" @click="confirmillness">确 定</el-button>
      </span>
    </el-dialog>
    <!-- 随访题目预览 -->
    <el-dialog title="随访题目预览" :visible.sync="topicVisible" width="50%">
      <div class="preview-left">
        <div v-if="topicform.valueType == 1">
          <div class="dev-text">
            [单选]<span>{{ topicform.scriptContent }}</span>
          </div>
          <div class="dev-xx">
            <el-radio-group v-model="topicform.asrtext">
              <el-radio
                v-for="(
                  topicforms, index
                ) in topicform.ivrLibaScriptTargetoptionList"
                :key="topicforms.targetvalue"
                :label="topicforms.targetvalue"
                >{{ topicforms.targetvalue }}</el-radio
              >
            </el-radio-group>
          </div>
        </div>
        <div class="scriptTopic-dev" v-if="topicform.valueType == 2">
          <div class="dev-text">
            [多选]<span>{{ topicform.scriptContent }}</span>
          </div>
          <div class="dev-xx">
            <el-checkbox-group v-model="topicform.remark">
              <el-checkbox
                v-for="(
                  topicforms, index
                ) in topicform.ivrLibaScriptTargetoptionList"
                :key="topicforms.targetvalue"
                :label="topicforms.targetvalue"
                >{{ topicforms.targetvalue }}
              </el-checkbox>
            </el-checkbox-group>
          </div>
        </div>
        <div class="scriptTopic-dev" v-if="topicform.valueType == 3">
          <div class="dev-text">
            [填空]<span>{{ topicform.scriptContent }}</span>
          </div>
          <div class="dev-xx">
            <el-input placeholder="请输入答案" v-model="radioas" clearable>
            </el-input>
          </div>
        </div>
      </div>
    </el-dialog>
  </div>
</template>
@@ -402,8 +446,9 @@
import {
  getverbaltricklist,
  verbaltrickinfo,
  delverbaltrickinfo,
  getverbaltrick,
  delverbaltrickinfo,
  compileverbaltrickclassify,
  getillnesslist,
  illnesslistget,
  getillness,
@@ -437,9 +482,13 @@
      total: 0,
      namequestionnaire: "",
      haoquestionnaire: "",
      topicform: {
        scriptContent: "",
      },
      idds: "",
      amendtag: false, //是否修改类别
      dialogFormVisible: false, //修改添加类别弹框
      topicVisible: false, //预览弹框
      indexid: null,
      inputValue: "",
      inputVisible: false,
@@ -468,7 +517,7 @@
        },
      ],
      // 弹出层标题
      title: "",
      title: "新增类别",
      // 是否显示弹出层
      open: false,
      // 日期范围
@@ -487,7 +536,8 @@
      indexopen: false, //弹框展示否
      propss: { multiple: true },
      radio: "主分类",
      zufon: true,
      zifon: true,
      usable: [],
      mode: [],
@@ -523,7 +573,7 @@
      getverbaltricklist(this.queryParams).then((res) => {
        this.userList = res.rows;
        this.loading = false;
        this.total=res.total
        this.total = res.total;
      });
    },
@@ -575,7 +625,7 @@
    handleAdd() {
      this.$router.push({
        path: "/knowledge/verbaltrick/particulars/",
        query: { id: "" },
        query: { id: "", categoryid: this.queryParams.categoryid },
      });
    },
    // 分类树-----------------------------------------
@@ -589,12 +639,21 @@
    getDeptTree() {
      getbaltrickclassify({}).then((res) => {
        this.deptOptions = res.rows;
        console.log(res);
        this.dialogFormVisible = false;
      });
    },
    // 添加类别树
    submitsidecolumn() {
      if (this.classifyform.id) {
        compileverbaltrickclassify(this.classifyform).then((res) => {
          this.getDeptTree();
          this.$modal.msgSuccess("修改成功");
          this.classifyform = {};
          this.dialogFormVisible = false;
        });
        return;
      }
      let calssvalue = {};
      if (
        this.classifyform.pid &&
@@ -615,6 +674,8 @@
      addbaltrickclassify(this.classifyform).then((res) => {
        this.getDeptTree();
        this.$modal.msgSuccess("新增成功");
        this.classifyform = {};
        this.dialogFormVisible = false;
      });
    },
    remove(a, b) {
@@ -646,6 +707,27 @@
          .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;
    },
    Newcategory(){
      this.classifyform= {}, //类别表单
      this.radio = "主分类";
     this.dialogFormVisible = true
     this.zifon = true;
     this.zufon = true;
    },
    // 筛选节点
    filterNode(value, data) {
@@ -658,7 +740,13 @@
    },
    // 预览
    preview(row) {},
    preview(row) {
      getverbaltrick({ id: row.id }).then((res) => {
        this.topicform = res.data;
        console.log(this.topicform);
        this.topicVisible = true;
      });
    },
    // 疾病-----------------------
    illnessUpdate(row) {
      this.illnessVisible = true;
@@ -747,7 +835,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);
@@ -862,6 +950,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;
@@ -882,6 +988,28 @@
    font-size: 20px;
  }
}
.preview-left {
  margin: 20px;
  //   margin: 20px;
  padding: 30px;
  // background: #ffff;
  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);
  .dev-text {
    margin-bottom: 10px;
    text-align: left;
    font-size: 22px;
  }
  .scriptTopic-dev {
    margin-bottom: 25px;
    font-size: 20px !important;
    .dev-text {
      margin-bottom: 10px;
    }
  }
}
.button-text {
  color: rgb(70, 204, 238);
}