浏览代码

表格布局、添加删除、合并单元格

reaper 4 年之前
父节点
当前提交
a69e832f85

+ 1 - 0
.gitignore

@@ -1,6 +1,7 @@
 .DS_Store
 node_modules
 /dist
+vue.config.js
 
 # local env files
 .env.local

+ 2 - 1
package.json

@@ -11,7 +11,8 @@
     "js-md5": "^0.7.3",
     "quill-image-extend-module": "^1.1.2",
     "vue": "^2.5.17",
-    "vue-quill-editor": "^3.0.6"
+    "vue-quill-editor": "^3.0.6",
+    "vuex": "^3.6.2"
   },
   "eslintConfig": {
     "env": {

+ 300 - 0
src/components/knowledgeExtra/AddAssess/index.vue

@@ -0,0 +1,300 @@
+
+<style lang="less" scoped>
+.add_assess {
+  h5 {
+    margin-bottom: 20px;
+  }
+  .table_map {
+    .table_top_box {
+      display: flex;
+      align-items: center;
+    }
+    .move_btn {
+      font-size: 14px;
+      margin-left: 10px;
+    }
+  }
+  /deep/ .el-form-item--mini.el-form-item,
+  .el-form-item--small.el-form-item {
+    margin-bottom: 0;
+  }
+}
+</style>  
+<template>
+  <div class="add_assess">
+    <h5>*量表内容:</h5>
+    <el-form size="mini" :model="scaleData" ref="scaleFormRef">
+      <div
+        class="table_map"
+        v-for="(table, tableIndex) in scaleData.klScaleParent"
+        :key="tableIndex"
+      >
+        <div class="table_top_box">
+          <el-form-item label="标题:" label-width="100px">
+            <el-input v-model.trim="table.content" />
+          </el-form-item>
+          <el-form-item label="内容类型:" label-width="100px">
+            <el-select v-model="table.selectType" placeholder="请选择">
+              <el-option label="问题选项" :value="11"> </el-option>
+              <el-option label="概述文本" :value="12"> </el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="结果类型:" label-width="100px">
+            <el-radio-group v-model="table.resultType">
+              <el-radio :label="1">直接结果</el-radio>
+              <el-radio :label="2">记分结果</el-radio>
+            </el-radio-group>
+          </el-form-item>
+          <el-form-item label="系数:" label-width="100px">
+            <el-input v-model.trim="table.content" />
+          </el-form-item>
+          <el-form-item label="常数:" label-width="100px">
+            <el-input v-model.trim="table.content" />
+          </el-form-item>
+          <div class="move_btn">上移</div>
+          <div class="move_btn">上移</div>
+        </div>
+        <ScaleTable
+          :tableData="table.klScaleSaveGroup"
+          :tableIndex="tableIndex"
+          :tableResultType="table.resultType"
+          @CHANGE_FORM_DATA="CHANGE_FORM_DATA"
+          @CHANGE_TABLE_ROW="CHANGE_TABLE_ROW"
+        />
+      </div>
+    </el-form>
+  </div>
+</template>
+
+<script>
+import ScaleTable from "./scale-table.vue";
+const defaultDate = {
+  groupId: "0",
+  issueId: "0-0",
+  two_constant: "two-常数",
+  two_content: "two-问题内容",
+  two_factor: "two-系数",
+  two_orderNo: 0,
+  two_remark: "string",
+  two_resultType: 0,
+  two_ruleCode: "string",
+  two_score: 0,
+  two_selectType: "选择类型(1单选2多选)",
+  two_status: 0,
+  two_textType: 0,
+  content: "选项内容",
+  orderNo: 0,
+  pushInfo: "建议",
+  remark: "string",
+  result: "结果",
+  ruleCode: "string",
+  score: 0,
+  status: 0,
+  textType: 0
+};
+export default {
+  components: { ScaleTable },
+  data() {
+    return {
+      scaleData: {
+        conceptId: 0,
+        klScaleParent: [
+          {
+            constant: 0,
+            content: "string",
+            factor: 0,
+            klScaleSaveGroup: [
+              {
+                groupId: "1",
+                issueId: "1-1",
+                two_constant: "two-常数",
+                two_content: "two-问题内容",
+                two_factor: "two-系数",
+                two_orderNo: 0,
+                two_remark: "string",
+                two_resultType: 0,
+                two_ruleCode: "string",
+                two_score: 0,
+                two_selectType: "选择类型(1单选2多选)",
+                two_status: 0,
+                two_textType: 0,
+                content: "选项内容",
+                orderNo: 0,
+                pushInfo: "建议",
+                remark: "string",
+                result: "结果",
+                ruleCode: "string",
+                score: 0,
+                status: 0,
+                textType: 0
+              }
+            ],
+            orderNo: 0,
+
+            remark: "string",
+            resultType: 1,
+            ruleCode: "string",
+            score: 0,
+            status: 0,
+            textType: 0
+          },
+          {
+            constant: 0,
+            content: "string",
+            factor: 0,
+            klScaleSaveGroup: [
+              {
+                groupId: "1",
+                issueId: "1-1",
+                two_constant: "two-常数",
+                two_content: "two-问题内容",
+                two_factor: "two-系数",
+                two_orderNo: 0,
+                two_remark: "string",
+                two_resultType: 0,
+                two_ruleCode: "string",
+                two_score: 0,
+                two_selectType: "选择类型(1单选2多选)",
+                two_status: 0,
+                two_textType: 0,
+                content: "选项内容",
+                orderNo: 0,
+                pushInfo: "建议",
+                remark: "string",
+                result: "结果",
+                ruleCode: "string",
+                score: 0,
+                status: 0,
+                textType: 0
+              }
+            ],
+            orderNo: 0,
+
+            remark: "string",
+            resultType: 1,
+            ruleCode: "string",
+            score: 0,
+            status: 0,
+            textType: 0
+          }
+        ],
+        modifier: "string"
+      }
+    };
+  },
+  methods: {
+    /**
+     * 修改表格数据(添加、删除 :组、问题、选项)
+     * @param  type         类型:1/-1:新增/删除组; 2/-2:新增/删除问题; 3/-3:新增/删除选项
+     * @param  tableIndex   单个量表的index
+     * @param  rowIndex     表格 当前行的index
+     * @param  groupId      当前组id
+     * @param  issueId      当前问题id
+     */
+    CHANGE_TABLE_ROW(val) {
+      // 节流: 阻止用户频繁点击
+      if (this.timer) return;
+      this.timer = setTimeout(() => {
+        clearTimeout(this.timer);
+        this.timer = null;
+      }, 500);
+      const { type, tableIndex, rowIndex, groupId, issueId } = val;
+      const child = { ...defaultDate };
+      switch (type) {
+        case 1: //type 1: 添加组
+          // 设置新的 groupId、issueId
+          child.groupId = new Date().valueOf().toString();
+          child.issueId = child.groupId + "-" + new Date().valueOf();
+          // 使用当前的组id(groupId)  找到最后一个groupId为当前groupId的索引;
+          let groupIndex;
+          this.scaleData.klScaleParent[tableIndex].klScaleSaveGroup.forEach(
+            (item, i) => {
+              if (item.groupId === groupId) {
+                groupIndex = i;
+              }
+            }
+          );
+          // 将新的组插入到当前组后边
+          this.scaleData.klScaleParent[tableIndex].klScaleSaveGroup.splice(
+            groupIndex + 1,
+            0,
+            child
+          );
+          break;
+        case 2: //type 2: 添加问题
+          // 设置新的 groupId(相同的组id)、issueId
+          child.groupId = groupId;
+          child.issueId = child.groupId + "-" + new Date().valueOf();
+          let issueIndex;
+          // 使用当前的组id(issueId)  找到最后一个issueId为当前issueId的索引;
+          this.scaleData.klScaleParent[tableIndex].klScaleSaveGroup.forEach(
+            (item, i) => {
+              if (item.issueId === issueId) {
+                issueIndex = i;
+              }
+            }
+          );
+          // 将新的组插入到当前组后边
+          this.scaleData.klScaleParent[tableIndex].klScaleSaveGroup.splice(
+            issueIndex + 1,
+            0,
+            child
+          );
+          break;
+        case 3: //type 3: 添加选项
+          // 设置新的 groupId(相同的组id)、issueId(相同的组问题id)
+          child.groupId = groupId;
+          child.issueId = issueId;
+          // 将新的组插入到当前组后边
+          this.scaleData.klScaleParent[tableIndex].klScaleSaveGroup.splice(
+            rowIndex + 1,
+            0,
+            child
+          );
+          break;
+        case -1: //type -1: 删除组 => 删除所有组id为当前组id的数据
+          const newTableBygroupId = this.scaleData.klScaleParent[
+            tableIndex
+          ].klScaleSaveGroup.filter((item) => item.groupId !== groupId);
+          this.$set(
+            this.scaleData.klScaleParent[tableIndex],
+            "klScaleSaveGroup",
+            newTableBygroupId
+          );
+          break;
+        case -2: //type -2: 删除问题 => 删除所有问题id为当前问题id的数据
+          const newTableByissueId = this.scaleData.klScaleParent[
+            tableIndex
+          ].klScaleSaveGroup.filter((item) => item.issueId !== issueId);
+          this.$set(
+            this.scaleData.klScaleParent[tableIndex],
+            "klScaleSaveGroup",
+            newTableByissueId
+          );
+          break;
+        case -3: //type -3: 删除选项
+          this.$delete(
+            this.scaleData.klScaleParent[tableIndex].klScaleSaveGroup,
+            rowIndex
+          );
+          break;
+      }
+    },
+    CHANGE_FORM_DATA(tableIndex, rowIndex, name, val) {
+      this.$set(
+        this.scaleData.klScaleParent[tableIndex].klScaleSaveGroup[rowIndex],
+        name,
+        val
+      );
+    }
+  },
+  watch: {
+    scaleData: {
+      handler() {
+        console.log("监听");
+      },
+      deep: true
+    }
+  }
+};
+</script>

+ 457 - 0
src/components/knowledgeExtra/AddAssess/scale-table.vue

@@ -0,0 +1,457 @@
+
+<style lang="less" scoped>
+.scaleTable {
+  .btn_box {
+    width: 100%;
+    height: 100%;
+    display: flex;
+    align-items: center;
+    justify-content: space-around;
+    .btn_div {
+      flex: 1;
+      display: flex;
+      align-items: center;
+      justify-content: center;
+    }
+    img {
+      width: 16px;
+      height: 16px;
+      cursor: pointer;
+    }
+  }
+  .table_select_btn {
+    display: flex;
+    flex-direction: column;
+    justify-content: center;
+    align-items: center;
+    /deep/ .el-button--text {
+      padding: 3px 0;
+      margin: 0;
+    }
+  }
+  /deep/.el-input--mini .el-input__inner {
+    width: 100%;
+  }
+  /deep/.el-table th {
+    padding: 2px 0;
+  }
+}
+</style>
+<template>
+  <div class="scaleTable" :id="`scaleTableRef[${tableIndex}]`">
+    <el-table
+      v-if="tableShow"
+      :data="tableData"
+      header-row-class-name="header_row_class_name"
+      border
+      style="width: 100%; margin: 20px 0"
+      :span-method="objectSpanMethod"
+      :ref="`scaleTableRef[${tableIndex}]`"
+    >
+      <el-table-column prop="issueId" label="组" width="70px">
+        <template slot-scope="scope">
+          <div class="btn_box">
+            <div class="btn_div">
+              <img
+                @click="
+                  $emit('CHANGE_TABLE_ROW', {
+                    type: 1,
+                    tableIndex,
+                    rowIndex: scope.$index,
+                    groupId: scope.row.groupId
+                  })
+                "
+                src="../../../images/add-new-rule-sub.png"
+                alt=""
+              />
+            </div>
+            <div
+              class="btn_div"
+              v-if="imposeRestrictionsRemoveOnGroup(scope.row.groupId)"
+            >
+              <img
+                @click="
+                  $emit('CHANGE_TABLE_ROW', {
+                    type: -1,
+                    tableIndex,
+                    groupId: scope.row.groupId
+                  })
+                "
+                src="../../../images/add-new-rule-del.png"
+                alt=""
+              />
+            </div>
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column prop="groupId" label="问题" width="70px">
+        <template slot-scope="scope">
+          <div class="btn_box">
+            <div class="btn_div">
+              <img
+                @click="
+                  $emit('CHANGE_TABLE_ROW', {
+                    type: 2,
+                    tableIndex,
+                    rowIndex: scope.$index,
+                    groupId: scope.row.groupId,
+                    issueId: scope.row.issueId
+                  })
+                "
+                src="../../../images/add-new-rule-sub.png"
+                alt=""
+              />
+            </div>
+            <div
+              class="btn_div"
+              v-if="imposeRestrictionsRemoveOnIssue(scope.row.groupId)"
+            >
+              <img
+                @click="
+                  $emit('CHANGE_TABLE_ROW', {
+                    type: -2,
+                    tableIndex,
+                    issueId: scope.row.issueId
+                  })
+                "
+                src="../../../images/add-new-rule-del.png"
+                alt=""
+              />
+            </div>
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column prop="two_selectType" label="选择" width="70px">
+        <template slot-scope="scope">
+          <div class="table_select_btn">
+            <el-button
+              @click="handleSelectTypeBtn(scope.$index, 1)"
+              :style="scope.row.two_selectType != 1 ? { color: '#999' } : ''"
+              type="text"
+              >单选</el-button
+            >
+            <el-button
+              :style="scope.row.two_selectType != 2 ? { color: '#999' } : ''"
+              @click="handleSelectTypeBtn(scope.$index, 2)"
+              type="text"
+              >多选</el-button
+            >
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column
+        prop="two_content"
+        label="问题内容"
+        :width="tableResultType === 1 ? '140px' : ''"
+      >
+        <template slot-scope="scope">
+          <el-form-item>
+            <el-input
+              type="text"
+              v-model="scope.row.two_content"
+              clearable
+              placeholder="请输入"
+            ></el-input>
+          </el-form-item>
+        </template>
+      </el-table-column>
+      <el-table-column
+        prop="two_factor"
+        label="系数"
+        width="70px"
+        v-if="tableResultType === 2"
+      >
+        <template slot-scope="scope">
+          <el-form-item>
+            <el-input
+              type="text"
+              v-model="scope.row.two_factor"
+              clearable
+              placeholder="请输入"
+            ></el-input>
+          </el-form-item>
+        </template>
+      </el-table-column>
+      <el-table-column
+        prop="two_constant"
+        label="常数"
+        width="70px"
+        v-if="tableResultType === 2"
+      >
+        <template slot-scope="scope">
+          <el-form-item>
+            <el-input
+              type="text"
+              v-model="scope.row.two_constant"
+              clearable
+              placeholder="请输入"
+            ></el-input>
+          </el-form-item>
+        </template>
+      </el-table-column>
+      <el-table-column prop="issueId" label="选项个数" width="80px">
+        <template slot-scope="scope">
+          <div>
+            {{ optionLength(scope.row.issueId) }}
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column prop="orderNo" label="选项" width="70px">
+        <template slot-scope="scope">
+          <div class="btn_box">
+            <div class="btn_div">
+              <img
+                @click="
+                  $emit('CHANGE_TABLE_ROW', {
+                    type: 3,
+                    tableIndex,
+                    rowIndex: scope.$index,
+                    groupId: scope.row.groupId,
+                    issueId: scope.row.issueId
+                  })
+                "
+                src="../../../images/add-new-rule-sub.png"
+                alt=""
+              />
+            </div>
+            <div
+              class="btn_div"
+              v-if="imposeRestrictionsRemoveOnOption(scope.row.issueId)"
+            >
+              <img
+                @click="
+                  $emit('CHANGE_TABLE_ROW', {
+                    type: -3,
+                    tableIndex,
+                    rowIndex: scope.$index
+                  })
+                "
+                src="../../../images/add-new-rule-del.png"
+                alt=""
+              />
+            </div>
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column
+        prop="content"
+        label="选项内容"
+        :width="tableResultType === 1 ? '140px' : ''"
+      >
+        <template slot-scope="scope">
+          <el-form-item>
+            <el-input
+              type="text"
+              v-model="scope.row.content"
+              clearable
+              placeholder="请输入"
+            ></el-input>
+          </el-form-item>
+        </template>
+      </el-table-column>
+      <el-table-column prop="content" label="分值" v-if="tableResultType === 2">
+        <template slot-scope="scope">
+          <el-form-item>
+            <el-input
+              type="text"
+              v-model="scope.row.content"
+              clearable
+              placeholder="请输入"
+            ></el-input>
+          </el-form-item>
+        </template>
+      </el-table-column>
+      <el-table-column
+        prop="result"
+        label="结果"
+        width="100px"
+        v-if="tableResultType === 1"
+      >
+        <template slot-scope="scope">
+          <el-form-item>
+            <el-input
+              type="text"
+              v-model="scope.row.result"
+              clearable
+              placeholder="请输入"
+            ></el-input>
+          </el-form-item>
+        </template>
+      </el-table-column>
+      <el-table-column
+        prop="pushInfo"
+        label="建议"
+        v-if="tableResultType === 1"
+      >
+      </el-table-column>
+    </el-table>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "scaleTable",
+  data() {
+    return {
+      tableShow: true
+    };
+  },
+  methods: {
+    addGroup() {},
+    // 单选、多选
+    handleSelectTypeBtn(index, type) {
+      this.$emit(
+        "CHANGE_FORM_DATA",
+        this.tableIndex,
+        index,
+        "two_selectType",
+        type
+      );
+    },
+    // 计算表格选项内容的值
+    optionLength(val) {
+      if (val) {
+        const accordWithThis = this.tableData.filter(
+          (item) => item.issueId === val
+        );
+        return accordWithThis.length ? accordWithThis.length : 0;
+      }
+    },
+    // 表格合并单元格逻辑
+    getSpanArr(data) {
+      this.spanArr = [];
+      this.spanArr1 = [];
+      for (var i = 0; i < data.length; i++) {
+        if (i === 0) {
+          // 如果是第一条记录(即索引是0的时候),向数组中加入1
+          /** *
+           * 例子:
+           * name:1
+           * name:1
+           * name:2
+           * name:2
+           * 最终结果:spanArr = [2,0,2,0]
+           */
+          this.spanArr.push(1);
+          this.pos = 0;
+          this.spanArr1.push(1);
+          this.pos1 = 0;
+        } else {
+          if (data[i].groupId === data[i - 1].groupId) {
+            // 如果remark相等就累加,并且push 0
+            this.spanArr[this.pos] += 1;
+            this.spanArr.push(0);
+          } else {
+            // 不相等push 1,并且pos 要换成当前下标
+            this.spanArr.push(1);
+            this.pos = i;
+          }
+
+          if (data[i].issueId === data[i - 1].issueId) {
+            // 如果remark相等就累加,并且push 0
+            this.spanArr1[this.pos1] += 1;
+            this.spanArr1.push(0);
+          } else {
+            // 不相等push 1,并且pos 要换成当前下标
+            this.spanArr1.push(1);
+            this.pos1 = i;
+          }
+        }
+      }
+    },
+    objectSpanMethod({ row, column, rowIndex, columnIndex }) {
+      if (columnIndex == 0) {
+        const _row = this.spanArr[rowIndex];
+        const _col = _row > 0 ? 1 : 0;
+        return {
+          rowspan: _row,
+          colspan: _col
+        };
+      } else if (
+        column.label == "问题" ||
+        column.label == "选择" ||
+        column.label == "问题内容" ||
+        column.label == "系数" ||
+        column.label == "常数" ||
+        column.label == "选项个数"
+      ) {
+        const _row = this.spanArr1[rowIndex];
+        const _col = _row > 0 ? 1 : 0;
+        return {
+          rowspan: _row,
+          colspan: _col
+        };
+      }
+    },
+    // 删除组限制:剩余一组时隐藏删除按钮
+    imposeRestrictionsRemoveOnGroup(groupId) {
+      // 查找有没有其他组存在 如果为0的话则不存在
+      const otherGroupLength = this.tableData.filter(
+        (item) => item.groupId !== groupId
+      ).length;
+      return otherGroupLength;
+    },
+    // 删除问题限制:该组剩余一个问题时隐藏删除按钮
+    imposeRestrictionsRemoveOnIssue(groupId) {
+      // 查找同组的问题,如果只有一个问题则隐藏删除按钮
+      const thisIssueBygroupLenth = this.tableData.filter(
+        (item) => item.groupId === groupId
+      ).length;
+      if (thisIssueBygroupLenth > 1) {
+        return true;
+      }
+      return false;
+    },
+    // 删除选项限制:该问题剩余一个选项时隐藏删除按钮
+    imposeRestrictionsRemoveOnOption(issueId) {
+      // 查找同组的问题,如果只有一个问题则隐藏删除按钮
+      const thisOptionByissueIdLenth = this.tableData.filter(
+        (item) => item.issueId === issueId
+      ).length;
+      if (thisOptionByissueIdLenth > 1) {
+        return true;
+      }
+      return false;
+    }
+  },
+  created() {
+    this.getSpanArr(this.tableData);
+  },
+  watch: {
+    tableData: {
+      handler() {
+        this.getSpanArr(this.tableData);
+      },
+      deep: true
+    },
+    tableResultType() {
+      // this.$nextTick(() => {
+      //   console.log(this.$refs[`scaleTableRef[${this.tableIndex}]`]);
+      //   console.log(
+      //     document.getElementById(`scaleTableRef[${this.tableIndex}]`).offsetHeight
+      //   );
+      // });
+
+      // this.$refs[`scaleTableRef[${this.tableIndex}]`].doLayout();
+      this.tableShow = false;
+
+      setTimeout(() => {
+        // this.$refs[`scaleTableRef[${this.tableIndex}]`].doLayout();
+        this.tableShow = true;
+      });
+    }
+  },
+  props: {
+    tableData: {
+      default: []
+    },
+    tableIndex: {
+      required: true
+    },
+    tableResultType: {
+      required: true,
+      default: 1
+    }
+  }
+};
+</script>

+ 267 - 209
src/components/knowledgeExtra/AddDevKnow.vue

@@ -2,104 +2,154 @@
   <el-scrollbar style="height: 100%" ref="elscrollbar" id="message-container">
     <div class="NoiseTemplateWrapper TemplateWrapper knowledgeWrapper">
       <crumbs
-        :title="'医学术语静态知识维护-'+title"
+        :title="'医学术语静态知识维护-' + title"
         class="topBack"
         :param="$route.params"
         linkTo="StaticInfo"
       ></crumbs>
-      <div class="info-container">
-        <el-form :rules="rules" :model="form" label-width="160px" ref="groups">
-          <el-form-item v-if="!isEdit" label="选择标准术语:" prop="selectedTerm">
-            <el-select
-              v-model="form.selectedTerm"
-              filterable
-              remote
-              clearable
-              :loading="showDrop"
-              loading-text="加载中..."
-              @change="changeWord"
-              @visible-change="handleVisible"
-              value-key="id"
-              @clear="handleClear"
-              ref="termName"
-              placeholder="搜索"
-              :remote-method="searchTerms"
+      <el-tabs
+        style="margin: 70px 20px -20px 20px; background: #fff; padding: 0 15px"
+        v-model="tabActive"
+      >
+        <el-tab-pane label="静态知识" name="one">
+          <div class="info-container">
+            <el-form
+              :rules="rules"
+              :model="form"
+              label-width="160px"
+              ref="groups"
             >
-              <el-option
-                v-for="(term,idx) in terms"
-                :key="idx"
-                :label="term.name+(term.typeName?'('+term.typeName+')':'')"
-                :value="term"
-                :title="term.name+(term.typeName?'('+term.typeName+')':'')"
-              ></el-option>
-            </el-select>
-          </el-form-item>
-          <el-form-item label="已选择标准术语:" label-width="160px">{{form.selectedTermName}}</el-form-item>
-          <el-form-item
-            v-if="form.selectedTerm&&(form.typeId==1||form.typeId==3||form.typeId==4||form.typeId==5||form.typeId==6)"
-            :label="titleChange"
-            prop="titleChange"
-            label-width="160px"
-          >
-            <el-input v-model="form.titleChange"></el-input>
-          </el-form-item>
-          <p class="line"></p>
-          <DevInfo
-            v-for="(f,i) in form.prags"
-            v-if="!upload"
-            :key="(i+1)*10000 + showType"
-            :data="f"
-            :index="i"
-            :total="form.prags.length"
-            :isEdit="isEdit"
-            :isCopy="isCopy"
-            ref="subForm"
-            @add="addParagraph(i)"
-            @del="delParagraph"
-            @reOrder="reOrder"
-            :showType="showType"
-          ></DevInfo>
-          <el-form-item v-if="upload" label="标题名称搜索:" prop="fileTitle" label-width="160px">
-            <el-input v-model="form.fileTitle"></el-input>
-          </el-form-item>
-          <el-form-item
-            v-if="upload"
-            label="上传文件:"
-            ref="upload"
-            prop="fileList"
-            label-width="160px"
-          >
-            <el-upload
-              @mouseenter.native="handleMouseenter"
-              @mouseleave.native="handleMouseleave"
-              class="upload-demo"
-              :action="config.urls.promptServer"
-              name="upfile"
-              :multiple="false"
-              :limit="1"
-              :on-preview="handlePreview"
-              :on-remove="handleRemove"
-              :before-upload="handleBeforeUpLoad"
-              :before-remove="beforeRemove"
-              :on-change="handleChange"
-              :on-success="handleSuccess"
-              :show-file-list="showFileList"
-              :file-list="form.fileList"
-            >
-              <el-button size="small" type="primary" v-if="showUpLoad">点击上传</el-button>
-              <!-- <div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div> -->
-            </el-upload>
-            <span class="tipInfo" v-show="isShowTip">{{form.fileList[0]&&form.fileList[0].name}}</span>
-            <!-- <el-button size="small" type="primary" >点击上传</el-button> -->
-          </el-form-item>
-          <el-form-item label-width="160px">
-            <div class="uploadInfo" v-if="isSuccessUpload===1">文件上传中,请稍等...</div>
-          </el-form-item>
-        </el-form>
-        <div class="btn">
-          <el-button type="primary" :disabled="saveDisable" @click="submitForm">确 定</el-button>
-        </div>
-      </div>
+              <el-form-item
+                v-if="!isEdit"
+                label="选择标准术语:"
+                prop="selectedTerm"
+              >
+                <el-select
+                  v-model="form.selectedTerm"
+                  filterable
+                  remote
+                  clearable
+                  :loading="showDrop"
+                  loading-text="加载中..."
+                  @change="changeWord"
+                  @visible-change="handleVisible"
+                  value-key="id"
+                  @clear="handleClear"
+                  ref="termName"
+                  placeholder="搜索"
+                  :remote-method="searchTerms"
+                >
+                  <el-option
+                    v-for="(term, idx) in terms"
+                    :key="idx"
+                    :label="
+                      term.name +
+                      (term.typeName ? '(' + term.typeName + ')' : '')
+                    "
+                    :value="term"
+                    :title="
+                      term.name +
+                      (term.typeName ? '(' + term.typeName + ')' : '')
+                    "
+                  ></el-option>
+                </el-select>
+              </el-form-item>
+              <el-form-item label="已选择标准术语:" label-width="160px">{{
+                form.selectedTermName
+              }}</el-form-item>
+              <el-form-item
+                v-if="
+                  form.selectedTerm &&
+                  (form.typeId == 1 ||
+                    form.typeId == 3 ||
+                    form.typeId == 4 ||
+                    form.typeId == 5 ||
+                    form.typeId == 6)
+                "
+                :label="titleChange"
+                prop="titleChange"
+                label-width="160px"
+              >
+                <el-input v-model="form.titleChange"></el-input>
+              </el-form-item>
+              <p class="line"></p>
+              <DevInfo
+                v-for="(f, i) in form.prags"
+                v-if="!upload"
+                :key="(i + 1) * 10000 + showType"
+                :data="f"
+                :index="i"
+                :total="form.prags.length"
+                :isEdit="isEdit"
+                :isCopy="isCopy"
+                ref="subForm"
+                @add="addParagraph(i)"
+                @del="delParagraph"
+                @reOrder="reOrder"
+                :showType="showType"
+              ></DevInfo>
+              <el-form-item
+                v-if="upload"
+                label="标题名称搜索:"
+                prop="fileTitle"
+                label-width="160px"
+              >
+                <el-input v-model="form.fileTitle"></el-input>
+              </el-form-item>
+              <el-form-item
+                v-if="upload"
+                label="上传文件:"
+                ref="upload"
+                prop="fileList"
+                label-width="160px"
+              >
+                <el-upload
+                  @mouseenter.native="handleMouseenter"
+                  @mouseleave.native="handleMouseleave"
+                  class="upload-demo"
+                  :action="config.urls.promptServer"
+                  name="upfile"
+                  :multiple="false"
+                  :limit="1"
+                  :on-preview="handlePreview"
+                  :on-remove="handleRemove"
+                  :before-upload="handleBeforeUpLoad"
+                  :before-remove="beforeRemove"
+                  :on-change="handleChange"
+                  :on-success="handleSuccess"
+                  :show-file-list="showFileList"
+                  :file-list="form.fileList"
+                >
+                  <el-button size="small" type="primary" v-if="showUpLoad"
+                    >点击上传</el-button
+                  >
+                  <!-- <div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div> -->
+                </el-upload>
+                <span class="tipInfo" v-show="isShowTip">{{
+                  form.fileList[0] && form.fileList[0].name
+                }}</span>
+                <!-- <el-button size="small" type="primary" >点击上传</el-button> -->
+              </el-form-item>
+              <el-form-item label-width="160px">
+                <div class="uploadInfo" v-if="isSuccessUpload === 1">
+                  文件上传中,请稍等...
+                </div>
+              </el-form-item>
+            </el-form>
+            <div class="btn">
+              <el-button
+                type="primary"
+                :disabled="saveDisable"
+                @click="submitForm"
+                >确 定</el-button
+              >
+            </div>
+          </div>
+        </el-tab-pane>
+        <el-tab-pane label="评估内容" name="two">
+          <AddAssess />
+        </el-tab-pane>
+      </el-tabs>
     </div>
   </el-scrollbar>
 </template>
@@ -107,68 +157,70 @@
 /**
  *
  */
-import api from '@api/knowledgeTree.js';
-import DevInfo from './DevInfo';
-import config from '@api/config';
-import $ from 'jquery';
+import api from "@api/knowledgeTree.js";
+import DevInfo from "./DevInfo";
+import config from "@api/config";
+import $ from "jquery";
+import AddAssess from "./AddAssess";
 
 export default {
-  name: 'AddDevKnow',
+  name: "AddDevKnow",
   components: {
-    DevInfo
+    DevInfo,
+    AddAssess
   },
   data() {
     return {
       isFixedTop: true,
       isEdit: false,
       isCopy: false,
-      title: '添加',
+      title: "添加",
       termTypes: [],
       terms: [], //术语列表
       form: {
-        conceptId: '', //术语id
+        conceptId: "", //术语id
         isTip: 0, //是否要覆盖,0不覆盖,1覆盖
-        selectedTerm: '', //术语标签
-        termType: '',
-        typeId: '',
-        selectedTermName: '',
-        selectedTermType: '',
+        selectedTerm: "", //术语标签
+        termType: "",
+        typeId: "",
+        selectedTermName: "",
+        selectedTermType: "",
         // titleChange: '',
         fileList: [],
-        name: '',
+        name: "",
         prags: [
           {
             //单个段落相关
-            title: '',
-            content: '',
+            title: "",
+            content: "",
             isReason: 0,
             orderNo: 0,
             position: [],
-            text: ''
+            text: ""
           }
         ],
-        fileTitle: '',
-        titleChange: ''
+        fileTitle: "",
+        titleChange: ""
       },
       rules: {
         selectedTerm: [
-          { required: true, message: '请选择标准术语', trigger: 'change' }
+          { required: true, message: "请选择标准术语", trigger: "change" }
         ],
         fileTitle: [
-          { required: true, message: '请输入标题名称', trigger: 'change' },
+          { required: true, message: "请输入标题名称", trigger: "change" },
           {
             validator: (rule, value, callback) => {
               if (value.trim().length > 30) {
-                callback(new Error('标题名称不能超过30字'));
+                callback(new Error("标题名称不能超过30字"));
               } else {
                 callback();
               }
             },
-            trigger: 'change'
+            trigger: "change"
           }
         ],
         fileList: [
-          { required: true, message: '请上传文件', trigger: 'change' }
+          { required: true, message: "请上传文件", trigger: "change" }
         ],
         titleChange: [
           // {
@@ -183,7 +235,7 @@ export default {
           //   },
           //   trigger: 'change'
           // },
-          { max: 30, message: '标题最多30字', trigger: 'change' }
+          { max: 30, message: "标题最多30字", trigger: "change" }
         ]
       },
       saveDisable: false, //保存按钮禁止点击
@@ -198,14 +250,15 @@ export default {
       showType: -1, // 1 诊断  2  药品   3检验套餐 4检验细项  5检查 6检查子   7手术和操作 8量表
       editCount: -1, // 页面会否被编辑 >0被编辑   =0 未编辑
       startCount: -1,
-      isSaveSuccess: false // 是否保存成功
+      isSaveSuccess: false, // 是否保存成功
+      tabActive: "two"
     };
   },
   watch: {
     showType: {
       handler(newVal, oldVal) {
         if (newVal !== oldVal) {
-          this.form.prags = this.form.prags.map(item => {
+          this.form.prags = this.form.prags.map((item) => {
             return { ...item, position: [] };
           });
         }
@@ -219,13 +272,13 @@ export default {
       immediate: true
     }
   },
-  created: function() {
+  created: function () {
     const { isEdit, data, isCopy } = this.$route.params;
     if (isEdit || isCopy) {
       this.showType = data.type; // 编辑页确认显示类型
       this.isEdit = isEdit;
       this.isCopy = isCopy;
-      this.title = isEdit ? '修改' : isCopy ? '复制' : '添加';
+      this.title = isEdit ? "修改" : isCopy ? "复制" : "添加";
       (isEdit || isCopy) && this.changeWord(data);
       if (isCopy) {
         const _this = this;
@@ -233,15 +286,16 @@ export default {
           _this.handleClear();
         }, 300);
       }
-      api.getBaseRecordById({ id: data.id })
-        .then(res => {
-          if (res.data.code == '0') {
+      api
+        .getBaseRecordById({ id: data.id })
+        .then((res) => {
+          if (res.data.code == "0") {
             const data = res.data.data;
             if (this.form.typeId === 82 || this.form.typeId === 83) {
               // console.log('data',data)
               this.form.fileList =
                 data &&
-                data.map(it => {
+                data.map((it) => {
                   return JSON.parse(it.content);
                 });
               this.showFileList = true;
@@ -258,14 +312,14 @@ export default {
                     data.type == 5 ||
                     data.type == 6
                   ? data.noticeName
-                  : '';
+                  : "";
               this.form.selectedTermName =
-                data.name + (data.typeName ? '(' + data.typeName + ')' : '');
+                data.name + (data.typeName ? "(" + data.typeName + ")" : "");
               this.form.selectedTerm =
-                data.name + (data.typeName ? '(' + data.typeName + ')' : '');
+                data.name + (data.typeName ? "(" + data.typeName + ")" : "");
               this.form.prags =
                 data &&
-                data.details.map(it => {
+                data.details.map((it) => {
                   return {
                     title: it.title,
                     position: this.mapStringToNum(it.contentType),
@@ -281,8 +335,8 @@ export default {
             }
           }
         })
-        .catch(error => {
-          if (error.code === '900010001') {
+        .catch((error) => {
+          if (error.code === "900010001") {
             return false;
           }
           console.log(error);
@@ -322,12 +376,12 @@ export default {
     // }
 
     if (this.startCount !== this.editCount && !this.isSaveSuccess) {
-      this.$alert('还有未保存的内容,确定要退出当前页面吗?', '提示', {
-        confirmButtonText: '确定',
+      this.$alert("还有未保存的内容,确定要退出当前页面吗?", "提示", {
+        confirmButtonText: "确定",
         // cancelButtonText: '取消',
         // cancelButtonClass: 'leaveBtn',
         // customClass: 'leaveBox',
-        type: 'warning'
+        type: "warning"
       })
         .then(() => {
           next();
@@ -339,9 +393,9 @@ export default {
   },
   methods: {
     handleClear() {
-      this.form.selectedTermName = '';
-      this.form.selectedTerm = '';
-      this.form.titleChange = '';
+      this.form.selectedTermName = "";
+      this.form.selectedTerm = "";
+      this.form.titleChange = "";
       // console.log('处理清空的操作');
     },
 
@@ -359,20 +413,21 @@ export default {
       const name = newVal.name;
       const typeName = newVal.typeName;
       const type = newVal.type;
-      this.form.selectedTermName = name + (typeName ? '(' + typeName + ')' : '');
+      this.form.selectedTermName =
+        name + (typeName ? "(" + typeName + ")" : "");
       // this.form.selectedTerm = name + (typeName ? '(' + typeName + ')' : '');
       this.form.name = name;
       this.form.fileList = [];
       this.showFileList = false;
-      this.form.typeId = type || '';
+      this.form.typeId = type || "";
       this.showUpLoad = true;
       this.titleChange =
         type == 1
-          ? '临床路径标题:'
+          ? "临床路径标题:"
           : type == 3 || type == 4 || type == 5 || type == 6
-          ? '注意事项标题:'
-          : '';
-      this.form.fileTitle = '';
+          ? "注意事项标题:"
+          : "";
+      this.form.fileTitle = "";
       if (newVal.typeId === 82 || newVal.typeId === 83) {
         this.upload = true;
         this.form.fileTitle = newVal.title;
@@ -387,12 +442,12 @@ export default {
     },
     reOrder(isUp, i) {
       // isUp: 1 上升    0 下降
-      let div = this.$refs['elscrollbar'].$refs['wrap'];
+      let div = this.$refs["elscrollbar"].$refs["wrap"];
       let temp = {},
         it = {};
       if (isUp === 1) {
         if (i === 0) {
-          this.warning('已经是第一个,不能再升啦!');
+          this.warning("已经是第一个,不能再升啦!");
           return;
         }
         temp = Object.assign(this.form.prags[i - 1]);
@@ -403,7 +458,7 @@ export default {
         });
       } else {
         if (i === this.form.prags.length - 1) {
-          this.warning('已经是最后一个,不能再降啦!');
+          this.warning("已经是最后一个,不能再降啦!");
           return;
         }
         temp = Object.assign(this.form.prags[i + 1]);
@@ -413,25 +468,25 @@ export default {
     },
     addParagraph(i) {
       this.form.prags.splice(i + 1, 0, {
-        title: '',
-        content: '',
+        title: "",
+        content: "",
         isReason: 0,
         position: [],
-        text: ''
+        text: ""
       });
       //添加段落光标自动落到新增的段落中
       setTimeout(() => {
         this.$refs.subForm[i + 1].$el
-          .getElementsByClassName('el-input__inner')[0]
+          .getElementsByClassName("el-input__inner")[0]
           .focus();
       });
     },
     delParagraph(i) {
       if (this.form.prags.length == 1) {
-        this.warning('只剩一个段落,不能再删啦!');
+        this.warning("只剩一个段落,不能再删啦!");
         return;
       }
-      this.showConfirmDialog('确定要删除该段落?', () => {
+      this.showConfirmDialog("确定要删除该段落?", () => {
         this.form.prags.splice(i, 1);
       });
     },
@@ -445,34 +500,36 @@ export default {
       }
       //搜索术语列表
       this.showDrop = true;
-      api.staticKnowledgeBaseInfo({ inputStr: query.trim(), types: [0] }).then(res => {
-        this.showDrop = false;
-        if (res.data.code === '0') {
-          this.terms = res.data.data;
-        } else {
-          this.warning('数据获取失败');
-        }
-      });
+      api
+        .staticKnowledgeBaseInfo({ inputStr: query.trim(), types: [0] })
+        .then((res) => {
+          this.showDrop = false;
+          if (res.data.code === "0") {
+            this.terms = res.data.data;
+          } else {
+            this.warning("数据获取失败");
+          }
+        });
     },
     mapStringToNum(str) {
-      return str.split(',').map(it => {
+      return str.split(",").map((it) => {
         return +it;
       });
     },
 
     // 额外的表单检验
     formVal() {
-      let positiontemp = this.form.prags.map(item => {
+      let positiontemp = this.form.prags.map((item) => {
         return [...item.position];
       });
-      let positionArr = positiontemp.reduce(function(a, b) {
+      let positionArr = positiontemp.reduce(function (a, b) {
         return a.concat(b);
       }); // 所有被选中的值集合
-      console.log(positionArr, 'positionArr');
-      console.log(this.showType, '当前页的显示类型');
-      let isVisFlag = positionArr.some(item => item === 2);
-      let isDiagFlag = positionArr.some(item => item === 3);
-      console.log(isVisFlag, 'isVisFlag是否显示');
+      console.log(positionArr, "positionArr");
+      console.log(this.showType, "当前页的显示类型");
+      let isVisFlag = positionArr.some((item) => item === 2);
+      let isDiagFlag = positionArr.some((item) => item === 3);
+      console.log(isVisFlag, "isVisFlag是否显示");
       if (
         (this.showType == 3 ||
           this.showType == 4 ||
@@ -480,23 +537,23 @@ export default {
           this.showType == 6) &&
         isVisFlag
       ) {
-        console.log('进入校验');
+        console.log("进入校验");
         //若医学术语为检验/检查,且内容类型选择了注意事项,此时“注意事项标题”是必填项
         this.$refs.groups.clearValidate();
         this.rules.titleChange.push({
           required: true,
-          message: '请输入注意事项标题',
-          trigger: 'change'
+          message: "请输入注意事项标题",
+          trigger: "change"
         });
-        this.$refs.groups.validateField('titleChange');
-        this.$refs.groups.validateField('selectedTerm');
+        this.$refs.groups.validateField("titleChange");
+        this.$refs.groups.validateField("selectedTerm");
         this.rules.titleChange = this.rules.titleChange.slice(0, 1);
 
-        if (this.form.titleChange.trim() !== '') {
+        if (this.form.titleChange.trim() !== "") {
           // console.log('内容不为空');
           return true;
         } else {
-          var div = this.$refs['elscrollbar'].$refs['wrap'];
+          var div = this.$refs["elscrollbar"].$refs["wrap"];
           this.$nextTick(() => {
             div.scrollTop = 0;
           });
@@ -508,18 +565,18 @@ export default {
         this.$refs.groups.clearValidate();
         this.rules.titleChange.push({
           required: true,
-          message: '请输入临床路径标题',
-          trigger: 'change'
+          message: "请输入临床路径标题",
+          trigger: "change"
         });
-        this.$refs.groups.validateField('titleChange');
-        this.$refs.groups.validateField('selectedTerm');
+        this.$refs.groups.validateField("titleChange");
+        this.$refs.groups.validateField("selectedTerm");
         this.rules.titleChange = this.rules.titleChange.slice(0, 1);
 
-        if (this.form.titleChange.trim() !== '') {
+        if (this.form.titleChange.trim() !== "") {
           // console.log('内容不为空');
           return true;
         } else {
-          var div = this.$refs['elscrollbar'].$refs['wrap'];
+          var div = this.$refs["elscrollbar"].$refs["wrap"];
           this.$nextTick(() => {
             div.scrollTop = 0;
           });
@@ -530,7 +587,7 @@ export default {
 
     submitForm() {
       if (this.isSuccessUpload === 1) {
-        this.warning('文件上传中,请稍等');
+        this.warning("文件上传中,请稍等");
         return;
       }
       let flagVal = this.formVal(); // 额外的表单校验
@@ -539,7 +596,7 @@ export default {
       let goOn = true,
         it = null;
       let outIsVia = true; // 外层验证是否通过
-      this.$refs.groups.validate(valid => {
+      this.$refs.groups.validate((valid) => {
         if (!valid) {
           goOn = false;
           outIsVia = false;
@@ -553,7 +610,7 @@ export default {
         for (let i = 0; i < this.$refs.subForm.length; i++) {
           it = this.$refs.subForm[i];
           viewHeight += it.$el.offsetHeight;
-          it.$refs.form.validate(valid => {
+          it.$refs.form.validate((valid) => {
             if (!valid) {
               goOn = false;
               viewHeightArr.push(viewHeight);
@@ -563,7 +620,7 @@ export default {
       }
       // console.log(viewHeightArr,'viewHeightArr');
       if (!goOn) {
-        var div = this.$refs['elscrollbar'].$refs['wrap'];
+        var div = this.$refs["elscrollbar"].$refs["wrap"];
         if (outIsVia) {
           // 外层校验通过,跳转至下层校验具体位置
           this.$nextTick(() => {
@@ -582,14 +639,14 @@ export default {
       let param = [];
       if (this.form.typeId === 82 || this.form.typeId === 83) {
         if (this.form.fileList.length === 0) {
-          this.warning('文件未上传,不存储数据');
+          this.warning("文件未上传,不存储数据");
           return;
         }
         param.push(
           Object.assign(
             {},
             {
-              position: this.form.typeId === 82 ? '8' : '9',
+              position: this.form.typeId === 82 ? "8" : "9",
               conceptId: this.form.conceptId,
               title: this.form.fileTitle,
               orderNo: 0,
@@ -609,16 +666,16 @@ export default {
           obj.conceptId = data[i].conceptId;
           obj.orderNo = i;
           obj.title = data[i].title;
-          obj.contentType = data[i].position.join(',');
+          obj.contentType = data[i].position.join(",");
           tempArr.push(obj);
         }
-        paramsAll.clinicalPathwayName = types == 1 ? this.form.titleChange : '';
+        paramsAll.clinicalPathwayName = types == 1 ? this.form.titleChange : "";
         paramsAll.id = this.conceptId;
         paramsAll.name = this.form.name;
         paramsAll.noticeName =
           types == 3 || types == 4 || types == 5 || types == 6
             ? this.form.titleChange
-            : '';
+            : "";
         paramsAll.type = this.form.typeId;
         paramsAll.details = tempArr;
         param = paramsAll;
@@ -646,15 +703,16 @@ export default {
     //保存编辑 接口
     sendSaveOrEdit(param) {
       this.isCopy && (param.id = undefined);
-      api.saveBaseOrUpdateRecord(param)
-        .then(res => {
-          if (res.data.code === '0') {
+      api
+        .saveBaseOrUpdateRecord(param)
+        .then((res) => {
+          if (res.data.code === "0") {
             this.isSuccessUpload = 0; // 修改文件上传状态为0
-            this.warning(res.data.msg || '保存成功', 'success');
+            this.warning(res.data.msg || "保存成功", "success");
             this.isSaveSuccess = true; // 保存成功,可正常退出
             //返回带搜索条件的首页
             this.$router.push({
-              name: 'StaticInfo',
+              name: "StaticInfo",
               params: Object.assign({}, this.$route.params, {
                 currentPage: 1
               })
@@ -664,8 +722,8 @@ export default {
           }
           this.saveDisable = false;
         })
-        .catch(err => {
-          if (err.code === '900010001') {
+        .catch((err) => {
+          if (err.code === "900010001") {
             return false;
           }
           this.saveDisable = false;
@@ -675,13 +733,13 @@ export default {
 
     // 弹出窗
     showConfirmDialog(msg, resolve) {
-      this.$alert(msg, '提示', {
-        confirmButtonText: '确定',
+      this.$alert(msg, "提示", {
+        confirmButtonText: "确定",
         // cancelButtonText: '取消',
         // cancelButtonClass: 'cancel',
         // confirmButtonClass: 'confirmBtn',
         dangerouslyUseHTMLString: true,
-        type: 'warning'
+        type: "warning"
       })
         .then(() => {
           resolve();
@@ -692,7 +750,7 @@ export default {
       this.$message({
         showClose: true,
         message: msg,
-        type: type || 'warning'
+        type: type || "warning"
       });
     },
     handleChange(file, fileList) {
@@ -706,7 +764,7 @@ export default {
       // console.log(fileList,this.form.fileList,'aa')
     },
     handleSuccess(response, file, fileList) {
-      if (response.code == '0') {
+      if (response.code == "0") {
         this.showFileList = true;
         this.form.fileList = [];
         this.form.fileList.push({
@@ -721,7 +779,7 @@ export default {
         this.isSuccessUpload = 2; // 上传成功状态
         this.$refs.upload && this.$refs.upload.clearValidate(); // 清除校验
       } else {
-        this.warning(response.msg || '上传失败');
+        this.warning(response.msg || "上传失败");
         // this.form.fileList = []
         this.showUpLoad = true;
         this.showFileList = false;
@@ -741,7 +799,7 @@ export default {
 
       this.showUpLoad = false;
       if (file.size / 1024 / 1024 >= 500) {
-        this.warning('文件上传失败,超出大小限制500MB');
+        this.warning("文件上传失败,超出大小限制500MB");
         this.form.fileList = [];
         this.showConfirm = false;
         return false;
@@ -752,8 +810,8 @@ export default {
     handlePreview(file) {},
     beforeRemove(file, fileList) {
       if (this.showConfirm) {
-        return this.$alert(`确定移除 ${file.name}?`, '', {
-          cancelButtonClass: 'cacelBtn'
+        return this.$alert(`确定移除 ${file.name}?`, "", {
+          cancelButtonClass: "cacelBtn"
         });
       }
     }
@@ -761,7 +819,7 @@ export default {
 };
 </script>
 <style lang="less" scoped>
-@import '../../less/common.less';
+@import "../../less/common.less";
 .cell .el-button.delete:focus {
   color: red !important;
 }
@@ -841,7 +899,7 @@ export default {
   font-size: 14px;
 }
 .tipInfo:before {
-  content: '';
+  content: "";
   display: block;
   position: absolute;
   // bottom: 9px;

+ 2 - 2
vue.config.js

@@ -1,6 +1,6 @@
 const path = require('path');
-// const proxy_path = 'http://192.168.2.236:80';
-const proxy_path = 'http://192.168.2.241:88';
+const proxy_path = 'http://192.168.2.236:80';
+// const proxy_path = 'http://192.168.2.241:88';
 // const proxy_path = 'http://192.168.2.236:88';
 // const proxy_path = 'http://192.168.3.101:5050';
 // const proxy_path = 'http://192.168.3.117:5050';//周铁刚

+ 5 - 0
yarn.lock

@@ -8285,6 +8285,11 @@ vue@^2.5.17:
   resolved "https://registry.yarnpkg.com/vue/-/vue-2.6.12.tgz#f5ebd4fa6bd2869403e29a896aed4904456c9123"
   integrity sha512-uhmLFETqPPNyuLLbsKz6ioJ4q7AZHzD8ZVFNATNyICSZouqP2Sz0rotWQC8UNBF6VGSCs5abnKJoStA6JbCbfg==
 
+vuex@^3.6.2:
+  version "3.6.2"
+  resolved "https://registry.yarnpkg.com/vuex/-/vuex-3.6.2.tgz#236bc086a870c3ae79946f107f16de59d5895e71"
+  integrity sha512-ETW44IqCgBpVomy520DT5jf8n0zoCac+sxWnn+hMe/CzaSejb/eVw2YToiXYX+Ex/AuHHia28vWTq4goAexFbw==
+
 watchpack-chokidar2@^2.0.1:
   version "2.0.1"
   resolved "https://registry.yarnpkg.com/watchpack-chokidar2/-/watchpack-chokidar2-2.0.1.tgz#38500072ee6ece66f3769936950ea1771be1c957"