Procházet zdrojové kódy

Merge branch 'test'

gks před 1 rokem
rodič
revize
76c4913b06

+ 110 - 52
src/utils/request.js

@@ -22,9 +22,63 @@ const service = axios.create({
   timeout: 60 * 60 * 1000
 })
 
+
+// 正在进行中的请求列表
+let reqList = [];
+let count = 0; // 请求接口计数器
+/**
+ * 阻止重复请求
+ * @param {array} reqList - 请求缓存列表
+ * @param {string} url - 当前请求地址
+ * @param {function} cancel - 请求中断函数
+ * @param {string} errorMessage - 请求中断时需要显示的错误信息
+ */
+const stopRepeatRequest = function (reqList, url, cancel, errorMessage) {
+  const errorMsg = errorMessage || ''
+  for (let i = 0; i < reqList.length; i++) {
+    if (reqList[i].url === url) {
+      // reqList[i].cancel(errorMsg); // 中断上一个重复请求
+      reqList[i].cancel(); // 中断上一个重复请求
+      reqList.splice(i, 1); // 删除上一个重复请求
+      reqList.push({ // 存储新的请求
+        url,
+        cancel
+      })
+      return
+    }
+  }
+  reqList.push({
+    url,
+    cancel
+  })
+}
+
+/**
+ * 允许某个请求可以继续进行
+ * @param {array} reqList 全部请求列表
+ * @param {string} url 请求地址
+ */
+const allowRequest = function (reqList, url) {
+  for (let i = 0; i < reqList.length; i++) {
+    if (reqList[i] === url) {
+      reqList.splice(i, 1)
+      break
+    }
+  }
+}
+
 // request拦截器
 service.interceptors.request.use(config => {
-  Vue.prototype.$layer.loading({content:'请稍等!'});
+  let cancel = null;
+  // 设置cancelToken对象
+  config.cancelToken = new axios.CancelToken(function (c) {
+    cancel = c
+  })
+  // 阻止重复请求。当上个请求未完成时,相同的请求不会进行
+  stopRepeatRequest(reqList, config.url, cancel, `${config.url} 请求被中断`)
+  // ++count;
+
+  Vue.prototype.$layer.loading({ content: '请稍等!' });
   // 是否需要设置 token
   const isToken = (config.headers || {}).isToken === false
   // 是否需要防止数据重复提交
@@ -63,46 +117,50 @@ service.interceptors.request.use(config => {
     config.params = {};
     config.url = url;
   }
-	if (!isRepeatSubmit && (config.method === 'post' || config.method === 'put')) {
-		const requestObj = {
-			url: config.url,
-			data: typeof config.data === 'object' ? JSON.stringify(config.data) : config.data,
-			time: new Date().getTime()
-		}
-		const sessionObj = cache.session.getJSON('sessionObj')
-		if (sessionObj === undefined || sessionObj === null || sessionObj === '') {
-			cache.session.setJSON('sessionObj', requestObj)
-		} else {
-			cache.session.setJSON('sessionObj', requestObj)
-		}
-	}
+  if (!isRepeatSubmit && (config.method === 'post' || config.method === 'put')) {
+    const requestObj = {
+      url: config.url,
+      data: typeof config.data === 'object' ? JSON.stringify(config.data) : config.data,
+      time: new Date().getTime()
+    }
+    const sessionObj = cache.session.getJSON('sessionObj')
+    if (sessionObj === undefined || sessionObj === null || sessionObj === '') {
+      cache.session.setJSON('sessionObj', requestObj)
+    } else {
+      cache.session.setJSON('sessionObj', requestObj)
+    }
+  }
   return config
 }, error => {
-    console.log(error)
-    Promise.reject(error)
+  console.log(error)
+  Promise.reject(error)
 })
 
 // 响应拦截器
 service.interceptors.response.use(res => {
-     setTimeout(() => {
-  	    Vue.prototype.$layer.closeAll('loading');
-     }, 500);
-    // 未设置状态码则默认成功状态
-    const code = res.data.code || 200;
-    // 获取错误信息
-    const msg = errorCode[code] || res.data.msg || errorCode['default']
-    // 二进制数据则直接返回
-    if(res.request.responseType ===  'blob' || res.request.responseType ===  'arraybuffer'){
-      return res.data
-    }
-    if (code === 401) {
-      if (!isRelogin.show) {
-        isRelogin.show = true;
-        MessageBox.confirm('登录状态已过期,您可以继续留在该页面,或者重新登录', '系统提示', {
-          confirmButtonText: '重新登录',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }
+  setTimeout(() => {
+    Vue.prototype.$layer.closeAll('loading');
+  }, 500);
+  // --count;
+  // if (count === 0) {
+  //   Vue.prototype.$layer.closeAll('loading');
+  // }
+  // 未设置状态码则默认成功状态
+  const code = res.data.code || 200;
+  // 获取错误信息
+  const msg = errorCode[code] || res.data.msg || errorCode['default']
+  // 二进制数据则直接返回
+  if (res.request.responseType === 'blob' || res.request.responseType === 'arraybuffer') {
+    return res.data
+  }
+  if (code === 401) {
+    if (!isRelogin.show) {
+      isRelogin.show = true;
+      MessageBox.confirm('登录状态已过期,您可以继续留在该页面,或者重新登录', '系统提示', {
+        confirmButtonText: '重新登录',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }
       ).then(() => {
         isRelogin.show = false;
         store.dispatch('LogOut').then(() => {
@@ -112,26 +170,26 @@ service.interceptors.response.use(res => {
         isRelogin.show = false;
       });
     }
-      return Promise.reject('无效的会话,或者会话已过期,请重新登录。')
-    } else if (code === 500) {
-      Message({
-        message: msg,
-        type: 'error'
-      })
-      return Promise.reject(new Error(msg))
-    } else if (code !== 200) {
-      Notification.error({
-        title: msg
-      })
-      return Promise.reject('error')
-    } else {
-      return res.data
-    }
-  },
+    return Promise.reject('无效的会话,或者会话已过期,请重新登录。')
+  } else if (code === 500) {
+    Message({
+      message: msg,
+      type: 'error'
+    })
+    return Promise.reject(new Error(msg))
+  } else if (code !== 200) {
+    Notification.error({
+      title: msg
+    })
+    return Promise.reject('error')
+  } else {
+    return res.data
+  }
+},
   error => {
     console.log('err' + error)
     setTimeout(() => {
-       Vue.prototype.$layer.closeAll('loading');
+      Vue.prototype.$layer.closeAll('loading');
     }, 500);
     let { message } = error;
     if (message == "Network Error") {

+ 94 - 45
src/views/BONDED/index.vue

@@ -56,16 +56,56 @@
     >
 <!--      <el-table-column type="selection" width="55" align="center" ></el-table-column>-->
       <el-table-column label="保税区名称" align="center" prop="deptName"></el-table-column>
-      <el-table-column label="产品定位" align="center" prop="industryOrientation"></el-table-column>
-      <el-table-column label="规划面积" align="center" prop="planningArea"></el-table-column>
-      <el-table-column label="验收面积" align="center" prop="acceptanceArea"></el-table-column>
-      <el-table-column label="已使用面积" align="center" prop="useArea"></el-table-column>
-      <el-table-column label="使用率" align="center" prop="usageRate"></el-table-column>
-      <el-table-column label="仓库面积" align="center" prop="warehouse"></el-table-column>
-      <el-table-column label="油库面积" align="center" prop="oilDepot"></el-table-column>
-      <el-table-column label="冷库面积" align="center" prop="refrigeratory"></el-table-column>
-      <el-table-column label="厂房面积" align="center" prop="workshop"></el-table-column>
-      <el-table-column label="批复面积" align="center" prop="approvalTime"></el-table-column>
+      <el-table-column label="产品定位" align="center" prop="industryOrientation" show-overflow-tooltip>
+        <template slot-scope="scope">
+          {{ scope.row.industryOrientation }}
+        </template>
+      </el-table-column>
+      <el-table-column label="规划面积(平方公里)" align="center" prop="planningArea">
+        <template slot-scope="scope">
+          {{ scope.row.planningArea }}
+        </template>
+      </el-table-column>
+      <el-table-column label="验收面积(平方公里)" align="center" prop="acceptanceArea">
+        <template slot-scope="scope">
+          {{ scope.row.acceptanceArea }}
+        </template>
+      </el-table-column>
+      <el-table-column label="批复时间" align="center" prop="approvalTime">
+        <template slot-scope="scope">
+          {{ scope.row.approvalTime }}
+        </template>
+      </el-table-column>
+      <el-table-column label="已使用面积(万平方米)" align="center" prop="useArea">
+        <template slot-scope="scope">
+          {{ scope.row.useArea }}
+        </template>
+      </el-table-column>
+      <el-table-column label="使用率" align="center" prop="usageRate">
+        <template slot-scope="scope">
+          {{ scope.row.usageRate }}%
+        </template>
+      </el-table-column>
+      <el-table-column label="标仓面积(万平方米)" align="center" prop="warehouse">
+        <template slot-scope="scope">
+          {{ scope.row.warehouse }}
+        </template>
+      </el-table-column>
+      <el-table-column label="油库面积(万平方米)" align="center" prop="oilDepot">
+        <template slot-scope="scope">
+          {{ scope.row.oilDepot }}
+        </template>
+      </el-table-column>
+      <el-table-column label="冷库面积(万平方米)" align="center" prop="refrigeratory">
+        <template slot-scope="scope">
+          {{ scope.row.refrigeratory }}
+        </template>
+      </el-table-column>
+      <el-table-column label="厂房面积(万平方米)" align="center" prop="workshop">
+        <template slot-scope="scope">
+          {{ scope.row.workshop }}
+        </template>
+      </el-table-column>
       <el-table-column
         label="操作"
         align="center"
@@ -92,16 +132,16 @@
       </el-table-column>
     </el-table>
 
-    <pagination
-      v-show="total > 0"
-      :total="total"
-      :page.sync="queryParams.pageNum"
-      :limit.sync="queryParams.pageSize"
-      @pagination="getList"
-    />
+<!--    <pagination-->
+<!--      v-show="total > 0"-->
+<!--      :total="total"-->
+<!--      :page.sync="queryParams.pageNum"-->
+<!--      :limit.sync="queryParams.pageSize"-->
+<!--      @pagination="getList"-->
+<!--    />-->
 
     <!-- 添加或修改保税区管理对话框 -->
-    <el-dialog :title="title" :visible.sync="open" :close-on-click-modal="false" width="50%" append-to-body>
+    <el-dialog :title="title" :visible.sync="open" :close-on-click-modal="false" width="50%" append-to-body novalidate>
       <el-form ref="form" :model="form" :rules="rules" label-width="100px">
         <el-row>
           <el-col :span="12">
@@ -111,7 +151,7 @@
           </el-col>
           <el-col :span="12">
             <el-form-item label="产品定位" prop="industryOrientation">
-              <el-input v-model="form.industryOrientation" placeholder="请输入"></el-input>
+              <el-input v-model="form.industryOrientation" placeholder="请输入" type="textarea" autosize></el-input>
             </el-form-item>
           </el-col>
         </el-row>
@@ -134,15 +174,15 @@
             </el-form-item>
           </el-col>
           <el-col :span="12">
-            <el-form-item label="仓面积" prop="warehouse">
-              <el-input type="number" v-model="form.warehouse" placeholder="请输入(平方米)"></el-input>
+            <el-form-item label="仓面积" prop="warehouse">
+              <el-input type="number" v-model="form.warehouse" placeholder="请输入(平方米)"></el-input>
             </el-form-item>
           </el-col>
         </el-row>
         <el-row>
           <el-col :span="12">
             <el-form-item label="油库面积" prop="oilDepot">
-              <el-input type="number" v-model="form.oilDepot" placeholder="请输入(平方米)"></el-input>
+              <el-input type="number" v-model="form.oilDepot" placeholder="请输入(平方米)"></el-input>
             </el-form-item>
           </el-col>
           <el-col :span="12">
@@ -176,7 +216,7 @@
 
       </el-form>
       <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button type="primary" @click="submitForm(form)">确 定</el-button>
         <el-button @click="cancel">取 消</el-button>
       </div>
     </el-dialog>
@@ -315,29 +355,38 @@ export default {
     },
     /** 提交按钮 */
     submitForm() {
-      this.form.acceptanceArea = parseFloat(this.form.acceptanceArea);
-      this.form.useArea = parseFloat(this.form.useArea);
-      this.form.warehouse = parseFloat(this.form.warehouse);
-      this.form.oilDepot = parseFloat(this.form.oilDepot);
-      this.form.refrigeratory = parseFloat(this.form.refrigeratory);
-      this.form.workshop = parseFloat(this.form.workshop);
-      this.$refs["form"].validate((valid) => {
-        if (valid) {
-          if (this.form.deptId != null) {
-            updateBONDED(this.form).then((response) => {
-              this.$modal.msgSuccess("修改成功");
-              this.open = false;
-              this.getList();
-            });
-          } else {
-            addBONDED(this.form).then((response) => {
-              this.$modal.msgSuccess("新增成功");
-              this.open = false;
-              this.getList();
-            });
+      // 验证输入是否是有效的数字
+      const isNumber = (value) => !isNaN(parseFloat(value)) && isFinite(value);
+      this.form.useArea = parseFloat(this.form.useArea)
+
+      if (isNumber(this.form.acceptanceArea) &&
+        isNumber(this.form.useArea) &&
+        isNumber(this.form.warehouse) &&
+        isNumber(this.form.oilDepot) &&
+        isNumber(this.form.refrigeratory) &&
+        isNumber(this.form.workshop) &&
+        isNumber(this.form.planningArea)) {
+        this.$refs["form"].validate((valid) => {
+          if (valid) {
+            if (this.form.deptId != null) {
+              updateBONDED(this.form).then((response) => {
+                this.$modal.msgSuccess("修改成功");
+                this.open = false;
+                this.getList();
+              });
+            } else {
+              addBONDED(this.form).then((response) => {
+                this.$modal.msgSuccess("新增成功");
+                this.open = false;
+                this.getList();
+              });
+            }
           }
-        }
-      });
+        });
+      } else {
+        // 处理无效输入的逻辑
+        this.$modal.msgError("请输入有效的数字");
+      }
     },
     /** 删除按钮操作 */
     handleDelete(row) {

+ 5 - 4
src/views/COMPANYUSER/index.vue

@@ -337,13 +337,13 @@
                 v-if="form.credentials"
                 :fit="'contain'"
                 style="
-                  width: 20%;
+                  width: 100px;
                   margin-top: 10px;
                   border-radius: 5px;
                   margin-bottom: -15px;
                 "
                 :z-index="500"
-                :src="this.baseURL + form.diploma"
+                :src="baseIP + form.diploma"
               ></el-image>
             </el-form-item>
           </el-col>
@@ -353,13 +353,13 @@
                 v-if="form.credentials"
                 :fit="'contain'"
                 style="
-                  width: 20%;
+                  width:100px;
                   margin-top: 10px;
                   border-radius: 5px;
                   margin-bottom: -15px;
                 "
                 :z-index="500"
-                :src="this.baseURL + form.credentials"
+                :src="baseIP + form.credentials"
               ></el-image>
             </el-form-item>
           </el-col>
@@ -416,6 +416,7 @@ export default {
       ],
       // 根路径
       baseURL: process.env.VUE_APP_BASE_API,
+      baseIP:process.env.VUE_APP_BASE_IP,
       // 遮罩层
       loading: true,
       // 选中数组

+ 193 - 0
src/views/CompanyUserService/index.vue

@@ -0,0 +1,193 @@
+<template>
+  <div>
+    <el-tabs v-model="activeName">
+      <el-tab-pane label="详细信息" name="详细信息">
+        <el-descriptions border>
+          <el-descriptions-item label="活动名称">{{ taskList.acname }}</el-descriptions-item>
+          <el-descriptions-item label="任务启动时间">
+            {{ taskList.beginTime ? taskList.beginTime.substr(0, 10) : '无' }}
+          </el-descriptions-item>
+          <el-descriptions-item label="业务备注">{{ taskList.fromKeyword }}</el-descriptions-item>
+          <el-descriptions-item label="流程名称">{{ taskList.proname }}</el-descriptions-item>
+          <el-descriptions-item label="审核状态">
+            <el-tag v-if="taskList.status == 1" type="success">同意</el-tag>
+            <el-tag v-else-if="taskList.status == 2" type="danger">驳回</el-tag>
+            <el-tag v-else-if="taskList.status == 3" type="info">退回</el-tag>
+            <el-tag v-else-if="taskList.status == 0">待审核</el-tag>
+          </el-descriptions-item>
+          <el-descriptions-item label="审核意见">{{ taskList.comments ? taskList.comments : '无' }}</el-descriptions-item>
+        </el-descriptions>
+        <el-form ref="form" :model="taskList" label-width="auto" style="margin-top: 20px">
+          <el-row>
+            <el-col :span="12">
+              <el-col :span="12">
+                <el-form-item label="姓名:">{{ getFormobjAttribute('nickName') }}</el-form-item>
+              </el-col>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="头像:">
+                <el-image
+                  :fit="'contain'"
+                  style="
+                  width: 100px;
+                  margin-top: 10px;
+                  border-radius: 5px;
+                  margin-bottom: -15px;"
+                  :z-index="50000"
+                  :src="baseUrl + getFormobjAttribute('userAvatar')"
+                  @click="showImagePreview(taskList.formobj.userAvatar)"
+                ></el-image>
+              </el-form-item>
+            </el-col>
+          </el-row>
+
+          <el-row>
+            <el-col :span="12">
+              <el-form-item label="类型:">
+                <span v-if="getFormobjAttribute('type') == 2">专家</span>
+                <span v-else>其它</span>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="民族:">{{ getFormobjAttribute('nation') }}</el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="12">
+              <el-form-item label="用户名:">{{ getFormobjAttribute('userName') }}</el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="学历:">{{ getFormobjAttribute('education') }}</el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="12">
+              <el-form-item label="服务方向:">{{ getFormobjAttribute('servicesAvailable') }}</el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="工作经验:">{{ getFormobjAttribute('experience') }}</el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="12">
+              <el-form-item label="专业领域:">{{ getFormobjAttribute('field') }}</el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="研究方向:">{{ getFormobjAttribute('research') }}</el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="12">
+              <el-form-item label="学位证书:">
+                <el-image
+                  :fit="'contain'"
+                  style="
+                  width: 30%;
+                  margin-top: 10px;
+                  border-radius: 5px;
+                  margin-bottom: -15px;"
+                  :z-index="50000"
+                  :src="baseUrl + getFormobjAttribute('diploma')"
+                  @click="showImagePreview(taskList.formobj.diploma)"
+                ></el-image>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="资格证书:">
+                <el-image
+                  :fit="'contain'"
+                  style="
+                width: 100px;
+                margin-top: 10px;
+                border-radius: 5px;
+                margin-bottom: -15px;
+              "
+                  :z-index="50000"
+                  :src="baseUrl + getFormobjAttribute('credentials')"
+                  @click="showImagePreview(taskList.formobj.credentials)"
+                ></el-image>
+               </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form>
+        <el-dialog :visible="BigImgVisible" :close-on-click-modal="false" fullscreen append-to-body @close="BigImgVisible = false">
+          <img width="100%" :src="getFormobjAttribute('fileUrl')" alt="" />
+        </el-dialog>
+      </el-tab-pane>
+      <el-tab-pane label="审批记录" name="审批记录">
+        <el-timeline>
+          <el-timeline-item v-for="(item, index) in taskList.taskHisAction" :timestamp="item.createTime" placement="top" :key="index + 'taskHisAction'">
+            <el-card>
+              <p>{{ item.execId }} {{ item.acname }} 于 {{ item.createTime }}</p>
+            </el-card>
+          </el-timeline-item>
+        </el-timeline>
+      </el-tab-pane>
+      <!-- 图片预览弹出框 -->
+      <el-dialog
+        :visible.sync="imagePreviewVisible"
+        width="50%"
+        title="预览图片"
+        :close-on-click-modal="true"
+      >
+        <img
+          :src="previewImageUrl"
+          style="width: 100%; height: auto;"
+          alt="预览图片"
+        />
+      </el-dialog>
+    </el-tabs>
+  </div>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      baseURL: process.env.VUE_APP_BASE_API,
+      activeName: '详细信息',
+      fileList: [],
+      BigImgVisible: false,
+      imagePreviewVisible: false, // 控制图片预览弹出框的显示与隐藏
+      previewImageUrl: '', // 预览图片的URL
+    };
+  },
+  props: ['taskList'],
+  created() {
+    if (this.taskList.formobj && this.taskList.formobj.fileUrl) {
+      this.fileList.push({
+        url: this.baseURL + this.taskList.formobj.fileUrl,
+        name: "xxx",
+      });
+    }
+  },
+  watch: {
+    taskList(curVal, oldVal) {
+      if (curVal) {
+        curVal.formobj.content = curVal.formobj.content.replace(new RegExp('/profile/upload/', 'g'), this.baseUrl + '/profile/upload/');
+        this.fileList.pop();
+        this.fileList.push({ url: this.baseUrl + curVal.formobj.fileUrl, name: "xxx", });
+      }
+    },
+  },
+  methods: {
+    handlePictureCardPreview(file) {
+      this.taskList.formobj.fileUrl = file.url;
+      this.BigImgVisible = true;
+    },
+    showImagePreview(url) {
+      this.previewImageUrl = this.baseURL + url;
+      this.imagePreviewVisible = true;
+    },
+    getFormobjAttribute(key) {
+      if(this.taskList.formobj) {
+        return this.taskList.formobj[key];
+      } else {
+        return "";
+      }
+    },
+  }
+};
+</script>
+
+<style></style>

+ 8 - 21
src/views/GATHER/index.vue

@@ -7,22 +7,6 @@
       :inline="true"
       v-show="showSearch"
     >
-      <!--      <el-form-item label="数据类型" prop="type">-->
-      <!--        <el-select-->
-      <!--          v-model="queryParams.type"-->
-      <!--          placeholder="请选择数据类型"-->
-      <!--          clearable-->
-      <!--          filterable-->
-      <!--          class="se"-->
-      <!--        >-->
-      <!--          <el-option-->
-      <!--            v-for="dict in typeList"-->
-      <!--            :key="dict.value + 'typeList'"-->
-      <!--            :label="dict.label"-->
-      <!--            :value="dict.value"-->
-      <!--          />-->
-      <!--        </el-select>-->
-      <!--      </el-form-item>-->
       <el-form-item label="采集状态" prop="collStatus">
         <el-select
           v-model="queryParams.collStatus"
@@ -101,21 +85,24 @@
 
     <el-row :gutter="10" class="mb8">
       <el-col :span="1.5">
-        <el-button type="success" @click="onOpenDialog('old')"
+        <el-button type="success" 
+        v-hasPermi="['gather:GATHER:upload']"
+        @click="onOpenDialog('old')"
           >历史数据导入</el-button
         >
       </el-col>
       <el-col :span="1.5">
         <el-button
           type="success"
-          v-hasPermi="['gather:GATHER:upload']"
+          v-hasPermi="['gather:GATHER:uploadnew']"
           @click="onOpenDialog('new')"
           >导入</el-button
         >
       </el-col>
       <el-col :span="1.5">
         <el-button
-          @click="handleDownload()"
+          @click="handleDownload()" 
+          v-hasPermi="['gather:GATHER:download']"
           :title="radio === '' ? '请先选择下面对应的单位模板' : ''"
           :disabled="radio === '' ? true : false"
           >下载导入模板</el-button
@@ -126,7 +113,7 @@
           type="danger"
           plain
           @click="importFile({ type: '0', mark: '1' })"
-          v-hasPermi="['gather:GATHER:upload']"
+          v-hasPermi="['gather:GATHER:customsMrak']"
           >海关部分贸易导入</el-button
         >
       </el-col>
@@ -135,7 +122,7 @@
           type="danger"
           plain
           @click="importFile({ type: '0', mark: '2' })"
-          v-hasPermi="['gather:GATHER:upload']"
+          v-hasPermi="['gather:GATHER:customs']"
           >海关进出口总值导入</el-button
         >
       </el-col>

+ 16 - 12
src/views/TQSJ/index.vue

@@ -23,17 +23,17 @@
           </el-option>
        </el-select>
       </el-form-item>
-
       <el-form-item label="时间类型">
 
         <el-select v-model="queryParams.dateType" placeholder="请选择" clearable filterable class="se" @change="selectChange">
           <el-option v-for="t in datelist" :key="t.value" :label="t.label" :value="t.value" />
         </el-select>
 
+        <el-date-picker v-if="queryParams.dateType == 1" v-model="queryParams.yearVlue" type="year" placeholder="选择年" value-format="yyyy" format="yyyy 年" style="margin-left: 10px;"></el-date-picker>
+
         <el-select v-if="queryParams.dateType == 1" v-model="formatY" placeholder="选择月" clearable filterable class="se" style="margin-left: 10px;">
-          <el-option v-for="t in 12" :key="t.value" :label="t + '月'" :value="t" />
+          <el-option v-for="t in 12" :key="t.value" :label="t + '月'" :value="t" />  
         </el-select>
-
         <el-select v-if="queryParams.dateType == 2" v-model="queryParams.dateValue" placeholder="选择季度" clearable filterable class="se" style="margin-left: 10px;">
           <el-option v-for="t in jdlist" :key="t.value" :label="t.label" :value="t.value"/>
         </el-select>
@@ -121,7 +121,7 @@
         </el-table-column>
       </el-table-column> 
 
-       <el-table-column align="center" prop="colName" v-if="queryParams.dateType == '2' || queryParams.dateType == ''">
+       <!-- <el-table-column align="center" prop="colName" v-if="queryParams.dateType == '2' || queryParams.dateType == ''">
         <template slot="header" slot-scope="scope">
           {{ (timeValue[1]?timeValue[1] + '季度':'季度').replace('-','年第') }}
         </template>
@@ -142,27 +142,27 @@
             <el-tag type="danger" v-else-if="scope.row.datails[1].redio <0">{{scope.row.datails[1].redio+'%'}}</el-tag>
           </template>
         </el-table-column>
-      </el-table-column>
+      </el-table-column> -->
 
       <el-table-column align="center" prop="colName" v-if="queryParams.dateType == '3' || queryParams.dateType == ''">
         <template slot="header" slot-scope="scope">
-          {{ timeValue[2]?timeValue[2] + '年度':'年度' }}
+          {{ timeValue[1]?timeValue[1] + '年度':'年度' }}
         </template>
         <el-table-column label="对比值(去年)" align="center" prop="colName" width="120px">
           <template slot-scope="scope">
-            {{ scope.row.datails[2].oldValue }}
+            {{ scope.row.datails[1].oldValue }}
           </template>
         </el-table-column>
         <el-table-column label="当前" align="center" prop="colName">
           <template slot-scope="scope">
-            {{ scope.row.datails[2].nowValue }}
+            {{ scope.row.datails[1].nowValue }}
           </template>
         </el-table-column>
         <el-table-column label="同比%" align="center" prop="colName">
           <template slot-scope="scope">
-            <el-tag v-if="scope.row.datails[2].redio==0">持平</el-tag>
-            <el-tag type="success" v-else-if="scope.row.datails[2].redio >0">{{scope.row.datails[2].redio+'%'}}</el-tag>
-            <el-tag type="danger" v-else-if="scope.row.datails[2].redio <0">{{scope.row.datails[2].redio+'%'}}</el-tag>
+            <el-tag v-if="scope.row.datails[1].redio==0">持平</el-tag>
+            <el-tag type="success" v-else-if="scope.row.datails[1].redio >0">{{scope.row.datails[1].redio+'%'}}</el-tag>
+            <el-tag type="danger" v-else-if="scope.row.datails[1].redio <0">{{scope.row.datails[1].redio+'%'}}</el-tag>
           </template>
         </el-table-column>
       </el-table-column> 
@@ -188,7 +188,7 @@ export default {
       ],
       datelist:[
         { label: '月', value: '1' },
-        { label: '季度', value: '2' },
+        // { label: '季度', value: '2' },
         { label: '年', value: '3' },
       ],
       jdlist:[
@@ -213,6 +213,7 @@ export default {
         dateType:'',  //查询时间类型(1=月,2=季度,3=年)
         dateValue:'', //查询时间值
         normFeeId:'',  //指标明细id
+        yearVlue:'',//如果选了月  那这里接收年的值 选的年还是传的dateValue
       },
       normFeelistAll:[],  //指标列表
       regionList:[],  //保税区列表
@@ -226,6 +227,7 @@ export default {
   methods: {
     selectChange(val){
       this.queryParams.dateValue = ''
+      this.queryParams.yearVlue = ''
     },
     getList() {
       this.timeValue = []
@@ -280,6 +282,8 @@ export default {
       this.queryParams.dateType = '';
       this.queryParams.dateValue = '';
       this.queryParams.normFeeId = '';
+      this.queryParams.yearVlue = '';
+      this.formatY = ''
       this.resetForm('queryForm');
     },
   }

+ 31 - 112
src/views/task/index.vue

@@ -1,46 +1,22 @@
 <template>
   <div class="app-container">
-    <el-form
-      :model="queryParams"
-      ref="queryForm"
-      :inline="true"
-      v-show="showSearch"
-    >
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch">
       <el-form-item label="活动名称" prop="acname">
-        <el-input
-          v-model="queryParams.acname"
-          placeholder="请输入活动名称"
-        ></el-input>
+        <el-input v-model="queryParams.acname" placeholder="请输入活动名称"></el-input>
       </el-form-item>
       <el-form-item label="审核状态" prop="status">
-        <el-select
-          v-model="queryParams.status"
-          placeholder="请选择审核状态"
-          clearable
-          filterable
-        >
-          <el-option
-            v-for="dict in statusList"
-            :key="dict.value + 'statusList'"
-            :label="dict.label"
-            :value="dict.value"
-          />
+        <el-select v-model="queryParams.status" placeholder="请选择审核状态" clearable filterable>
+          <el-option v-for="dict in statusList" :key="dict.value + 'statusList'" :label="dict.label"
+            :value="dict.value" />
         </el-select>
       </el-form-item>
       <el-form-item>
-        <el-button type="primary" icon="el-icon-search" @click="handleQuery"
-          >搜索</el-button
-        >
-        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
-          >重置</el-button
-        >
+        <el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
       </el-form-item>
     </el-form>
 
-    <el-table
-      :data="INSTACTIONTASKList"
-      @selection-change="handleSelectionChange"
-    >
+    <el-table :data="INSTACTIONTASKList" @selection-change="handleSelectionChange">
       <!-- <el-table-column type="selection" width="55" align="center" /> -->
       <el-table-column label="活动名称" align="center" prop="acname">
         <template slot-scope="scope">
@@ -65,9 +41,7 @@
       <el-table-column label="审核状态" align="center" prop="status">
         <template slot-scope="scope">
           <el-tag v-if="scope.row.status == '1'" type="success">同意</el-tag>
-          <el-tag v-else-if="scope.row.status == '2'" type="danger"
-            >驳回</el-tag
-          >
+          <el-tag v-else-if="scope.row.status == '2'" type="danger">驳回</el-tag>
           <el-tag v-else-if="scope.row.status == '3'" type="info">退回</el-tag>
           <el-tag v-else-if="scope.row.status == '0'">待审核</el-tag>
         </template>
@@ -77,81 +51,29 @@
           {{ scope.row.comments }}
         </template>
       </el-table-column>
-      <el-table-column
-        label="操作"
-        align="center"
-        class-name="small-padding fixed-width"
-      >
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
         <template slot-scope="scope">
-          <el-button
-            v-if="scope.row.status == '0'"
-            size="mini" type="text"
-            @click="handleExamine(scope.row)"
-            v-hasPermi="['business:INSTACTIONTASK:task']"
-          >详情</el-button>
+          <el-button v-if="scope.row.status == '0'" size="mini" type="text" @click="handleExamine(scope.row)"
+            v-hasPermi="['business:INSTACTIONTASK:task']">详情</el-button>
 
-          <el-button
-            v-if="scope.row.status == '0'"
-            size="mini"
-            type="text"
-            @click="handlePass(scope.row)"
-            v-hasPermi="['business:INSTACTIONTASK:task']"
-            >通过审核</el-button
-          >
-          <el-button
-            v-if="scope.row.status == '0'"
-            size="mini"
-            type="text"
-            @click="handleReject(scope.row)"
-            v-hasPermi="['business:INSTACTIONTASK:task']"
-            >驳回</el-button
-          >
+          <el-button v-if="scope.row.status == '0'" size="mini" type="text" @click="handlePass(scope.row)"
+            v-hasPermi="['business:INSTACTIONTASK:task']">通过审核</el-button>
+          <el-button v-if="scope.row.status == '0'" size="mini" type="text" @click="handleReject(scope.row)"
+            v-hasPermi="['business:INSTACTIONTASK:task']">驳回</el-button>
 
-          <el-button
-            size="mini"
-            type="text"
-            @click="handleDetail(scope.row)"
-            v-hasPermi="['business:INSTACTIONTASK:detail']"
-            v-if="scope.row.status != '0'"
-            >详情</el-button
-          >
+          <el-button size="mini" type="text" @click="handleDetail(scope.row)"
+            v-hasPermi="['business:INSTACTIONTASK:detail']" v-if="scope.row.status != '0'">详情</el-button>
         </template>
       </el-table-column>
     </el-table>
 
-    <el-dialog
-      title="审核"
-      :visible.sync="dialogVisible"
-      width="80%"
-      :close-on-click-modal="false"
-      @close="closeDia"
-    >
-      <component
-        :is="componentUrl"
-        :taskList="taskList"
-        ref="componentSH"
-      ></component>
-      <el-dialog
-        width="60%"
-        :title="subTitle + '审核'"
-        :visible.sync="innerVisible"
-        :close-on-click-modal="false"
-        append-to-body
-        center
-        @close="qx()"
-      >
-        <el-form
-          :model="subForm"
-          :rules="subFormRules"
-          label-width="100px"
-          ref="extaskform"
-        >
+    <el-dialog title="审核" :visible.sync="dialogVisible" width="80%" :close-on-click-modal="false" @close="closeDia">
+      <component :is="componentUrl" :taskList="taskList" ref="componentSH"></component>
+      <el-dialog width="60%" :title="subTitle + '审核'" :visible.sync="innerVisible" :close-on-click-modal="false"
+        append-to-body center @close="qx()">
+        <el-form :model="subForm" :rules="subFormRules" label-width="100px" ref="extaskform">
           <el-form-item label="审核意见">
-            <el-input
-              type="textarea"
-              v-model="subForm.comments"
-              placeholder="请输入审核意见"
-            ></el-input>
+            <el-input type="textarea" v-model="subForm.comments" placeholder="请输入审核意见"></el-input>
           </el-form-item>
         </el-form>
         <div slot="footer" class="dialog-footer">
@@ -170,13 +92,8 @@
       </span>
     </el-dialog>
 
-    <pagination
-      v-show="total > 0"
-      :total="total"
-      :page.sync="queryParams.pageNum"
-      :limit.sync="queryParams.pageSize"
-      @pagination="getList"
-    />
+    <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
+      @pagination="getList" />
   </div>
 </template>
 
@@ -185,6 +102,7 @@
 import newsTask from "@/views/news/task/index.vue";
 import couTask from "@/views/COUNSELINGMESSAGE/task/index.vue";
 import ModifyCompanyUserService from "@/views/REGISTERTASK/index.vue";
+import CompanyUserService from "@/views/CompanyUserService/index.vue";
 import questionService from "@/views/QUESTION/questionService.vue";
 import articleTask from "@/views/ARTICLE/task/index.vue";
 import dataAcquisition from "@/components/DataAcquisition";
@@ -211,6 +129,7 @@ export default {
     questionService,
     articleTask,
     dataAcquisition,
+    CompanyUserService,
   },
   data() {
     return {
@@ -414,7 +333,7 @@ export default {
     handleExamine(row) {
       // this.taskList = []
       getINSTACTIONTASK(row.id).then((res) => {
-        console.log('111111',res);
+        console.log('111111', res);
         this.taskList = res.data;
         this.componentUrl = res.data.infoUrl;
         this.dialogVisible = true;
@@ -423,7 +342,7 @@ export default {
     //点击查看详细
     handleDetail(row) {
       getINSTACTIONTASK(row.id).then((res) => {
-        console.log('666',res);
+        console.log('666', res);
         this.taskList = res.data;
         this.componentUrl = res.data.infoUrl;
         downloadpic(this.taskList.formobj.picture).then((res) => {
@@ -526,7 +445,7 @@ export default {
           this.getList();
           this.$modal.msgSuccess("删除成功");
         })
-        .catch(() => {});
+        .catch(() => { });
     },
     /** 导出按钮操作 */
     handleExport() {