scorpio 2 vuotta sitten
vanhempi
commit
e7b31147c7

+ 11 - 0
src/api/inspect/index.js

@@ -15,6 +15,17 @@ export default {
   submint (params) {
     return fetch('/blade-project-manage-v2/projectinspector/v2/save', params, 'post', 'json')
   },
+
+  update (params) {
+    return fetch('/blade-project-manage-v2/projectinspector/v2/update', params, 'post', 'json')
+  },
+  detail (params) {
+    return fetch('/blade-project-manage-v2/projectinspector/v2/detail', params)
+  },
+  remove (params) {
+    return fetch('/blade-project-manage-v2/projectinspector/v2/remove', params, 'post')
+  },
+
   /**
    *
    * @param params

+ 22 - 5
src/views/home/component/form_dialog.vue

@@ -94,16 +94,16 @@
         </div>
       </div>
       <el-divider/>
-      <div v-loading='loading' class="hide-scrollbar full-width" style="height: 25vh;overflow-x: scroll">
+      <div v-loading='loading' class="hide-scrollbar full-width">
         <!--        <div v-if='attaches.length === 0' class='full-width flex flex-center '>-->
         <!--          <el-empty image-size='100'/>-->
         <!--        </div>-->
         <div class="flex flex-justify-start flex-center">
-          <span class="bold font-15 grey ml-5 ">字段选择</span>
+          <span class="bold grey ml-5 ">字段选择</span>
           <el-checkbox class='ml-20' @change='allChange'>全 选</el-checkbox>
         </div>
 
-        <div class="flex flex-wrap" v-if='selectIndex !== -1'>
+        <div class="flex flex-wrap" v-if='selectIndex !== -1' style="height: 200px;overflow-x: scroll">
           <div v-for="(item,index) in fieldType[selectIndex].params" :key='item.id'
                class="flex flex-center padding pointer">
             <el-checkbox v-model=item.checked :label="item.code" size="large" @change='change(selectIndex,index)'>
@@ -113,6 +113,23 @@
         </div>
         <el-empty v-else description='点击上方按钮,选择字段'/>
       </div>
+      <div>
+        <div class='bold grey ml-5'>督察情况选择</div>
+        <el-tabs type="border" class='mt-10'>
+          <el-tab-pane label="工作进度"/>
+          <el-tab-pane label="存在的问题"/>
+          <el-tab-pane label="工作建议"/>
+          <el-tab-pane label="提市级决解的问题"/>
+          <el-tab-pane label="提省级决解的问题"/>
+        </el-tabs>
+        <div>
+          <div v-for='item in 3' :key='item'>
+            <div class='padding'>
+              进度三
+            </div>
+          </div>
+        </div>
+      </div>
       <div class="flex flex-center mt-20 mb-5">
         <base-button title="重置" @click='resetParams' type="0" icon="Refresh"/>
         <base-button class="ml-15" title="导出表格" icon="el-icon-download" @click='exportExcel'/>
@@ -297,11 +314,11 @@ export default {
         return
       }
       setTimeout(() => {
-        const parentId = [1, 2].includes(this.user.info.viewStage) ? this.user.info.parentDeptId : this.user.info.deptId
+        const parentId = [0, 2].includes(this.user.info.viewStage) ? this.user.info.parentDeptId : this.user.info.deptId
         this.$api.system.getDeptLazy({ deptName: key, parentId }).then(res => {
           if (res.code === 200) {
             const tmp = res.data.map(sub => {
-              const item = { value: sub.deptName, label: sub.deptName, deptId: sub.id }
+              const item = { value: sub.deptName, label: sub.deptName, deptId: sub.id, areaCode: sub.areaCode }
               return item
             })
             cb(tmp)

+ 11 - 4
src/views/home/component/inspect/Inspect1.vue

@@ -181,10 +181,17 @@ export default {
     },
     beforeOpen (done, type) {
       if (['view', 'edit'].includes(type)) {
-        this.getDetail()
+
       }
       done()
     },
+    getDetail (res) {
+      this.$api.inspect.detail({ id: res.id }).then(res => {
+        if (res.code === 200) {
+          this.form = res.data
+        }
+      })
+    },
     currentChange (currentPage) {
       console.log(currentPage)
       this.page.current = currentPage
@@ -217,9 +224,9 @@ export default {
     },
     rowUpdate (row, index, done, loading) {
       const data = {
-        projectInfoId: this.info.id
+        projectId: this.projectId
       }
-      this.$api.projects.meeting.update(Object.assign(row, data)).then((res) => {
+      this.$api.inspect.update(Object.assign(row, data)).then((res) => {
         if (res.code === 200) {
           this.$message.success(res.msg)
         } else {
@@ -238,7 +245,7 @@ export default {
         cancelButtonText: '取消',
         type: 'warning'
       }).then(() => {
-        return this.$api.projects.meeting.removeList({ ids: row.id })
+        return this.$api.inspect.remove({ ids: row.id })
       }).then(() => {
         this.$message({
           type: 'success',

+ 1 - 1
src/views/home/component/params/params1.vue

@@ -36,7 +36,7 @@
             </div>
           </el-form-item>
           <el-form-item label="责任单位" style='flex:1' class='ml-20'>
-            <el-input v-model="form.region" placeholder='责任单位'/>
+            <el-input v-model="form.responsible_unit" placeholder='责任单位'/>
           </el-form-item>
         </div>
 

+ 56 - 33
src/views/home/component/params/params3.vue

@@ -23,7 +23,6 @@
               <div class='flex-child-average full-width  flex flex-center'>
                 <span style='width: 320px'>{{ item.year }}年度计划投资(万元)</span>
                 <el-input v-model='item.value' @change='change(item)'></el-input>
-                <div class='btnSub pointer' @click='showMonth(item,1)'>月填报</div>
               </div>
               <div style='width: 20px'></div>
               <div class='flex-child-average full-width  flex flex-center'>
@@ -53,13 +52,12 @@
               <div class='flex-child-average full-width  flex flex-center'>
                 <span style='width: 400px'>{{ item.year }}年度计划纳统投资(万元)</span>
                 <el-input v-model='item.value' @change='change(item)'></el-input>
-                <div class='btnSub pointer'>月填报</div>
               </div>
               <div style='width: 20px'></div>
               <div class='flex-child-average full-width  flex flex-center'>
                 <span style='width: 440px'>{{ item.year }}年度累计纳统投资(万元)</span>
                 <div class='disable-input' @change='change(item)'>{{ item.value2 }}</div>
-                <div class='btnSub pointer' @click='showMonth(item,2)'>月填报</div>
+                <div class='btnSub pointer' @click='showMonth(item)'>月填报</div>
               </div>
             </div>
           </div>
@@ -68,16 +66,28 @@
     </div>
 
     <el-dialog v-model='show' :title='current ? current.year + "年度" : ""' width='1260px'>
-      <div class='flex flex-center flex-wrap'>
-        <div class='flex flex-center'>
-          <div>
-            <span style='margin-top: 40px;margin-right: 20px' class='bold'>计划投资:</span>
-            <span style='margin-top: 40px;margin-right: 20px' class='bold'>计划投资:</span>
+      <div class='flex flex-center flex-align-start'>
+        <div>
+          <div class='padding-top'></div>
+          <div class='padding-top mt-20 mr-10 bold'>计划投资:</div>
+          <div class='padding-top mt-10 mr-10 bold'>累计投资:</div>
+        </div>
+        <div>
+          <div class='mr-5  flex flex-center '>
+            <div v-for='item in current.months' :key='item.name' class='title'>
+              {{ item.name }}月
+            </div>
+          </div>
+          <div class='mr-5  flex flex-center'>
+            <div v-for='item in current.planMonths' :key='item.name'>
+              <input class='input' v-model="item.value" @change='changeMonth(item,1)'>
+            </div>
           </div>
-          <div class='flex flex-center flex-col' v-for='item in current.editType === 1 ? current.planMonths : current.months' :key='item'>
-            <div class='bold mb-10 mt-10'>{{ item.name }}月</div>
-            <input :disabled='!detail.can_update' class='input flex flex-center' v-model="item.value" :min="1"
-                   @change='changeMonth(item)'/>
+
+          <div class='mr-5  flex flex-center'>
+            <div v-for='item in current.months' :key='item.name'>
+              <input class='input' v-model="item.value" @change='changeMonth(item,2)'>
+            </div>
           </div>
         </div>
       </div>
@@ -241,29 +251,35 @@ export default {
         }
       })
     },
-    showMonth (item, type) {
+    showMonth (item) {
       this.current = item
-      this.current.editType = type
       this.show = !this.show
     },
-    changeMonth (res) {
-      let code = this.current.year + '_' + res.name + (this.current.type === 1 ? '_month_complete_amount' : '_month_investment_amount')
-      if (this.current.editType === 1) {
-        code = this.current.year + '_' + res.name + (this.current.type === 1 ? '_plan_month_complete_amount' : '_plan_month_investment_amount')
-      }
-      this.form[code] = res.value
-      const tmp = this.current.months.map(sub => Number.parseInt(sub.value))
-      const sum = tmp.reduce((accumulator, value) => {
-        return accumulator + (value || 0)
-      }, 0)
-      let codeParent = this.current.year + (this.current.type === 1 ? '_total_complete_amount' : '_total_investment_amount')
-      if (this.current.editType === 1) {
-        codeParent = this.current.year + (this.current.type === 1 ? '_plan_total_complete_amount' : '_plan_total_investment_amount')
-      }
-      this.form[codeParent] = sum
-      this.current.value2 = sum
-      console.log(this.current)
-      this.update(false)
+    /**
+     *
+     * @param res
+     * @param type 1 计划 2 累计
+     */
+    changeMonth (res, type) {
+      setTimeout(() => {
+        let code = this.current.year + '_' + res.name + (this.current.type === 1 ? '_month_complete_amount' : '_month_investment_amount')
+        if (type === 1) {
+          code = this.current.year + '_' + res.name + (this.current.type === 1 ? '_plan_month_complete_amount' : '_plan_month_investment_amount')
+        }
+        this.form[code] = res.value
+        const tmp = this.current.months.map(sub => Number.parseInt(sub.value))
+        const sum = tmp.reduce((accumulator, value) => {
+          return accumulator + (value || 0)
+        }, 0)
+        let codeParent = this.current.year + (this.current.type === 1 ? '_total_complete_amount' : '_total_investment_amount')
+        if (type === 1) {
+          codeParent = this.current.year + (this.current.type === 1 ? '_plan_total_complete_amount' : '_plan_total_investment_amount')
+        }
+        this.form[codeParent] = sum
+        this.current.value2 = sum
+        console.log(this.form)
+        this.update(false)
+      }, 500)
     }
   }
 }
@@ -289,6 +305,13 @@ export default {
   grid-column-gap: 20px;
 }
 
+.title {
+  width: 60px;
+  padding: 0 11px;
+  margin-bottom: 10px;
+  font-weight: bold;
+}
+
 .input {
   width: 60px;
   height: 30px;
@@ -300,7 +323,7 @@ export default {
 .input:last-child {
   width: 60px;
   height: 40px;
-  padding:0 10px;
+  padding: 0 10px;
   border-right: #e7e7e7 solid 1px;
 }