Browse Source

重点园区项目-现在会有草稿状态,并且将走审核流,添加了数据填报和修改逻辑

Sanmu8 1 year ago
parent
commit
7355cf59bb
3 changed files with 74 additions and 7 deletions
  1. 1 1
      src/views/ARTICLE/edit.vue
  2. 54 0
      src/views/ARTICLE/enterData.vue
  3. 19 6
      src/views/ARTICLE/index.vue

+ 1 - 1
src/views/ARTICLE/edit.vue

@@ -150,7 +150,7 @@ export default {
               });
             } else if (type == 1) {
               this.form.status = 1
-              updateARTICLE(this.form).then((response) => {
+              addARTICLE(this.form).then((response) => {
                 this.$modal.msgSuccess("提交审核成功");
                 this.$layer.close(this.layerid);
                 this.$parent.getList();

+ 54 - 0
src/views/ARTICLE/enterData.vue

@@ -0,0 +1,54 @@
+<template>
+  <div>
+    <div class="cmain">
+      <el-form ref="form" :model="form" :rules="rules" label-width="120px">
+        <el-form-item label="本月投资金额" prop="">
+          <el-input
+            type="number"
+            v-model="form.name"
+            placeholder=""
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="形象进度" prop="">
+          <el-input
+            v-model="form.name"
+            placeholder=""
+          ></el-input>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="mfooter">
+        <el-button type="primary" @click="submitForm">保 存</el-button>
+        <el-button @click="$layer.close(layerid)">取 消</el-button>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  props: {
+    layerid: {
+      type: String,
+    },
+  },
+  data() {
+    return {
+      // 表单参数
+      form: {},
+      rules: {
+        preview: [
+          { required: true, message: "项目情况概述不能为空", trigger: "blur" },
+        ],
+      },
+    };
+  },
+  methods: {
+    submitForm() {
+        this.$layer.close(this.layerid);
+    },
+  },
+};
+</script>
+
+<style>
+</style>

+ 19 - 6
src/views/ARTICLE/index.vue

@@ -21,10 +21,14 @@
           v-hasPermi="['business:ARTICLE:add']"
         >新增</el-button>
       </el-col>
+      <el-col :span="1.5">
+        <el-button type="danger"  size="mini" icon="el-icon-delete" :disabled="multiple" @click="handleDelete" v-hasPermi="['business:ARTICLE:remove']">删除</el-button>
+      </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
-    <el-table :data="ARTICLEList">
+    <el-table :data="ARTICLEList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection"></el-table-column>
       <el-table-column label="保税区名称" align="center" prop="deptName">
         <template slot-scope="scope">
           {{scope.row.deptName}}
@@ -76,7 +80,6 @@
           <el-button
             size="mini"
             type="text"
-            icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
             v-hasPermi="['business:ARTICLE:edit']"
             v-if="scope.row.status == 0 || scope.row.status == 2"
@@ -84,10 +87,9 @@
           <el-button
             size="mini"
             type="text"
-            icon="el-icon-delete"
-            @click="handleDelete(scope.row)"
-            v-hasPermi="['business:ARTICLE:remove']"
-          >删除</el-button>
+            @click="showEnterData(scope.row)"
+            v-hasPermi="['business:ARTICLE:edit']"
+          >数据填报</el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -106,6 +108,7 @@
 <script>
 import { listARTICLE, getARTICLE, delARTICLE, addARTICLE, updateARTICLE } from "@/api/portal/ARTICLE/ARTICLE.js";
 import edit from './edit.vue'
+import enterData from "./enterData.vue";
 export default {
   name: "ARTICLE",
   data() {
@@ -164,6 +167,16 @@ export default {
     this.getList();
   },
   methods: {
+    showEnterData(row){
+      const id = row.id || this.ids;
+      this.iframe({ obj: enterData, param: { id: id }, title: '数据填报', width: '1050px', height: '80%' });
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id);
+      this.single = selection.length !== 1;
+      this.multiple = !selection.length;
+    },
     /** 查询重点项目管理列表 */
     getList() {
       this.loading = true;