Browse Source

订单-离职交接

zhangjinxing 3 years ago
parent
commit
e0a97847a5

+ 14 - 52
src/views/interest/newProcess/index.vue → src/views/interest/handover/addDetail.vue

@@ -4,16 +4,23 @@
       v-if="powers && powers.length > 0 && powers.some((item) => item == '001')"
     >
       <!-- v-if="showModel" -->
-      <el-divider content-position="center">详情组件</el-divider>
-      <div style="width: 500px">
+      <div style="width: 500px" v-if="status === 0">
         <add-edit-form
-          :parmValue1="parmValue1"
+          :id="this.$route.query.id"
           :show-model="showModel"
           :is-detail="!isDetail"
           @refreshList="searchList"
         />
       </div>
       type:{{ type == 1 }}
+      <div style="width: 500px">
+        <add-edit-form
+          :id="this.$route.query.id"
+          :show-model="showModel"
+          :is-detail="isDetail"
+          @refreshList="searchList"
+        />
+      </div>
     </div>
     <div v-else>
       <no-auth></no-auth>
@@ -23,12 +30,9 @@
    <script>
 import mixinPage from "@/mixins/elPaginationHandle";
 import resToken from "@/mixins/resToken";
-// import statusList from "@/assets/js/statusList";
-import asyncRequest from "@/apis/service/interest/newProcess";
-// import addEdit from "./addEdit";
+import asyncRequest from "@/apis/service/interest/handover";
 import { mapGetters } from "vuex";
-import addEditForm from "@/views/interest/handover/components/addEditForm.vue";
-// import editForm from "@/views/interest/handover/components/editForm.vue";
+import addEditForm from "./components/addEditForm.vue";
 
 export default {
   name: "newProcess",
@@ -59,52 +63,13 @@ export default {
     };
   },
 
