Browse Source

Merge branch 'master'

gks 1 year ago
parent
commit
8bfbddf507

+ 3 - 6
src/api/common.js

@@ -1,5 +1,6 @@
 import request from '@/utils/request'
 
+import download from '@/plugins/download'
 // 通用上传(单文件)
 export function uploadFile(data) {
   return request({
@@ -21,10 +22,6 @@ export function uploadFiles(data) {
 }
 
 // 下载
-export function downloadFiles(resource) {
-  return request({
-    url: '/common/download/resource?resource=' + encodeURI(resource),
-    method: 'get',
-    timeout: 2000000
-  })
+export function downloadFiles(data) {
+  download.resource(data);
 }

+ 0 - 1
src/api/portal/JOINTCONFERENCE/JOINTCONFERENCE.js

@@ -43,7 +43,6 @@ export function setMeetingReply(data) {
   })
 }
 
-// 联席会议详回复
 export function fileDownloadFun(data) {
   return request({
     url: '/common/download',

+ 2 - 2
src/views/AttendMeeting/index.vue

@@ -132,14 +132,14 @@
             size="mini"
             type="text"
             @click="handleUnit(scope.row)"
-            v-hasPermi="['business:JOINTCONFERENCE:query']"
+            v-hasPermi="['business:JOINTCONFERENCE:add']"
             >单位指派</el-button
           >
           <el-button
             size="mini"
             type="text"
             @click="handleReply(scope.row)"
-            v-hasPermi="['business:JOINTCONFERENCE:query']"
+            v-hasPermi="['business:JOINTCONFERENCE:edit']"
             >会议回复</el-button
           >
         </template>

+ 1 - 1
src/views/ECONOMICSINDEX/index.vue

@@ -86,7 +86,7 @@
         prop="id"
       >
       </el-table-column> -->
-      <el-table-column label="进出口总值 " align="center" prop="jckzz">
+      <el-table-column label="进出口总值" align="center" prop="jckzz">
       </el-table-column>
       <el-table-column label="加工贸易进出口值 " align="center" prop="jgmyjckz">
       </el-table-column>

+ 84 - 67
src/views/GATHER/index.vue

@@ -238,7 +238,7 @@
         prop="approveTime"
         width="100"
       />
-      <el-table-column label="审核状态" align="center" prop="audit">
+      <el-table-column label="审核状态" align="center" prop="approveStatus">
         <template slot-scope="scope">
           <span v-if="scope.row.audit == 0">未提交审核</span>
           <span v-if="scope.row.audit == 1 && scope.row.approveStatus == 0"
@@ -359,12 +359,13 @@
             @click="handleDetail(scope.row, 0)"
             >查看</el-button
           >
+          <!-- {{scope.row.collStatus}}--{{scope.row.approveStatus}} -->
           <el-button
             style="margin: 0 2px"
             v-if="
-              scope.row.collStatus == 1 &&
-              scope.row.audit == 0 &&
-              checkPermi(['gather:GATHER:edit'])
+              scope.row.collStatus == 1 &&         // 已采集
+              scope.row.approveStatus == 0 &&              // 未审核
+              checkPermi(['gather:GATHER:edit'])   // 编辑权限
             "
             size="mini"
             type="text"
@@ -460,32 +461,29 @@
           :label="item.normName"
           :name="item.normName"
         >
-          <el-form
-            v-for="(listItem, listIndex) in form.feeLists"
-            :key="index + listIndex + listItem.normId"
-            :rules="validatorList(listItem.normfeeName)"
-            :model="listItem"
-            :ref="'form' + listIndex"
-          >
-            <!-- :rules="rules" ref="form" -->
-            <el-form-item
-              :key="listItem.normfeeId"
-              :label="
-                listItem.normfeeName + '(' + listItem.funit_dictText + ')'
-              "
+          <template v-for="(listItem) in form.feeLists">
+            <el-form
               v-if="listItem.normId == item.normId"
-              prop="collCalue"
-            >
-              <!-- 这里科研失败!想动态绑定校验规则的 -->
-              <!-- :prop="listItem.normfeeId" -->
-              <!-- :rules="rules.listItem.normfeeId" -->
-              <el-input
-                v-model="listItem.collCalue"
-                :placeholder="'请输入' + listItem.normfeeName"
-              ></el-input>
-            </el-form-item>
-          </el-form>
-
+              :rules="validatorList(listItem.normfeeName)"
+              :model="listItem"
+              :ref="'form' + listItem.normfeeId"
+              :key="listItem.normfeeId"
+            > <!-- :key="index + listIndex + listItem.normId" -->
+              <!-- :rules="rules" ref="form" -->
+              <el-form-item
+                :label="listItem.normfeeName + '(' + listItem.funit_dictText + ')'"
+                prop="collCalue"
+              >
+                <!-- 这里科研失败!想动态绑定校验规则的 -->
+                <!-- :prop="listItem.normfeeId" -->
+                <!-- :rules="rules.listItem.normfeeId" -->
+                <el-input
+                  v-model="listItem.collCalue"
+                  :placeholder="'请输入' + listItem.normfeeName"
+                ></el-input>
+              </el-form-item>
+            </el-form>
+          </template>
           <!-- 这里是第二种写法 -->
           <!-- <el-form :model="form" label-width="300px">
             <el-form-item
@@ -503,18 +501,15 @@
       </el-tabs>
       <template v-else-if="this.form.type == 1">
         <el-form
-          v-for="(listItem, listIndex) in form.feeLists"
+          v-for="(listItem) in form.feeLists"
           :model="listItem"
-          :ref="'form' + listIndex"
+          :ref="'form' + listItem.normfeeId"
           :rules="rules"
-          :key="listIndex"
+          :key="listItem.normfeeId"
         >
           <!-- :rules="rules" ref="form" -->
           <el-form-item
-            :key="listItem.normfeeId"
-            :label="
-              listItem.normfeeName + '(' + listItem.funit_dictText + ')'
-            "
+            :label="listItem.normfeeName + '(' + listItem.funit_dictText + ')'"
             prop="collCalue"
           >
             <!-- 这里科研失败!想动态绑定校验规则的 -->
@@ -554,32 +549,30 @@
           :label="item.normName"
           :name="item.normName"
         >
-          <el-form
-            v-for="(listItem, listIndex) in form.feeLists"
-            :model="listItem"
-            :ref="'form' + listIndex"
-            :rules="rules"
-            :key="listIndex"
-          >
-            <!-- :rules="rules" ref="form" -->
-            <el-form-item
-              prop="collCalue"
-              :key="listItem.normfeeId"
-              :label="
-                listItem.normfeeName + '(' + listItem.funit_dictText + ')'
-              "
+          <template v-for="(listItem) in form.feeLists">
+            <el-form
               v-if="listItem.normId == item.normId"
+              :model="listItem"
+              :ref="'form' + listItem.normfeeId"
+              :rules="rules"
+              :key="listItem.normfeeId"
             >
-              <!-- 这里科研失败!想动态绑定校验规则的 -->
-              <!-- :prop="listItem.normfeeId" -->
-              <!-- :rules="rules.listItem.normfeeId" -->
-              <el-input
-                :disabled="!edit"
-                v-model="listItem.collCalue"
-                :placeholder="'请输入' + listItem.normfeeName"
-              ></el-input>
-            </el-form-item>
-          </el-form>
+              <!-- :rules="rules" ref="form" -->
+              <el-form-item
+                prop="collCalue"
+                :label="listItem.normfeeName + '(' + listItem.funit_dictText + ')'"
+              >
+                <!-- 这里科研失败!想动态绑定校验规则的 -->
+                <!-- :prop="listItem.normfeeId" -->
+                <!-- :rules="rules.listItem.normfeeId" -->
+                <el-input
+                  :disabled="!edit"
+                  v-model="listItem.collCalue"
+                  :placeholder="'请输入' + listItem.normfeeName"
+                ></el-input>
+              </el-form-item>
+            </el-form>
+          </template>
 
           <!-- 这里是第二种写法 -->
           <!-- <el-form :model="form" label-width="150px">
@@ -597,16 +590,37 @@
         </el-tab-pane>
       </el-tabs>
 
+      <template v-else-if="this.form.type == 1">
+        <el-form
+          v-for="(listItem) in form.feeLists"
+          :model="listItem"
+          :ref="'form' + listItem.normfeeId"
+          :rules="rules"
+          :key="listItem.normfeeId"
+        >
+          <!-- :rules="rules" ref="form" -->
+          <el-form-item
+            :label="listItem.normfeeName + '(' + listItem.funit_dictText + ')'"
+            prop="collCalue"
+          >
+            <!-- 这里科研失败!想动态绑定校验规则的 -->
+            <!-- :prop="listItem.normfeeId" -->
+            <!-- :rules="rules.listItem.normfeeId" -->
+            <el-input
+              v-model="listItem.collCalue"
+              :placeholder="'请输入' + listItem.normfeeName"
+            ></el-input>
+          </el-form-item>
+        </el-form>
+      </template>
+
+      <!--
       <el-form :model="form" v-else-if="this.form.type == 1">
-        <!-- :rules="rules" ref="form" -->
         <el-form-item
           v-for="(listItem, listIndex) in form.feeLists"
           :key="listIndex"
           :label="listItem.normfeeName + '(' + listItem.funit_dictText + ')'"
         >
-          <!-- 这里科研失败!想动态绑定校验规则的 -->
-          <!-- :prop="listItem.normfeeId" -->
-          <!-- :rules="rules.listItem.normfeeId" -->
           <el-input
             :disabled="!edit"
             v-model="listItem.collCalue"
@@ -614,6 +628,7 @@
           ></el-input>
         </el-form-item>
       </el-form>
+      -->
       <div slot="footer" class="dialog-footer">
         <el-button type="primary" @click="submitForm('edit')" v-if="edit"
           >确 定</el-button
@@ -754,7 +769,7 @@ export default {
       let reg = /^[+-]?(0|([1-9]\d*))(\.\d+)?$/g;
       if (!reg.test(value)) {
         callback(new Error("请输入数字和正确格式的数字"));
-      } else if (value.split(".").length > 2) {
+      } else if (typeof value == 'string' && value.split(".").length > 2) {
         callback(new Error("请输入正确格式的数字")); //防止输入多个小数点
       }
       // else if (value.indexOf('.') != -1 && value.split('.')[1].length > 2) {
@@ -768,7 +783,7 @@ export default {
       let reg = /^[+]?(0|([1-9]\d*))(\.\d+)?$/g;
       if (!reg.test(value)) {
         callback(new Error("请输入正数和正确格式的数字"));
-      } else if (value.split(".").length > 2) {
+      } else if (typeof value == 'string' && value.split(".").length > 2) {
         callback(new Error("请输入正确格式的数字")); //防止输入多个小数点
       }
       // else if (value.indexOf('.') != -1 && value.split('.')[1].length > 2) {
@@ -1137,7 +1152,8 @@ export default {
       let p = [];
       p = this.form.feeLists.map((item, index) => {
         return new Promise((resolve, reject) => {
-          this.$refs["form" + index][0].validate((valid) => {
+          this.$refs["form" + item.normfeeId][0].validate((valid) => {
+          // this.$refs["form" + index].validate((valid) => {
             if (valid) {
               resolve(); //完成态
             } else {
@@ -1164,6 +1180,7 @@ export default {
         })
         .catch((err) => {
           console.log(err);
+          debugger;
           this.$message.error("请检查是否有必填项未输入!");
         });
     },

+ 82 - 32
src/views/GATHERWARNING/index.vue

@@ -71,12 +71,18 @@
           <span v-else-if="scope.row.type == 1">月报表数据</span>
         </template>
       </el-table-column>
-      <el-table-column label="异常数据名称" align="center" prop="gatherFeeName">
+      <el-table-column label="指标名称" align="center" prop="gatherFeeName">
         <template slot-scope="scope">
           {{ scope.row.gatherFeeName }}
         </template>
       </el-table-column>
-      <el-table-column label="异常详细数据值" align="center" prop="errValue">
+      <el-table-column label="采集参考值" align="center" prop="gatherFeeName">
+        <template slot-scope="scope">
+          <span v-if="scope.row.collValue">{{ scope.row.collValue }}</span>
+          <span v-else>无</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="实际值" align="center" prop="errValue">
         <template slot-scope="scope">
           {{ scope.row.errValue }}
         </template>
@@ -119,31 +125,54 @@
         class-name="small-padding fixed-width"
       >
         <!-- 状态是“已解除”时不显示 -->
-        <template slot-scope="scope" v-if="scope.row.status != '1'">
-          <el-popconfirm title="确定处理吗?" @confirm="handleDeal(scope.row)">
-            <el-button
-              size="mini"
-              type="text"
-              slot="reference"
-              v-hasPermi="['business:GATHERWARNING:edit']"
-              >处理</el-button
-            >
-          </el-popconfirm>
 
+        <template slot-scope="scope" v-if="scope.row.status != '1'">
+          <el-button
+            size="mini"
+            type="text"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['business:GATHERWARNING:edit']"
+          >处理</el-button
+          >
           <el-popconfirm
             title="确定取消吗?"
             @confirm="handleCancel(scope.row)"
           >
             <el-button
-            style="margin-left: 5px;"
+              style="margin-left: 5px;"
               size="mini"
               type="text"
               slot="reference"
               v-hasPermi="['business:GATHERWARNING:remove']"
-              >取消</el-button
+            >取消</el-button
             >
           </el-popconfirm>
         </template>
+<!--        <template slot-scope="scope" v-if="scope.row.status != '1'">-->
+<!--          <el-popconfirm title="确定处理吗?" @confirm="handleDeal(scope.row)">-->
+<!--            <el-button-->
+<!--              size="mini"-->
+<!--              type="text"-->
+<!--              slot="reference"-->
+<!--              v-hasPermi="['business:GATHERWARNING:edit']"-->
+<!--              >处理</el-button-->
+<!--            >-->
+<!--          </el-popconfirm>-->
+
+<!--          <el-popconfirm-->
+<!--            title="确定取消吗?"-->
+<!--            @confirm="handleCancel(scope.row)"-->
+<!--          >-->
+<!--            <el-button-->
+<!--            style="margin-left: 5px;"-->
+<!--              size="mini"-->
+<!--              type="text"-->
+<!--              slot="reference"-->
+<!--              v-hasPermi="['business:GATHERWARNING:remove']"-->
+<!--              >取消</el-button-->
+<!--            >-->
+<!--          </el-popconfirm>-->
+<!--        </template>-->
       </el-table-column>
     </el-table>
 
@@ -157,18 +186,36 @@
 
     <!-- 添加或修改数据采集预警对话框 -->
     <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
-      <!-- <el-form ref="form" :model="form" :rules="rules" label-width="80px">
-        <el-form-item label="数据类型(0=量化指标数据,1=月报表数据)" prop="type">
-          <el-select v-model="form.type" placeholder="请选择数据类型(0=量化指标数据,1=月报表数据)" filterable>
-            <el-option
-              v-for="dict in dict.type.${dictType}"
-              :key="dict.value"
-              :label="dict.label"
-:value="dict.value"
-            ></el-option>
-          </el-select>
+      <el-form ref="form" :model="form" :rules="rules" label-width="150px">
+<!--        <el-form-item label="数据类型(0=量化指标数据,1=月报表数据)" prop="type">-->
+<!--          <el-select v-model="form.type" placeholder="请选择数据类型(0=量化指标数据,1=月报表数据)" filterable>-->
+<!--            <el-option-->
+<!--              v-for="dict in dict.type.${dictType}"-->
+<!--              :key="dict.value"-->
+<!--              :label="dict.label"-->
+<!--:value="dict.value"-->
+<!--            ></el-option>-->
+<!--          </el-select>-->
+<!--        </el-form-item>-->
+        <el-form-item label="数据类型">
+          <template slot-scope="scope">
+            <span v-if="form.type == 0">量化指标数据</span>
+            <span v-else-if="form.type == 1">月报表数据</span>
+          </template>
+        </el-form-item>
+        <el-form-item label="异常数据名称">
+          {{form.gatherFeeName}}
+        </el-form-item>
+        <el-form-item label="采集参考值">
+          <template slot-scope="scope">
+            <span v-if="form.collValue">{{ form.collValue }}</span>
+            <span v-else>无</span>
+          </template>
         </el-form-item>
-      </el-form> -->
+        <el-form-item label="实际值" prop="errValue">
+          <el-input v-model="form.errValue" type="number"></el-input>
+        </el-form-item>
+      </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button type="primary" @click="submitForm">确 定</el-button>
         <el-button @click="cancel">取 消</el-button>
@@ -291,6 +338,7 @@ export default {
           { required: true, message: "取消时间不能为空", trigger: "blur" },
         ],
         remark: [{ required: true, message: "备注不能为空", trigger: "blur" }],
+        collValue:[{ required: true, message: "修改值不能为空", trigger: "blur" }],
       },
     };
   },
@@ -309,10 +357,13 @@ export default {
     },
     //处理预警
     handleDeal(row) {
-      deal(row.id).then((res) => {
-        this.$modal.msgSuccess("处理成功");
-        this.getList();
-      });
+      this.title = "处理预警";
+        // 是否显示弹出层
+      this.open =  true;
+      // deal(row.id).then((res) => {
+      //   this.$modal.msgSuccess("处理成功");
+      //   this.getList();
+      // });
     },
     //取消预警
     handleCancel(row) {
@@ -368,7 +419,6 @@ export default {
     },
     /** 修改按钮操作 */
     handleUpdate(row) {
-      this.reset();
       const id = row.id || this.ids;
       getGATHERWARNING(id).then((response) => {
         this.form = response.data;
@@ -381,8 +431,8 @@ export default {
       this.$refs["form"].validate((valid) => {
         if (valid) {
           if (this.form.id != null) {
-            updateGATHERWARNING(this.form).then((response) => {
-              this.$modal.msgSuccess("修改成功");
+            deal(this.form.id).then((response) => {
+              this.$modal.msgSuccess("处理成功");
               this.open = false;
               this.getList();
             });

+ 1 - 1
src/views/JOINTCONFERENCE/index.vue

@@ -132,7 +132,7 @@
             size="mini"
             type="text"
             @click="handleUnit(scope.row)"
-            v-hasPermi="['business:JOINTCONFERENCE:query']"
+            v-hasPermi="['business:JOINTCONFERENCE:add']"
             >单位指派</el-button
           >
         </template>

+ 36 - 25
src/views/TOTEXP/index.vue

@@ -124,16 +124,21 @@
           {{ scope.row.imExport }}
         </template>
       </el-table-column>
-      <!--      <el-table-column label="创建时间" align="center" prop="createTime">-->
-      <!--        <template slot-scope="scope">-->
-      <!--          {{scope.row.deptId}}-->
-      <!--        </template>-->
-      <!--      </el-table-column>-->
-      <!--      <el-table-column label="录入人" align="center" prop="createBy">-->
-      <!--        <template slot-scope="scope">-->
-      <!--          {{scope.row.deptId}}-->
-      <!--        </template>-->
-      <!--      </el-table-column>-->
+      <el-table-column label="市进出口值" align="center" prop="cityTotal">
+        <template slot-scope="scope">
+          {{scope.row.cityTotal}}
+        </template>
+      </el-table-column>
+<!--      <el-table-column label="创建时间" align="center" prop="createTime">-->
+<!--        <template slot-scope="scope">-->
+<!--          {{scope.row.deptId}}-->
+<!--        </template>-->
+<!--      </el-table-column>-->
+<!--      <el-table-column label="录入人" align="center" prop="createBy">-->
+<!--        <template slot-scope="scope">-->
+<!--          {{scope.row.deptId}}-->
+<!--        </template>-->
+<!--      </el-table-column>-->
       <el-table-column label="年份" align="center" prop="year">
         <template slot-scope="scope">
           {{ scope.row.year }}
@@ -174,15 +179,16 @@
     />
 
     <!-- 添加或修改保税区进出口总值数据对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+    <el-dialog :title="title" :visible.sync="open" width="580px" append-to-body>
       <el-form :ref="'form'" :model="form" :rules="rules" label-width="80px">
-        <el-form-item prop="deptId" label-width="100px" label="保税区名称">
+        <el-form-item prop="deptId" label-width="120px" label="保税区名称">
           <el-select
             v-model="form.deptId"
             filterable
             default-first-option
             clearable
             placeholder="请选择保税区"
+            style="width: 100%;"
           >
             <el-option
               v-for="item in deptList"
@@ -193,8 +199,8 @@
             </el-option>
           </el-select>
         </el-form-item>
-        <el-form-item prop="year" label-width="100px" label="年份">
-          <!-- <el-select v-model="form.year" filterable default-first-option clearable placeholder="请选择年份">
+        <el-form-item prop="year" label-width="120px" label="年份">
+          <el-select v-model="form.year" style="width: 100%;" filterable default-first-option clearable placeholder="请选择年份">
             <el-option
               v-for="(item,index) in nearYearList"
               :key="index"
@@ -202,13 +208,14 @@
               type="month"
               :value="item">
             </el-option>
-          </el-select> -->
-          <el-date-picker
-            v-model="form.year"
-            type="month"
-            placeholder="请选择年月"
-          >
-          </el-date-picker>
+          </el-select>
+<!--          我只要年份,请不要打开这个代码谢谢 -->
+<!--          <el-date-picker-->
+<!--            v-model="form.year"-->
+<!--            type="month"-->
+<!--            placeholder="请选择年月"-->
+<!--          >-->
+<!--          </el-date-picker>-->
         </el-form-item>
         <!-- <el-form-item label="分类" prop="typeName" label-width="110">
           <el-cascader
@@ -220,15 +227,15 @@
           >
           </el-cascader>
         </el-form-item> -->
-        <el-form-item prop="ratio" label-width="100px" label="同比">
-          <el-input v-model="form.ratio" placeholder="请输入同比"></el-input>
-        </el-form-item>
-        <el-form-item prop="imExport" label-width="100px" label="进出口总值">
+        <el-form-item prop="imExport" label-width="120px" label="进出口总值">
           <el-input
             v-model="form.imExport"
             placeholder="请输入进出口总值"
           ></el-input>
         </el-form-item>
+        <el-form-item prop="cityTotal" label-width="120px" label="市进口总值">
+          <el-input v-model="form.cityTotal" placeholder="请输入市进口总值"></el-input>
+        </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button type="primary" @click="submitForm">确 定</el-button>
@@ -298,6 +305,10 @@ export default {
           { required: true, message: "进出口值不能为空", trigger: "blur" },
           { trigger: "blur", validator: this.validatorFloatNum },
         ],
+        cityTotal: [
+          { required: true, message: "市进出口值不能为空", trigger: "blur" },
+          { trigger: "blur", validator: this.validatorFloatNum },
+        ],
         year: [{ required: true, message: "年份不能为空", trigger: "blur" }],
       },
     };

+ 6 - 6
src/views/news/index.vue

@@ -60,12 +60,12 @@
       </el-table-column>
       <el-table-column label="操作" align="center" fixed="right" width="170">
         <template slot-scope="scope">
-          <el-button v-if="scope.row.status == 4" size="mini" type="text" @click="handleDownOrUp(scope.row)" v-hasPermi="['business:NEWS:remove']">下架</el-button>
-          <el-button v-if="scope.row.status == 0 || scope.row.status == 2" size="mini" type="text" v-hasPermi="['business:NEWS:remove']" @click="handleCommit(scope.row)">提交审核</el-button>
-          <el-button v-if="scope.row.status == 0 || scope.row.status == 2 || scope.row.status == 5" size="mini" type="text" @click="handleUpdate(scope.row)" v-hasPermi="['business:NEWS:remove']">修改</el-button>
-          <el-button v-if="scope.row.status == 5 || scope.row.status == 3" size="mini" type="text" @click="handleDownOrUp(scope.row)" v-hasPermi="['business:NEWS:remove']">发布</el-button>
-          <el-button v-if="scope.row.status == 6" size="mini" type="text" @click="hanleTop(scope.row)" v-hasPermi="['business:NEWS:remove']">取消置顶</el-button>
-          <el-button v-else-if="scope.row.status == 4" size="mini" type="text" @click="hanleTop(scope.row)" v-hasPermi="['business:NEWS:remove']">置顶</el-button>
+          <el-button v-if="scope.row.status == 4" size="mini" type="text" @click="handleDownOrUp(scope.row)" v-hasPermi="['business:NEWS:edit']">下架</el-button>
+          <el-button v-if="scope.row.status == 0 || scope.row.status == 2" size="mini" type="text" v-hasPermi="['business:NEWS:audit']" @click="handleCommit(scope.row)">提交审核</el-button>
+          <el-button v-if="scope.row.status == 0 || scope.row.status == 2 || scope.row.status == 5" size="mini" type="text" @click="handleUpdate(scope.row)" v-hasPermi="['business:NEWS:audit']">修改</el-button>
+          <el-button v-if="scope.row.status == 5 || scope.row.status == 3" size="mini" type="text" @click="handleDownOrUp(scope.row)" v-hasPermi="['business:NEWS:top']">发布</el-button>
+          <el-button v-if="scope.row.status == 6" size="mini" type="text" @click="hanleTop(scope.row)" v-hasPermi="['business:NEWS:edit']">取消置顶</el-button>
+          <el-button v-else-if="scope.row.status == 4" size="mini" type="text" @click="hanleTop(scope.row)" v-hasPermi="['business:NEWS:edit']">置顶</el-button>
           <el-button type="text" size="mini" @click="showDetail(scope.row)">详情</el-button>
 
         </template>

+ 72 - 40
src/views/norm/quotaBonded.vue

@@ -11,7 +11,14 @@
         <el-input v-model="queryParams.quotaName"></el-input>
       </el-form-item>
       <el-form-item label="保税区名称" prop="bondedName">
-        <el-input v-model="queryParams.bondedName"></el-input>
+        <el-select v-model="queryParams.bondedName" placeholder="请选择保税区" clearable filterable @change="selectBondedChange" style="width:100%">
+          <el-option
+            v-for="item in deptList"
+            :key="item.deptId"
+            :label="item.deptName"
+            :value="item.deptName">
+          </el-option>
+        </el-select>
       </el-form-item>
       <el-form-item>
         <el-button type="primary" icon="el-icon-search" @click="handleQuery"
@@ -94,9 +101,7 @@
       ></el-table-column>
       <el-table-column label="附件" align="center" prop="fileNames" width="80">
         <template slot-scope="scope">
-          <el-link @click="download(scope.row.fileNames)">{{
-            scope.row.fileNames
-          }}</el-link>
+          <el-link style="text-decoration: underline;color: #36aafd" @click="download(scope.row.fileNames)">{{scope.row.fileNames}}</el-link>
         </template>
       </el-table-column>
       <el-table-column label="操作" align="center" fixed="right" width="350">
@@ -382,7 +387,6 @@ export default {
     this.getDeptList();
 
   },
-
   methods: {
     // 获取保税区列表
     getDeptList() {
@@ -490,11 +494,7 @@ export default {
             this.$message.error("得分必须为整数");
             return;
           }
-          if (this.form.enterType == "附件" && this.form.linkUrls == null) {
-            this.$message.error("请上传附件");
-            return;
-          }
-          if (this.form.enterType == "文字说明" && this.form.remark == null) {
+          if (this.form.enterType == '文字说明' && this.form.remark == null) {
             this.$message.error("请录入文字说明");
             return;
           }
@@ -513,32 +513,65 @@ export default {
             return;
           }
           if (this.form.id != null) {
-            let formData = new FormData();
-            if (this.fileList.length < 1) {
-              this.$message.error("请选择文件传输!");
-              return;
-            }
-            this.fileList.forEach((item) => {
-              formData.append("file", item.raw);
-            });
-            uploadFiles(formData).then((res) => {
-              if (res.code == 200) {
-                this.form.linkUrls = res.fileNames;
-                this.form.fileNames = res.newFileNames;
-
-                updateQUOTABONDED(this.form).then((response) => {
-                  this.$modal.msgSuccess("修改成功");
-                  this.open = false;
-                  this.getList();
+            if (this.form.enterType == '附件') {
+              if(this.fileList.length < 1) {
+                this.$message.error("请选择文件传输!");
+                return;
+              } else {
+                let formData = new FormData()
+                this.fileList.forEach((item) => {
+                  formData.append("file", item.raw);
                 });
+                uploadFiles(formData).then(res=>{
+                  if(res.code == 200){
+                    this.form.linkUrls = res.fileNames;
+                    this.form.fileNames = res.newFileNames;
+
+                    updateQUOTABONDED(this.form).then(response => {
+                      this.$modal.msgSuccess("修改成功");
+                      this.open = false;
+                      this.getList();
+                    });
+                  }
+                })
               }
-            });
+            } else {
+              updateQUOTABONDED(this.form).then(response => {
+                this.$modal.msgSuccess("修改成功");
+                this.open = false;
+                this.getList();
+              });
+            }
           } else {
-            addQUOTABONDED(this.form).then((response) => {
-              this.$modal.msgSuccess("新增成功");
-              this.open = false;
-              this.getList();
-            });
+            if (this.form.enterType == '附件') {
+              if(this.fileList.length < 1) {
+                this.$message.error("请选择文件传输!");
+                return;
+              } else {
+                let formData = new FormData()
+                this.fileList.forEach((item) => {
+                  formData.append("file", item.raw);
+                });
+                uploadFiles(formData).then(res=>{
+                  if(res.code == 200){
+                    this.form.linkUrls = res.fileNames;
+                    this.form.fileNames = res.newFileNames;
+
+                    addQUOTABONDED(this.form).then(response => {
+                      this.$modal.msgSuccess("新增成功");
+                      this.open = false;
+                      this.getList();
+                    });
+                  }
+                })
+              }
+            } else {
+              addQUOTABONDED(this.form).then(response => {
+                this.$modal.msgSuccess("新增成功");
+                this.open = false;
+                this.getList();
+              });
+            }
           }
         }
       });
@@ -629,12 +662,11 @@ export default {
       this.fileList = fileList;
     },
     download(resource) {
-      console.log("resource", resource);
-      downloadFiles(resource).then((res) => {
-        if (res.code == 200) {
-        }
-      });
-    },
-  },
+      let fileNames = resource.split(',');
+      fileNames.forEach(item => {
+         downloadFiles('/profile/upload/' +item);
+      })
+    }
+  }
 };
 </script>