WXL
2024-09-24 83898e6b7ff3996fcef889042442a25753b07dea
src/views/followvisit/tasklist/index.vue
@@ -35,7 +35,7 @@
          ></el-date-picker>
        </el-form-item>
        <el-form-item label="服务项目" prop="status">
        <el-form-item label="任务模板" prop="status">
          <el-input
            v-model="topqueryParams.templatename"
            @keyup.enter.native="handleQuery"
@@ -82,6 +82,20 @@
            </el-option>
          </el-select>
        </el-col>
        <!-- <el-col :span="1.5">
          <el-select
            v-model="longTask"
            placeholder="请选择任务类型"
          >
            <el-option
              v-for="item in longtermlist"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            >
            </el-option>
          </el-select>
        </el-col> -->
        <el-col :span="1.5">
          <el-button
            type="primary"
@@ -89,11 +103,11 @@
            size="medium"
            @click="handleAdd"
            :disabled="!tasktopic"
            >新增</el-button
            >新建任务</el-button
          >
        </el-col>
        <el-col :span="19">
        <!-- <el-col :span="19">
          <div class="documentf">
            <div class="document">
              <el-button
@@ -107,7 +121,7 @@
              >
            </div>
          </div>
        </el-col>
        </el-col> -->
        <!-- <el-col :span="1.5"> </el-col> -->
      </el-row>
      <!-- <right-toolbar
@@ -127,6 +141,7 @@
        <el-table-column
          label="任务名称"
          fixed
          width="120"
          align="center"
          key="taskName"
          prop="taskName"
@@ -134,15 +149,19 @@
        />
        <el-table-column
          label="任务描述"
          width="280"
          align="center"
          key="taskDesc"
          prop="taskDesc"
          :show-overflow-tooltip="true"
        />
        <el-table-column
          label="服务项目"
          width="120"
          align="center"
          key="templatename"
          prop="templatename"
          :show-overflow-tooltip="true"
        />
        <el-table-column
          label="待执行/总任务"
@@ -152,6 +171,17 @@
        >
          <template slot-scope="scope">
            <span>{{ scope.row.wfs }}/{{ scope.row.yfs }}</span>
          </template>
        </el-table-column>
        <el-table-column
          label="是否长期任务"
          align="center"
          key="longTask"
          prop="longTask"
          width="120"
        >
          <template slot-scope="scope">
            <span>{{ scope.row.longTask?'长期任务':'非长期' }}</span>
          </template>
        </el-table-column>
@@ -199,7 +229,7 @@
        >
          <template slot-scope="scope">
            <el-button
              v-if="scope.row.sendState == 1 || scope.row.sendState == 3"
              v-if="(scope.row.sendState == 1 || scope.row.sendState == 3)&&!scope.row.longTask"
              size="medium"
              type="text"
              @click="sponsor(scope.row)"
@@ -207,10 +237,14 @@
                ><i class="el-icon-s-promotion"></i>发起</span
              ></el-button
            >
            <el-button size="medium" type="text" @click="newAdd(scope.row)"
            <!-- <el-button size="medium" type="text" @click="newAdd(scope.row)"
              ><span class="button-xj"
                ><i class="el-icon-circle-plus-outline"></i>终止</span
              ></el-button
            > -->
            <el-button size="medium" type="text" @click="handleUpdate(scope.row,1)"
              ><span class="button-xj"
                ><i class="el-icon-circle-plus-outline"></i>依照新增</span
              ></el-button
            >
            <el-button
@@ -393,6 +427,7 @@
      postOptions: [],
      // 角色选项
      roleOptions: [],
      longTask:0,
      taskform: {
        showDate: [],
        showTimeMorn: [],
@@ -414,6 +449,16 @@
      previewvalue: {
        username: "这个医生对你怎么样",
      },
      longtermlist:[
      {
          value: '1',
          label: "长期任务",
        },
        {
          value: '0',
          label: "普通任务",
        },
      ],
      taskoptions: [
        {
          value: "1",
@@ -556,24 +601,6 @@
      propss: { multiple: true },
      options: [],
      topicoptions: [
        {
          value: 1,
          label: "待审核",
        },
        {
          value: 2,
          label: "执行中",
        },
        {
          value: 3,
          label: "执行完成",
        },
        {
          value: 4,
          label: "已停止",
        },
      ],
      // 表单校验
      rules: {
        userName: [
@@ -624,6 +651,8 @@
  },
  watch: {},
  created() {
    this.topqueryParams.leaveldeptcodes = store.getters.belongDepts.map(obj=>obj.deptCode);
    this.topqueryParams.leavehospitaldistrictcodes = store.getters.belongWards.map(obj=>obj.districtCode);
    this.tasktopic = this.$route.query.tasktopic
      ? this.$route.query.tasktopic
      : this.tasktopic;
@@ -781,7 +810,7 @@
      }
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
    handleUpdate(row,newadd) {
      if (this.topqueryParams.type == 1) {
        this.$router.push({
          path: "/followvisit/particty",
@@ -789,6 +818,7 @@
            id: row.taskid,
            type: this.topqueryParams.type,
            serviceType: this.tasktopic,
            newadd:newadd,//是否依照新建
          },
        });
      } else if (this.topqueryParams.type == 2) {
@@ -798,6 +828,7 @@
            id: row.taskid,
            type: this.topqueryParams.type,
            serviceType: this.tasktopic,
            newadd:newadd,
          },
        });
      } else if (this.topqueryParams.type == 3) {
@@ -807,6 +838,7 @@
            id: row.taskid,
            type: this.topqueryParams.type,
            serviceType: this.tasktopic,
            newadd:newadd,
          },
        });
      }
@@ -919,34 +951,7 @@
      }
    },
    // 依照新增
    newAdd(row) {
      this.$modal
        .confirm("是否依照当前任务创建新任务?")
        .then(() => {
          if (this.tasktopic == 5) {
            this.$router.push({
              path: "/followvisit/particty",
              query: { type: 1, id: row.taskid, nhh: 1 },
            });
          } else if (
            this.tasktopic == 2 ||
            this.tasktopic == 3 ||
            this.tasktopic == 6
          ) {
            this.$router.push({
              path: "/followvisit/QuestionnaireTask",
              query: { type: 2, id: row.taskid, nhh: 1 },
            });
          } else if (this.tasktopic == 8 || this.tasktopic == 4) {
            this.$router.push({
              path: "/followvisit/Missioncreation",
              query: { type: 3, id: row.taskid, nhh: 1 },
            });
          }
        })
        .catch(() => {});
    },
    // 暂停
    stop(row) {
      console.log(row);