xiaodai2022 2 years ago
parent
commit
30bdfa1165

File diff suppressed because it is too large
+ 0 - 0
dist/static/js/0.js


+ 38 - 2
src/views/interest/dataShare/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="dataShare pagePadding">
-    <div v-if=" powers.some((i) => i == '001')">
+    <div v-if="powers.some((i) => i == '001')">
       <ex-table
         v-loading="loading"
         :table="table"
@@ -139,6 +139,15 @@
               @click="changeStatus(scope.row.id, scope.row.status)"
             ></i>
           </el-tooltip>
+
+          <el-tooltip
+            effect="dark"
+            content="删除"
+            placement="top"
+            v-if="powers.some((i) => i == '006')"
+          >
+            <i class="el-icon-delete tb-icon" @click="deleteById(scope.row.id)"></i>
+          </el-tooltip>
         </template>
       </ex-table>
     </div>
@@ -255,7 +264,7 @@ export default {
           prop: "",
           label: "操作",
           fixed: "right",
-          width: "120px",
+          width: "160px",
           _slot_: "operation",
         },
       ],
@@ -325,6 +334,33 @@ export default {
           console.log("取消");
         });
     },
+    async deleteById(id) {
+      await this.$confirm("确定要删除?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(async () => {
+          const model = {
+            id: id,
+          };
+          const { code, data, message } = await asyncRequest.delete(model);
+          if (code === 0) {
+            this.$notify.success({
+              title: "删除成功",
+              message: "",
+            });
+            this.searchList();
+          } else if (code >= 100 && code <= 104) {
+            await this.logout();
+          } else {
+            this.$message.warning(message);
+          }
+        })
+        .catch(() => {
+          console.log("取消");
+        });
+    },
 
     // 刷新表格
     async searchList() {

+ 28 - 62
src/views/serviceParam/workCompany/index.vue

@@ -1,8 +1,6 @@
 <template>
   <div class="workCompany pagePadding">
-    <div
-      v-if=" powers.some((i) => i == '001')"
-    >
+    <div v-if="powers.some((i) => i == '001')">
       <ex-table
         v-loading="loading"
         :table="table"
@@ -59,29 +57,13 @@
                 </el-select>
               </el-col>
 
-              <el-col
-                :span="3"
-                class="fr"
-                style="width: 66px; padding: 0 0 0 10px"
-              >
-                <el-button
-                  type="primary"
-                  :size="searchSize"
-                  @click="searchList"
-                >
+              <el-col :span="3" class="fr" style="width: 66px; padding: 0 0 0 10px">
+                <el-button type="primary" :size="searchSize" @click="searchList">
                   刷新
                 </el-button>
               </el-col>
-              <el-col
-                :span="3"
-                class="fr"
-                style="width: 66px; padding: 0 0 0 10px"
-              >
-                <el-button
-                  type="warning"
-                  :size="searchSize"
-                  @click="restSearch"
-                >
+              <el-col :span="3" class="fr" style="width: 66px; padding: 0 0 0 10px">
+                <el-button type="warning" :size="searchSize" @click="restSearch">
                   重置
                 </el-button>
               </el-col>
@@ -114,18 +96,18 @@
                 ></el-input>
               </el-col>
               <el-col :span="4" style="width: 170px; padding: 0 0 0 10px">
-              <el-input
-                :size="searchSize"
-                v-model="parmValue.company_name"
-                :maxlength="40"
-                @change="
-                  pageInfo.curr = 1;
-                  parmValue.page = 1;
-                  searchList();
-                "
-                placeholder="负责人部门"
-              ></el-input>
-            </el-col>
+                <el-input
+                  :size="searchSize"
+                  v-model="parmValue.company_name"
+                  :maxlength="40"
+                  @change="
+                    pageInfo.curr = 1;
+                    parmValue.page = 1;
+                    searchList();
+                  "
+                  placeholder="负责人部门"
+                ></el-input>
+              </el-col>
               <el-col
                 :span="3"
                 class="fr"
@@ -149,8 +131,8 @@
             :size="tablebtnSize"
             :type="scope.row.status == '0' ? 'warning' : ''"
             v-text="
-              (statusOptions.find((item) => item.id == scope.row.status) || {})
-                .label || '--'
+              (statusOptions.find((item) => item.id == scope.row.status) || {}).label ||
+              '--'
             "
           ></el-tag>
         </template>
@@ -162,10 +144,7 @@
             content="详情"
             placement="top"
           >
-            <i
-              class="el-icon-view tb-icon"
-              @click="openModal(scope.row, '007')"
-            ></i>
+            <i class="el-icon-view tb-icon" @click="openModal(scope.row, '007')"></i>
           </el-tooltip>
           <el-tooltip
             v-if="powers.some((i) => i == '005')"
@@ -173,15 +152,10 @@
             content="修改"
             placement="top"
           >
-            <i
-              class="el-icon-edit tb-icon"
-              @click="openModal(scope.row, '005')"
-            ></i>
+            <i class="el-icon-edit tb-icon" @click="openModal(scope.row, '005')"></i>
           </el-tooltip>
           <el-tooltip
-            v-if="
-              powers.some((i) => i == '004') && scope.row.status === '1'
-            "
+            v-if="powers.some((i) => i == '004') && scope.row.status === '1'"
             effect="dark"
             content="禁用"
             placement="top"
@@ -192,9 +166,7 @@
             ></i>
           </el-tooltip>
           <el-tooltip
-            v-if="
-              powers.some((i) => i == '004') && scope.row.status === '0'
-            "
+            v-if="powers.some((i) => i == '004') && scope.row.status === '0'"
             effect="dark"
             content="启用"
             placement="top"
@@ -210,10 +182,7 @@
             content="删除"
             placement="top"
           >
-            <i
-              class="el-icon-delete tb-icon"
-              @click="deleteById(scope.row.id)"
-            ></i>
+            <i class="el-icon-delete tb-icon" @click="deleteById(scope.row.id)"></i>
           </el-tooltip>
         </template>
       </ex-table>
@@ -230,7 +199,7 @@
     </div>
   </div>
 </template>
-   <script>
+<script>
 import mixinPage from "@/mixins/elPaginationHandle";
 import resToken from "@/mixins/resToken";
 import asyncRequest from "@/apis/service/serviceParam/workCompany";
@@ -246,9 +215,8 @@ export default {
     ...mapGetters(["tablebtnSize", "searchSize", "size"]),
     powers() {
       const tran =
-        this.$store.getters.btnList.find(
-          (item) => item.menu_route == "workCompany"
-        ) || {};
+        this.$store.getters.btnList.find((item) => item.menu_route == "workCompany") ||
+        {};
       const { action } = tran ?? {};
       return action ?? [];
     },
@@ -477,6 +445,4 @@ export default {
   },
 };
 </script>
-   <style lang="scss" scoped>
-</style>
-   
+<style lang="scss" scoped></style>

Some files were not shown because too many files changed in this diff