WXL (wul)
20 小时以前 d93ed5c5aadcf3d49f824339c26ebfac911be06d
src/views/knowledge/questionnaire/index.vue
@@ -3,8 +3,8 @@
    <!-- 左侧栏 -->
    <div class="sidecolumn">
      <div class="sidecolumn-top">
        <div class="top-wj">问卷类型</div>
        <div class="top-tj" @click="dialogFormVisible = true">+添加</div>
        <div class="top-wj">问卷分类</div>
        <div class="top-tj" @click="Newcategory">+添加</div>
      </div>
      <div class="center-ss">
        <el-input
@@ -28,7 +28,7 @@
          @node-click="handleNodeClick"
        >
          <span class="custom-tree-node" slot-scope="{ node, data }">
            <span>{{ node.label }}</span>
            <span class="tree-node-label">{{ node.label }}</span>
            <span v-if="data.id > 0">
              <el-button
                type="text"
@@ -94,7 +94,7 @@
                  </el-option>
                </el-select>
              </el-form-item>
              <el-form-item label="主要内容" prop="userName">
              <el-form-item label="问卷描述" prop="userName">
                <el-input
                  v-model="queryParams.description"
                  placeholder="请输入"
@@ -141,7 +141,6 @@
                  icon="el-icon-plus"
                  size="medium"
                  @click="handleAdd"
                  v-hasPermi="['system:user:add']"
                  >新增</el-button
                >
              </el-col>
@@ -154,7 +153,6 @@
                  size="medium"
                  :disabled="multiple"
                  @click="handleDelete"
                  v-hasPermi="['system:user:remove']"
                  >删除</el-button
                >
              </el-col>
@@ -182,16 +180,9 @@
                width="160"
                :show-overflow-tooltip="true"
              />
              <el-table-column
                label="版本"
                align="center"
                key="version"
                prop="version"
                :show-overflow-tooltip="true"
              />
              <el-table-column
                label="主要内容"
                label="问卷描述"
                align="center"
                key="description"
                prop="description"
@@ -207,7 +198,6 @@
                    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
@@ -261,7 +251,6 @@
                    size="medium"
                    type="text"
                    @click="goQRCode(scope.row)"
                    v-hasPermi="['system:user:edit']"
                  >
                    <span class="button-text"
                      ><i class="el-icon-edit"></i>预览</span
@@ -271,7 +260,6 @@
                    size="medium"
                    type="text"
                    @click="ViewQuestionnaire(scope.row)"
                    v-hasPermi="['system:user:edit']"
                    ><span class="button-textck"
                      ><i class="el-icon-edit"></i>查看</span
                    ></el-button
@@ -280,7 +268,6 @@
                    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
@@ -289,7 +276,6 @@
                    size="medium"
                    type="text"
                    @click="handleDelete(scope.row)"
                    v-hasPermi="['system:user:remove']"
                    ><span class="button-textsc"
                      ><i class="el-icon-edit"></i>删除</span
                    ></el-button
@@ -310,7 +296,7 @@
      </div>
    </div>
    <!-- 添加类别弹框 -->
    <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>
@@ -401,7 +387,7 @@
        </div>
      </div>
    </el-dialog> -->
    <!-- 问卷模版预览 -->
    <!-- 问卷模板预览 -->
    <el-dialog title="随访题目预览" :visible.sync="topicVisible" width="50%">
      <div class="preview-left">
        <!-- 单选 -->
@@ -525,7 +511,7 @@
      roleOptions: [],
      // 表单参数
      form: {},
      title: "类别编辑",
      sidecolumnform: {}, //添加类别表单
      goQRCodeVisible: false, //二维码弹框
      sidecolumnval: "", //类别搜索
@@ -539,6 +525,8 @@
      indexid: null,
      inputValue: "",
      radio: "主分类",
      zufon: true,
      zifon: true,
      inputVisible: false,
      illnessVisible: false, //指标疾病弹框
      deptOptions: [],
@@ -647,14 +635,14 @@
    /** 新增按钮操作 */
    handleAdd() {
      this.$router.push({
        path: "/knowledge/questionnaire/compilequer/",
        path: "/knowledge/questionnaireinfo/",
        query: { categoryid: this.queryParams.categoryid },
      });
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
      this.$router.push({
        path: "/knowledge/questionnaire/compilequer/",
        path: "/knowledge/questionnaireinfo/",
        query: { id: row.svyid },
      });
    },
@@ -817,11 +805,22 @@
      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;
    },
    // 筛选节点
@@ -830,6 +829,7 @@
      return data.name.indexOf(value) !== -1;
    },
    handleNodeClick(data) {
      if (data.svyLibTemplateCategoryList) return;
      this.queryParams.categoryid = data.id;
      this.getList();
    },
@@ -895,7 +895,7 @@
  display: flex;
}
.sidecolumn {
  width: 300px;
  width: 380px;
  min-height: 100vh;
  text-align: center;
  //   display: flex;
@@ -919,6 +919,22 @@
      cursor: pointer;
    }
  }
  /* 核心:设置固定宽度,超出部分显示省略号 */
  .tree-node-label {
    display: inline-block; /* 需要设置为行内块级元素才能设置宽度 */
    max-width: 160px; /* 最大宽度 */
    overflow: hidden;
    white-space: nowrap; /* 不换行 */
    text-overflow: ellipsis; /* 显示省略号 */
    vertical-align: bottom; /* 可选的,用于对齐 */
  }
  /* 可选:鼠标悬停时取消限制,显示全文(可能会撑开布局) */
  .custom-tree-node:hover .tree-node-label {
    max-width: none;
    white-space: normal;
    overflow: visible;
  }
  .center-ss {
    margin-top: 30px;
    .input-with-select {