-  mounted() {
-    let { id } = this.$route.query;
-    this.parmValue1.id = id;
-    this.searchList();
-  },
+  mounted() {},
 
   methods: {
     restSearch() {
       this.parmValue = {};
       this.searchList();
     },
-
-    // openModal(id, isDetail, sitem) {
-    //   this.showModel = true;
-    //   this.modelId = id;
-    //   this.isDetail = isDetail;
-    //   this.sitem = sitem;
-    // },
-    async deleteById(id, status) {
-      // await this.$confirm("确定要删除?", {
-      //   confirmButtonText: "确定",
-      //   cancelButtonText: "取消",
-      //   type: "warning",
-      // })
-      //   .then(async () => {
-      //     const model = {
-      //       id: id,
-      //       status: status === "1" ? "0" : "1",
-      //     };
-      //     const res = await asyncRequest.status(model);
-      //     if (res && res.code === 0) {
-      //       this.$notify.success({
-      //         title: "删除成功",
-      //         message: "",
-      //       });
-      //       this.searchList();
-      //     } else if (res && res.code >= 100 && res.code <= 104) {
-      //       await this.logout();
-      //     } else {
-      //       this.$message.warning(res.message);
-      //     }
-      //   })
-      //   .catch(() => {
-      //     console.log("取消");
-      //   });
-    },
     async searchList() {
       this.loading = true;
       const res = await asyncRequest.list(this.parmValue);
@@ -122,8 +87,5 @@ export default {
   },
 };
 </script>
-   <style lang="scss" scoped>
-.newProcess {
-}
-</style>
+
    

+ 0 - 262
src/views/interest/handover/addEdit.vue

@@ -1,262 +0,0 @@
-<template>
-  <el-dialog
-    v-loading="loading"
-    :title="title"
-    :center="true"
-    align="left"
-    top="22vh"
-    width="700px"
-    :close-on-click-modal="false"
-    :visible.sync="showModelThis"
-    element-loading-text="拼命加载中"
-    element-loading-spinner="el-icon-loading"
-    element-loading-background="rgba(0, 0, 0, 0.8)"
-    @close="closeModel"
-  >
-    <el-card style="margin-top: -20px">
-      <el-row :gutter="10">
-        <el-col :span="24">
-          <el-form
-            ref="ruleForm"
-            :model="ruleForm"
-            status-icon
-            :rules="rulesThis"
-            label-width="100px"
-            class="demo-ruleForm"
-          >
-            <el-form-item label="离职人" prop="resign_name">
-              <search-account
-                :value="ruleForm.resign_name"
-                :size="searchSize"
-                :disabled="isDetail"
-                :placeholder="'请输入用户名账号'"
-                @searchChange="handleResignName"
-              />
-            </el-form-item>
-            <el-form-item label="接受人" prop="hand_name">
-              <search-account
-                :value="ruleForm.hand_name"
-                :size="searchSize"
-                :disabled="isDetail"
-                :placeholder="'请输入用户名账号'"
-                @searchChange="handleHandoverName"
-              />
-            </el-form-item>
-          </el-form>
-        </el-col>
-        <el-col :span="24" style="text-align: right">
-          <el-button v-if="!isDetail" type="primary" @click="submitForm"
-            >保 存
-          </el-button>
-          <el-button @click="showModelThis = false">{{
-            isDetail ? "关 闭" : "取 消"
-          }}</el-button>
-        </el-col>
-      </el-row>
-    </el-card>
-  </el-dialog>
-</template>
-<script>
-import asyncRequest from "@/apis/service/interest/handover";
-import resToken from "@/mixins/resToken";
-export default {
-  name: "Account",
-  props: ["showModel", "id", "isDetail"],
-  mixins: [resToken],
-  data() {
-    return {
-      isShowBtn: "", //是否展示按钮
-      roleList: [],
-      loading: false,
-      title: "添加离职交接",
-      showModelThis: this.showModel,
-      hand_uid: "", //接受人ID
-      resign_uid: "", //离职人ID
-      ruleForm: {
-        resign_name: "", //离职人
-        leaves_part: [], //离职人部门
-        hand_name: "", //交接人
-        Handover_part: [], //交接人部门
-      },
-      rulesThis: this.rules,
-      rules: {
-        leaves_part: [
-          {
-            type: "array",
-            required: true,
-            message: "请选择离职人部门",
-            trigger: "change",
-          },
-        ],
-
-        resign_name: [
-          {
-            required: true,
-            message: "请选择离职人",
-            trigger: "blur",
-          },
-        ],
-        Handover_part: [
-          {
-            type: "array",
-            message: "请选择接受人部门",
-            required: true,
-            trigger: "change",
-          },
-        ],
-        hand_name: [
-          {
-            required: true,
-            message: "请选择接受人",
-            trigger: "blur",
-          },
-        ],
-      },
-    };
-  },
-  watch: {
-    showModel: function (val) {
-      this.showModelThis = val;
-      if (val) {
-        this.initForm();
-      }
-    },
-    showModelThis(val) {
-      if (!val) {
-        this.$emit("cancel");
-      }
-    },
-  },
-  methods: {
-    closeModel() {
-      console.log("closeModel!!");
-    },
-    async initForm() {
-      this.loading = true;
-      // console.log(this.id);add
-      if (this.id === "add") {
-        this.title = "添加离职交接";
-        this.rulesThis = this.rules;
-        await this.resetForm();
-      } else {
-        if (this.isDetail) {
-          this.title = "离职交接详情";
-          this.rulesThis = {};
-          this.isShowBtn = !this.isDetail;
-          
-        } else {
-          // this.title = "修改离职交接";
-          this.rulesThis = this.rules;
-        }
-        await this.resetForm();
-        await this.initData();
-      }
-      this.loading = false;
-    },
-
-    async initData() {
-      const res = await asyncRequest.detail({ id: this.id });
-      console.log(res);
-      if (res && res.code === 0 && res.data) {
-        let {
-          resign_name,
-          leaves_part,
-          hand_name,
-          Handover_part,
-          hand_uid,
-          resign_uid,
-        } = res.data;
-        this.ruleForm = {
-          resign_name,
-          leaves_part: leaves_part || [],
-          hand_name,
-          Handover_part: Handover_part || [],
-        };
-        this.hand_uid = hand_uid;
-        this.resign_uid = resign_uid;
-      } else if (res && res.code >= 100 && res.code <= 104) {
-        await this.logout();
-      } else {
-        this.$message.warning(res.message);
-      }
-    },
-    async resetForm() {
-      // 重置
-      await this.$nextTick(() => {
-        if (this.$refs.ruleForm) {
-          this.$refs.ruleForm.resetFields();
-          this.$refs.ruleForm.clearValidate();
-          this.ruleForm = {
-            resign_name: "", //离职人
-            leaves_part: [], //离职人部门
-            hand_name: "", //交接人
-            Handover_part: [], //交接人部门
-          };
-        }
-      });
-    },
-    async submitForm() {
-      await this.$refs.ruleForm.validate(async (valid) => {
-        if (valid) {
-          this.loading = true;
-          // const { name } = JSON.parse(JSON.stringify(this.ruleForm));
-          const model = {
-            id: this.id,
-            resign_uid: this.ruleForm.resign_name,
-            hand_uid: this.ruleForm.hand_name,
-            leaves_part: this.ruleForm.leaves_part,
-            Handover_part: this.ruleForm.Handover_part,
-          };
-          let res = {};
-          console.log(this.id);
-          if (this.id === "add") {
-            delete model["id"];
-            res = await asyncRequest.add(model);
-            console.log(res);
-          } else {
-            res = await asyncRequest.update(model);
-          }
-          this.loading = false;
-          if (res && res.code === 0) {
-            const title = this.id === "add" ? "添加成功!" : "修改成功!";
-            this.$notify.success({
-              title,
-              message: "",
-            });
-            this.showModelThis = false;
-            // 刷新
-            this.$emit("refresh");
-          } else if (res && res.code >= 100 && res.code <= 104) {
-            await this.logout();
-          } else {
-            this.$message.warning(res.message);
-          }
-        } else {
-          console.log("error submit!!");
-          return false;
-        }
-      });
-    },
-    handleleaves(e) {
-      console.log(e);
-      this.ruleForm.leaves_part = e;
-    },
-    handleHandover(e) {
-      this.ruleForm.Handover_part = e;
-    },
-    handleResignName(e) {
-      this.ruleForm.resign_name = e.code;
-      console.log(e);
-    },
-    handleHandoverName(e) {
-      this.ruleForm.hand_name = e.code;
-      console.log(e);
-    },
-  },
-};
-</script>
-
-   <style lang="scss" scoped>
-.account {
-}
-</style>

+ 1 - 1
src/views/interest/handover/components/addEdit.vue

@@ -67,7 +67,7 @@ export default {
         console.log(this.isDetail);
 
         if (this.isDetail) {
-          this.title = "离职交接详情";
+          // this.title = "离职交接详情";
           this.rulesThis = {};
         } else {
           this.rulesThis = this.rules;

+ 21 - 7
src/views/interest/handover/components/addEditForm.vue

@@ -34,7 +34,7 @@
             @searchChange="handleHandoverName"
           />
         </el-form-item>
-        12{{ isDetail }}id:{{ id }}
+        isDetail:{{ isDetail }} ---------id:{{ id }}-------status{{ status }}
       </el-form>
     </el-col>
     <el-col :span="24" style="text-align: right">
@@ -48,7 +48,6 @@
         >取 消 审 核 流 程</el-button
       > -->
       <el-button @click="closeAdd"> 关 闭</el-button>
-      type:{{ parmValue1 }}
     </el-col>
   </el-row>
 </template>
@@ -57,10 +56,11 @@ import asyncRequest from "@/apis/service/interest/handover";
 import resToken from "@/mixins/resToken";
 export default {
   name: "handover",
-  props: ["id", "isDetail", "showModelThis", "parmValue1"],
+  props: ["id", "isDetail", "showModelThis"],
   mixins: [resToken],
   data() {
     return {
+      detailId: "", //详情接口使用
       isBtn: false,
       loading: false,
       status: "", //存储详情接口返的状态
@@ -94,9 +94,20 @@ export default {
     };
   },
   mounted() {
-    console.log(this.isDetail);
+    console.log(this.id);
     this.initForm();
   },
+  created() {
+    this.initForm();
+  },
+  watch: {
+    id: function (val) {
+      console.log(val);
+      if (val) {
+        this.initForm();
+      }
+    },
+  },
   methods: {
     //   关闭弹窗,直接隐藏表单
     async closeAddEdit() {
@@ -119,25 +130,27 @@ export default {
     async initForm() {
       this.loading = true;
       if (this.id === "add") {
-        console.log(this.isBtn);
         this.isBtn = true;
-        console.log("添加");
         this.isDetail = false;
         this.rulesThis = this.rules;
         await this.resetForm();
       } else {
         if (this.isDetail) {
           this.rulesThis = {};
-          await this.initData();
         } else {
           this.rulesThis = this.rules;
           await this.resetForm();
           await this.initData();
         }
+        await this.initData();
       }
       this.loading = false;
     },
     async initData() {
+      const model = {
+        // id: this.parmValue1.id,
+      };
+      console.log(model);
       const res = await asyncRequest.detail({ id: this.id });
       if (res && res.code === 0 && res.data) {
         let { hand_name, resign_name, hand_uid, resign_uid, id, status } =
@@ -150,6 +163,7 @@ export default {
           type: status,
           id,
         };
+        this.status = status;
         // this.$emit("refreshList");
       } else if (res && res.code >= 100 && res.code <= 104) {
         await this.logout();

+ 9 - 13
src/views/interest/handover/index.vue

@@ -134,7 +134,7 @@
           >
             <i
               class="el-icon-view tb-icon"
-              @click="showDetail(scope.row.id, true, scope.row)"
+              @click="gotoDetail(scope.row.id)"
             ></i>
           </el-tooltip>
         </template>
@@ -268,19 +268,15 @@ export default {
     this.searchList();
   },
   methods: {
-    // 表格行选中的方法
-    // RowClick(e) {
-    //   window.vm.$router.push({
-    //     path: "newProcess",
-    //     query: {
-    //       id: e.id,
-    //     },
-    //   });
-    // },
-    showDetail(id, isDetail, sitem) {
-      console.log(isDetail);
-      this.openModal(id, isDetail);
+    gotoDetail(id) {
+      window.vm.$router.push({
+        path: "newProcess",
+        query: {
+          id: id,
+        },
+      });
     },
+
     restSearch() {
       this.parmValue = {
         start: "", //开始 end结束时间

+ 0 - 362
src/views/interest/newProcess/addEdit.vue

@@ -1,362 +0,0 @@
-<template>
-  <el-dialog
-    :title="title"
-    :center="true"
-    align="left"
-    top="5vh"
-    width="1040px"
-    @close="closeModel"
-    :close-on-click-modal="false"
-    :visible.sync="showModelThis"
-    v-loading="loading"
-    element-loading-text="拼命加载中"
-    element-loading-spinner="el-icon-loading"
-    element-loading-background="rgba(0, 0, 0, 0.8)"
-  >
-    <el-card>
-      <el-row :gutter="10">
-        <el-col :span="24">
-          <el-form
-            :model="ruleForm"
-            status-icon
-            :rules="rulesThis"
-            ref="ruleForm"
-            label-width="110px"
-            class="demo-ruleForm"
-          >
-            <el-form-item
-              label="登录名"
-              prop="loginName"
-              v-if="id === 'add' || isDetail"
-            >
-              <el-input
-                v-model="ruleForm.loginName"
-                :disabled="isDetail"
-              ></el-input>
-            </el-form-item>
-            <el-form-item label="姓名" prop="fullName">
-              <el-input
-                v-model="ruleForm.fullName"
-                :disabled="isDetail"
-              ></el-input>
-            </el-form-item>
-            <el-form-item label="手机号" prop="tel">
-              <el-input v-model="ruleForm.tel" :disabled="isDetail"></el-input>
-            </el-form-item>
-            <el-form-item label="密码" prop="password" v-if="id === 'add'">
-              <el-input
-                type="password"
-                placeholder="密码"
-                :maxlength="20"
-                v-model="ruleForm.password"
-              ></el-input>
-            </el-form-item>
-            <el-form-item label="确认密码" prop="password2" v-if="id === 'add'">
-              <el-input
-                type="password"
-                placeholder="再次输入密码"
-                :maxlength="20"
-                v-model="ruleForm.password2"
-              ></el-input>
-            </el-form-item>
-          </el-form>
-        </el-col>
-        <el-col :span="24" style="text-align: right;">
-          <el-button type="primary" @click="submitForm" v-if="!isDetail"
-            >保 存
-          </el-button>
-          <el-button @click="showModelThis = false">{{ isDetail ? "关 闭" : "取 消" }}</el-button>
-        </el-col>
-      </el-row>
-    </el-card>
-  </el-dialog>
-   </template>
-   <script>
-   import asyncRequest from "@/apis/service/interest/newProcess";
-   import resToken from "@/mixins/resToken";
-   import {
-    isnumber,
-    isMobile,
-    validEmail,
-    isAlphanumeric,
-    isChinese,
-    isEmoticon,
-    validAlphabets,
-  } from "@/utils/validate";
-   export default {
-    name: 'newProcess',
-    props: ["showModel", "id", "isDetail","sitem"],
-    mixins: [resToken],
-    data() {
-      const validateusername = (rule, value, callback) => {
-        if (value === "") {
-          callback(new Error("账号不能为空!"));
-        } else {
-          if (value.length < 6 || value.length > 18) {
-            callback(new Error("账号规则为6~18位数字与字母组合!"));
-          } else {
-            if (isnumber(value)) {
-              callback(new Error("账号规则为6~18位数字与字母组合!"));
-            } else if (validAlphabets(value)) {
-              callback(new Error("账号规则为6~18位数字与字母组合!"));
-            } else if (!isAlphanumeric(value)) {
-              callback(new Error("账号规则为6~18位数字与字母组合!"));
-            } else {
-              callback();
-            }
-          }
-        }
-      };
-      const validatename = (rule, value, callback) => {
-        if (value === "") {
-          callback(new Error("真实姓名不能为空!"));
-        } else {
-          if (value.length < 2 || value.length > 12) {
-            callback(new Error("真实姓名规则为2~12位汉字!"));
-          } else {
-            if (!isChinese(value)) {
-              console.log(9999);
-              callback(new Error("真实姓名规则为2~12位汉字!"));
-            } else if (isEmoticon(value)) {
-              console.log(2345);
-              callback(new Error("真实姓名规则为2~12位汉字!"));
-            } else {
-              callback();
-            }
-          }
-        }
-      };
-      const validatemobile = (rule, value, callback) => {
-        if (value === "") {
-          callback(new Error("手机号不能为空!"));
-        } else {
-          if (!isMobile(value)) {
-            callback(new Error("手机号格式不正确!"));
-          } else {
-            callback();
-          }
-        }
-      };
-  
-      const validateEmail = (rule, value, callback) => {
-        if (value === "") {
-          callback();
-        } else {
-          if (!validEmail(value)) {
-            callback(new Error("邮箱格式不正确!"));
-          } else {
-            callback();
-          }
-        }
-      };
-      return {
-        loading: false,
-        title: "添加账号",
-        showModelThis: this.showModel,
-        ruleForm: {
-          username: "", // 账号
-          name: "", // 真实姓名
-          mobile: "",
-          email: "",
-          role_id: "",
-          status: "1",
-          item: [],
-        },
-        rulesThis: this.rules,
-        rules: {
-          name: [
-            {
-              required: true,
-              validator: validatename,
-              trigger: "blur",
-            },
-          ],
-          username: [
-            {
-              required: true,
-              validator: validateusername,
-              trigger: "blur",
-            },
-          ],
-          mobile: [
-            {
-              required: true,
-              validator: validatemobile,
-              trigger: "blur",
-            },
-          ],
-          email: [
-            {
-              required: false,
-              validator: validateEmail,
-              trigger: "blur",
-            },
-          ],
-          role_id: [
-            {
-              required: true,
-              message: "请选择角色",
-              trigger: "change",
-            },
-          ],
-          item: [
-            {
-              type: "array",
-              required: true,
-              message: "请选择所在部门",
-              trigger: "change",
-            },
-          ],
-          status: [
-            {
-              required: true,
-              message: "请选择状态",
-              trigger: "change",
-            },
-          ],
-        }
-      };
-    },
-    watch: {
-      showModel: function(val) {
-        this.showModelThis = val;
-        if (val) {
-          this.initForm();
-        }
-      },
-      showModelThis(val) {
-        if (!val) {
-          this.$emit("cancel");
-        }
-      }
-    },
-    methods: {
-      closeModel() {
-        console.log("closeModel!!");
-      },
-      async initForm() {
-        this.loading = true;
-        // await this.getRole();
-        if (this.id === "add") {
-          this.title = "添加账号";
-          this.rulesThis = this.rules;
-          await this.resetForm();
-        } else {
-          if (this.isDetail) {
-            this.title = "账号详情";
-            this.rulesThis = {};
-          } else {
-            this.title = "修改账号";
-            this.rulesThis = this.rules;
-          }
-          await this.resetForm(this.sitem);
-          // await this.initData()
-        }
-        this.loading = false;
-      },
-      // async getRole() {
-      //   const model = {
-      //     status: "", // 状态
-      //     level: "", // 姓名
-      //     role_name: "",
-      //   };
-      //   const res = await asyncRequest.getRole(model);
-      //   if (res && res.code === 0 && res.data) {
-      //     this.roleList = res.data;
-      //     this.roleList.map((v1) => {
-      //       v1.id += "";
-      //       v1.status += "";
-      //       return v1;
-      //     });
-      //   }
-      // },
-      async initData() {
-        const res = await asyncRequest.detail({ id: this.id });
-      if (res && res.code === 0 && res.data) {
-        this.ruleForm = res.data;
-        this.ruleForm.role_id = this.ruleForm.role;
-      } else if (res && res.code >= 100 && res.code <= 104) {
-        await this.logout();
-      } else {
-        this.$message.warning(res.message);
-      }
-      },
-      async resetForm(sitem) {
-        // 重置
-        await this.$nextTick(() => {
-          if (this.$refs.ruleForm) {
-            this.$refs.ruleForm.resetFields();
-            this.$refs.ruleForm.clearValidate();
-            const { username, nickname, mobile, email, roleid, status, item } =
-              sitem;
-            this.ruleForm = {
-              username: username || "", // 账号
-              name: nickname || "", // 真实姓名
-              mobile: mobile || "",
-              email: email || "",
-              role_id: roleid || "",
-              status: status || "",
-              item: item || [],
-            };
-            if (this.id === "add" || this.isDetail) {
-              this.rules.username[0].required = false;
-            }
-          }
-        });
-      },
-    
-      async submitForm() {
-        await this.$refs.ruleForm.validate(async (valid) => {
-          if (valid) {
-            this.loading = true;
-            const { username, name, mobile, email, role_id, status } = JSON.parse(
-              JSON.stringify(this.ruleForm)
-            );
-            const model = {
-              id: this.id,
-              username: username || "", // 账号
-              nickname: name || "", // 真实姓名
-              mobile: mobile || "",
-              email: email || "",
-              role: role_id || "",
-              status: status || "",
-            };
-            let res = {};
-            if (this.id === "add") {
-              delete model["id"];
-              res = await asyncRequest.add(model);
-            } else {
-              res = await asyncRequest.update(model);
-            }
-            this.loading = false;
-            if (res && res.code === 0) {
-              const title = this.id === "add" ? "添加成功" : "修改成功";
-              this.$notify.success({
-                title,
-                message: "",
-              });
-              this.showModelThis = false;
-              // 刷新
-              this.$emit("refresh");
-            } else if (res && res.code >= 100 && res.code <= 104) {
-              await this.logout();
-            } else {
-              this.$message.warning(res.message);
-            }
-          } else {
-            console.log("error submit!!");
-            return false;
-          }
-        });
-      },
-    },
- 
-  };
-  </script>
-
-   <style lang="scss" scoped>
-   .newProcess {
-    
-   }
-   </style>
-   

+ 1 - 1
src/views/purchaseIn/storeManage/index.vue

@@ -154,7 +154,7 @@ export default {
     addEdit,
   },
   computed: {
-    ...mapGetters(["tablebtnSize", "searchSize", "size", "visitedViews"]),
+    ...mapGetters(["tablebtnSize", "searchSize", "size",]),
     powers() {
       let tran =
         this.$store.getters.btnList.find(

+ 3 - 27
src/views/stock/check/index.vue

@@ -213,7 +213,7 @@ export default {
     addModel,
   },
   computed: {
-    ...mapGetters(["tablebtnSize", "searchSize", "size", "visitedViews"]),
+    ...mapGetters(["tablebtnSize", "searchSize", "size"]),
     powers() {
       let tran =
         this.$store.getters.btnList.find(
@@ -394,33 +394,9 @@ export default {
       }
       this.loading = false;
     },
-    async gotoDetail(id) {
-      let path = "checkDetail";
-      let index = this.visitedViews.findIndex((v) => v.name === path);
-      if (index !== -1) {
-        await this.$confirm("当前已打开盘点详情页,是否关闭?", "提示", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning",
-        })
-          .then(async () => {
-            this.$store
-              .dispatch("tagsView/delView", this.visitedViews[index])
-              .then(() => {
-                this.gotoDetailRouter(path, id);
-              });
-          })
-          .catch(() => {
-            console.log("取消");
-          });
-      } else {
-        this.gotoDetailRouter(path, id);
-      }
-    },
-
-    gotoDetailRouter(path, id) {
+    gotoDetail(id) {
       window.vm.$router.push({
-        path: path,
+        path: checkDetail,
         query: {
           id: id,
         },