戴艳蓉 3 gadi atpakaļ
vecāks
revīzija
0bbf35983f

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/index.html


+ 0 - 0
dist/static/css/chunk-b4bd2340.e20b8c72.css → dist/static/css/chunk-56e14604.a2817abf.css


+ 0 - 0
dist/static/css/chunk-b4bd2340.e20b8c72.css.gz → dist/static/css/chunk-56e14604.a2817abf.css.gz


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/js/app.877cd8a9.js


BIN
dist/static/js/app.877cd8a9.js.gz


BIN
dist/static/js/app.a7839fcc.js.gz


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/js/chunk-56e14604.da10c0ca.js


BIN
dist/static/js/chunk-56e14604.da10c0ca.js.gz


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
dist/static/js/chunk-b4bd2340.88b6d95c.js


BIN
dist/static/js/chunk-b4bd2340.88b6d95c.js.gz


+ 3 - 3
src/components/PeriodDatePicker.vue

@@ -4,7 +4,7 @@
       v-model="startTime"
       style="margin: 0"
       class="date-picker"
-      type="date"
+      :type="timeType || 'date'"
       :size="size"
       :style="{ width: width }"
       placeholder="开始日期"
@@ -22,7 +22,7 @@
       v-model="endTime"
       class="date-picker"
       :style="{ width: width }"
-      type="date"
+      :type="timeType || 'date'"
       placeholder="结束日期"
       :disabled="isEdit"
       :picker-options="pickerOptions2"
@@ -39,7 +39,7 @@
 // timeReturned 返回值{startTime: Number,endTime: Number}
 export default {
   name: "PeriodDatePicker",
-  props: ["start", "end", "disabled", "size", "width", "type"],
+  props: ["start", "end", "disabled", "size", "width", "type", "timeType"],
   data() {
     return {
       startTime: this.start,

+ 10 - 6
src/views/search/standBook/addEdit.vue

@@ -1,7 +1,7 @@
 <template>
   <el-dialog
     v-loading="loading"
-    :title="'添加表格需求'"
+    :title="'修改表格需求'"
     :center="true"
     align="left"
     top="25vh"
@@ -28,6 +28,7 @@
               <el-select
                 v-model="ruleForm.id"
                 style="width: 100%"
+                disabled
                 placeholder="请选择业务表"
               >
                 <el-option
@@ -77,8 +78,8 @@ import asyncRequest from "@/apis/service/search/standBook";
 import resToken from "@/mixins/resToken";
 import PeriodDatePicker from "@/components/PeriodDatePicker";
 export default {
-  name: "Account",
-  props: ["showModel", "id", "isDetail", "sitem"],
+  name: "standBook",
+  props: ["showModel", "sitem"],
   mixins: [resToken],
   components: {
     PeriodDatePicker,
@@ -183,11 +184,14 @@ export default {
         if (this.$refs.ruleForm) {
           this.$refs.ruleForm.resetFields();
           this.$refs.ruleForm.clearValidate();
+          const { start, end, id } = this.sitem;
+          console.log(this.sitem);
           this.ruleForm = {
-            start: "",
-            end: "",
-            id: "",
+            start:  "",
+            end:  "",
+            id: id || "",
           };
+          console.log(this.ruleForm);
         }
       });
     },

+ 269 - 0
src/views/search/standBook/pre-export copy.vue

@@ -0,0 +1,269 @@
+<template>
+  <div class="pre-export">
+    <ex-table
+      style="margin-top: -10px"
+      v-loading="loading"
+      :table="table"
+      :data="tableData"
+      :columns="columns"
+      :page="pageInfo"
+      :size="size"
+      @page-curr-change="handlePageChange"
+      @page-size-change="handleSizeChange"
+      @screen-reset="
+        pageInfo.curr = 1;
+        parmValue.page = 1;
+        searchList();
+      "
+      @screen-submit="
+        pageInfo.curr = 1;
+        parmValue.page = 1;
+        searchList();
+      "
+    >
+      <template #table-header="{}">
+        <div style="width: 100%">
+          <el-row style="padding: 0 0 0 80px">
+            <el-col :span="24">
+              <el-col :span="12" style="width: 355px">
+                <el-alert
+                  :closable="false"
+                  title="新建的需求业务报表,会在隔天01:00开始生成文件!"
+                  type="warning"
+                >
+                </el-alert>
+              </el-col>
+
+              <el-col
+                :span="3"
+                style="width: 66px; float: right"
+                v-if="powers.some((item) => item == '002')"
+              >
+                <el-button
+                  :size="searchSize"
+                  type="primary"
+                  style="float: right; margin-left: 5px"
+                  @click="searchList"
+                >
+                  刷新
+                </el-button>
+              </el-col>
+              <!-- <el-col
+                :span="3"
+                style="width: 66px; float: right"
+                v-if="powers.some((item) => item == '003')"
+              >
+                <el-button
+                  :size="searchSize"
+                  type="success"
+                  style="float: right"
+                  @click="openModal('add', false)"
+                >
+                  添加
+                </el-button>
+              </el-col> -->
+            </el-col>
+          </el-row>
+        </div>
+      </template>
+      <template #status="{ scope }">
+        <el-tag
+          :size="tablebtnSize"
+          :type="scope.row.status == '1' ? 'warning' : 'success'"
+          v-text="
+            (statusOptions.find((item) => item.id == scope.row.status) || {})
+              .label || '--'
+          "
+        ></el-tag>
+      </template>
+      <template #operation="{ scope }">
+        <el-tooltip
+          v-if="powers.some((item) => item == '049') && scope.row.status == '2'"
+          effect="dark"
+          content="导出"
+          placement="top"
+        >
+          <i
+            class="el-icon-download tb-icon"
+            @click="batchExport(scope.row.down_url)"
+          ></i>
+        </el-tooltip>
+        <el-tooltip
+          v-if="powers.some((item) => item == '005')"
+          effect="dark"
+          content="编辑"
+          placement="top"
+        >
+          <i class="el-icon-edit tb-icon" @click="openModal(scope.row)"></i>
+        </el-tooltip>
+      </template>
+    </ex-table>
+    <add-edit
+      :sitem="sitem"
+      :show-model="showModel"
+      @refresh="searchList"
+      @cancel="showModel = false"
+    />
+  </div>
+</template>
+<script>
+import mixinPage from "@/mixins/elPaginationHandle";
+import asyncRequest from "@/apis/service/search/standBook";
+import ExTable from "@/components/ExTableNew.vue";
+import addEdit from "./addEdit";
+import { mapGetters } from "vuex";
+import urlConfig from "@/apis/url-config";
+import resToken from "@/mixins/resToken";
+export default {
+  name: "Account",
+  components: {
+    addEdit,
+    ExTable,
+  },
+  mixins: [mixinPage, resToken],
+  computed: {
+    ...mapGetters(["tablebtnSize", "searchSize", "size"]),
+    powers() {
+      let tran =
+        this.$store.getters.btnList.find(
+          (item) => item.menu_route == "standBook"
+        ) || {};
+      if (tran && tran.action && tran.action.length > 0) {
+        return tran.action;
+      } else {
+        return [];
+      }
+    },
+  },
+  data() {
+    return {
+      fileUrl: urlConfig.baseURL,
+      // 状态
+      statusOptions: [
+        { id: "1", label: "待执行" },
+        { id: "2", label: "已完成" },
+      ],
+      loading: true,
+      showModel: false,
+      sitem:null,
+      parmValue: {
+        page: 1, // 页码
+        size: 15, // 每页显示条数
+      },
+      // 表格 - 数据
+      tableData: [],
+      // 表格 - 参数
+      table: {
+        stripe: true,
+        border: true,
+        _defaultHeader_: ["setcol"],
+      },
+      // 表格 - 分页
+      pageInfo: {
+        size: 15,
+        curr: 1,
+        total: 0,
+      },
+      // 表格 - 列参数
+      columns: [
+        {
+          prop: "name",
+          label: "业务表名称",
+          "min-width": "130px",
+        },
+        {
+          prop: "start",
+          label: "数据开始时间",
+          "min-width": "140px",
+        },
+        {
+          prop: "end",
+          width: "140px",
+          "min-width": "数据结束时间",
+        },
+        {
+          prop: "apply_name",
+          label: "申请人",
+          "min-width": "70px",
+        },
+        {
+          prop: "status",
+          label: "状态",
+          _slot_: "status",
+          "min-width": "70px",
+        },
+
+        {
+          prop: "expiretime",
+          label: "文件过期时间",
+          "min-width": "140px",
+          sortable: true,
+        },
+        {
+          prop: "addtime",
+          label: "创建时间",
+          "min-width": "140px",
+          sortable: true,
+        },
+        {
+          prop: "",
+          label: "操作",
+          fixed: "right",
+          width: "52px",
+          _noset_: true,
+          _slot_: "operation",
+        },
+      ],
+    };
+  },
+  mounted() {
+    this.searchList();
+  },
+  methods: {
+    restSearch() {
+      this.parmValue = {
+        page: 1, // 页码
+        size: 15, // 每页显示条数
+      };
+      this.searchList();
+    },
+    openModal(sitem) {
+      this.showModel = true;
+      this.sitem = sitem;
+    },
+
+    batchExport(content) {
+      if (!this.loading) {
+        this.loading = true;
+        let aEle = document.createElement("a"); // 创建a标签
+        // aEle.download = fileName; // 设置下载文件的文件名
+        aEle.href = this.fileUrl + content; // content为后台返回的下载地址
+        aEle.click(); // 设置点击事件
+        // document.body.removeChild(aEle); //下载完成移除元素
+        this.$message.success(`导出成功!`);
+        setTimeout(() => {
+          this.loading = false;
+        }, 500);
+      }
+    },
+    async searchList() {
+      this.loading = true;
+      const res = await asyncRequest.exportList(this.parmValue);
+      if (res && res.code === 0 && res.data) {
+        this.tableData = res.data.list;
+        this.pageInfo.total = Number(res.data.count);
+      } else if (res && res.code >= 100 && res.code <= 104) {
+        await this.logout();
+      } else {
+        this.tableData = [];
+        this.pageInfo.total = 0;
+      }
+      this.loading = false;
+    },
+  },
+};
+</script>
+   <style lang="scss" scoped>
+.account {
+}
+</style>

+ 72 - 162
src/views/search/standBook/pre-export.vue

@@ -1,82 +1,45 @@
 <template>
   <div class="pre-export">
-    <ex-table
-      style="margin-top: -10px"
-      v-loading="loading"
-      :table="table"
+    <el-row style="padding: 0 0 14px 0">
+      <el-col :span="12" style="width: 355px">
+        <el-alert
+          :closable="false"
+          title="新建的需求业务报表,会在隔天01:00开始生成文件!"
+          type="warning"
+        >
+        </el-alert>
+      </el-col>
+
+      <el-col
+        :span="3"
+        style="width: 66px; float: right"
+        v-if="powers.some((item) => item == '002')"
+      >
+        <el-button
+          :size="searchSize"
+          type="primary"
+          style="float: right; margin-left: 5px"
+          @click="searchList"
+        >
+          刷新
+        </el-button>
+      </el-col>
+    </el-row>
+
+    <el-table
       :data="tableData"
-      :columns="columns"
-      :page="pageInfo"
+      border
+      v-loading="loading"
       :size="size"
-      @page-curr-change="handlePageChange"
-      @page-size-change="handleSizeChange"
-      @screen-reset="
-        pageInfo.curr = 1;
-        parmValue.page = 1;
-        searchList();
-      "
-      @screen-submit="
-        pageInfo.curr = 1;
-        parmValue.page = 1;
-        searchList();
-      "
+      style="width: 100%"
     >
-      <template #table-header="{}">
-        <div style="width: 100%">
-          <el-row style="padding: 0 0 0 80px">
-            <el-col :span="24">
-              <el-col :span="12" style="width:355px">
-                <el-alert :closable="false" title="新建的需求业务报表,会在隔天01:00开始生成文件!" type="warning"> </el-alert>
-              </el-col>
-
-              <el-col
-                :span="3"
-                style="width: 66px; float: right"
-                v-if="powers.some((item) => item == '002')"
-              >
-                <el-button
-                  :size="searchSize"
-                  type="primary"
-                  style="float: right; margin-left: 5px"
-                  @click="searchList"
-                >
-                  刷新
-                </el-button>
-              </el-col>
-              <el-col
-                :span="4"
-                style="width: 66px; float: right"
-                v-if="powers.some((item) => item == '024')"
-              >
-                <el-button
-                  type="warning"
-                  class="fr"
-                  :size="searchSize"
-                  @click="restSearch"
-                >
-                  重置
-                </el-button>
-              </el-col>
-              <el-col
-                :span="3"
-                style="width: 66px; float: right"
-                v-if="powers.some((item) => item == '003')"
-              >
-                <el-button
-                  :size="searchSize"
-                  type="success"
-                  style="float: right"
-                  @click="openModal('add', false)"
-                >
-                  添加
-                </el-button>
-              </el-col>
-            </el-col>
-          </el-row>
-        </div>
-      </template>
-      <template #status="{ scope }">
-        <el-tag
+      <el-table-column  prop="name" label="业务表名称" min-width="140"/>
+      <el-table-column prop="start" label="数据开始时间" min-width="140"/>
+      <el-table-column prop="end" label="数据结束时间" min-width="140"/>
+      <el-table-column prop="apply_name" label="申请人" min-width="70"/>
+      <el-table-column prop="status" label="状态" min-width="70">
+          <template slot-scope="scope">
+               <el-tag
           :size="tablebtnSize"
           :type="scope.row.status == '1' ? 'warning' : 'success'"
           v-text="
@@ -84,35 +47,47 @@
               .label || '--'
           "
         ></el-tag>
-      </template>
-      <template #operation="{ scope }">
-        <el-tooltip
-          v-if="powers.some((item) => item == '049') && scope.row.status == '2'"
-          effect="dark"
-          content="导出"
-          placement="top"
-        >
-          <i
-            class="el-icon-download tb-icon"
-            @click="batchExport(scope.row.down_url)"
-          ></i>
-        </el-tooltip>
-      </template>
-    </ex-table>
+          </template>
+      </el-table-column>
+      <el-table-column prop="expiretime" label="文件过期时间" min-width="140"/>
+      <el-table-column prop="addtime" label="创建时间" min-width="140"/>
+      <el-table-column fixed="right" label="操作" width="82">
+        <template slot-scope="scope">
+          <el-tooltip
+            effect="dark"
+            content="编辑"
+            placement="top"
+            v-if="powers.some((item) => item == '005')"
+          >
+            <i class="el-icon-edit tb-icon" @click="openModal(scope.row)"></i>
+          </el-tooltip>
+          <el-tooltip
+            effect="dark"
+            content="导出"
+            placement="top"
+            v-if="
+              powers.some((item) => item == '049') && scope.row.status == '2'
+            "
+          >
+            <i
+              class="el-icon-download tb-icon"
+              @click="batchExport(scope.row.down_url)"
+            ></i>
+          </el-tooltip>
+        </template>
+      </el-table-column>
+    </el-table>
+
     <add-edit
-      :id="modelId"
       :sitem="sitem"
       :show-model="showModel"
-      :is-detail="isDetail"
       @refresh="searchList"
       @cancel="showModel = false"
     />
   </div>
 </template>
 <script>
-import mixinPage from "@/mixins/elPaginationHandle";
 import asyncRequest from "@/apis/service/search/standBook";
-import ExTable from "@/components/ExTableNew.vue";
 import addEdit from "./addEdit";
 import { mapGetters } from "vuex";
 import urlConfig from "@/apis/url-config";
@@ -121,9 +96,8 @@ export default {
   name: "Account",
   components: {
     addEdit,
-    ExTable,
   },
-  mixins: [mixinPage, resToken],
+  mixins: [ resToken],
   computed: {
     ...mapGetters(["tablebtnSize", "searchSize", "size"]),
     powers() {
@@ -148,74 +122,13 @@ export default {
       ],
       loading: true,
       showModel: false,
+      sitem: null,
       parmValue: {
         page: 1, // 页码
         size: 15, // 每页显示条数
       },
       // 表格 - 数据
       tableData: [],
-      // 表格 - 参数
-      table: {
-        stripe: true,
-        border: true,
-        _defaultHeader_: ["setcol"],
-      },
-      // 表格 - 分页
-      pageInfo: {
-        size: 15,
-        curr: 1,
-        total: 0,
-      },
-      // 表格 - 列参数
-      columns: [
-        {
-          prop: "name",
-          label: "业务表名称",
-          "min-width": "130px",
-        },
-        {
-          prop: "start",
-          label: "数据开始时间",
-          "min-width": "140px",
-        },
-        {
-          prop: "end",
-          width: "140px",
-          "min-width": "数据结束时间",
-        },
-        {
-          prop: "apply_name",
-          label: "申请人",
-          "min-width": "70px",
-        },
-        {
-          prop: "status",
-          label: "状态",
-          _slot_: "status",
-          "min-width": "70px",
-        },
-
-        {
-          prop: "expiretime",
-          label: "文件过期时间",
-          "min-width": "140px",
-          sortable: true,
-        },
-        {
-          prop: "addtime",
-          label: "创建时间",
-          "min-width": "140px",
-          sortable: true,
-        },
-        {
-          prop: "",
-          label: "操作",
-          fixed: "right",
-          width: "52px",
-          _noset_: true,
-          _slot_: "operation",
-        },
-      ],
     };
   },
   mounted() {
@@ -229,18 +142,17 @@ export default {
       };
       this.searchList();
     },
-    openModal(id, isDetail, sitem) {
+    openModal(sitem) {
       this.showModel = true;
+      this.sitem = sitem;
     },
 
     batchExport(content) {
       if (!this.loading) {
         this.loading = true;
         let aEle = document.createElement("a"); // 创建a标签
-        // aEle.download = fileName; // 设置下载文件的文件名
         aEle.href = this.fileUrl + content; // content为后台返回的下载地址
         aEle.click(); // 设置点击事件
-        // document.body.removeChild(aEle); //下载完成移除元素
         this.$message.success(`导出成功!`);
         setTimeout(() => {
           this.loading = false;
@@ -252,12 +164,10 @@ export default {
       const res = await asyncRequest.exportList(this.parmValue);
       if (res && res.code === 0 && res.data) {
         this.tableData = res.data.list;
-        this.pageInfo.total = Number(res.data.count);
       } else if (res && res.code >= 100 && res.code <= 104) {
         await this.logout();
       } else {
         this.tableData = [];
-        this.pageInfo.total = 0;
       }
       this.loading = false;
     },

Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels