Browse Source

Merge remote-tracking branch 'origin/develop' into develop

# Conflicts:
#	src/views/project/componens/info6.vue
scorpioyq 2 years ago
parent
commit
0b4fb286b2

+ 6 - 0
src/api/common.js

@@ -8,6 +8,12 @@ export default {
       ...params
     })
   },
+  dicChildList(params) {
+    return fetch('/blade-system/dict-biz/child-list', {
+      clientId: website.clientId,
+      ...params
+    })
+  },
   submit(params) {
     // 保存上传文件素材
     return fetch('/wutong-library/library/save', params, 'post', 'json')

+ 27 - 5
src/api/project/index.js

@@ -364,14 +364,14 @@ export default {
       'post'
     )
   },
-  //获取项目年度投资
+  // 获取项目年度投资
   projectAnnualInvestment(params) {
     return fetch(
       '/blade-project-manage-v2/project-dispatch/v2/project-annual-investment',
       params
     )
   },
-  //新增或修改年度投资
+  // 新增或修改年度投资
   submitAnnualInvestment(params) {
     return fetch(
       '/blade-project-manage-v2/project-dispatch/v2/submit-annual-investment',
@@ -380,14 +380,14 @@ export default {
       'json'
     )
   },
-  //项目前期文件列表
+  // 项目前期文件列表
   preliminaryFiles(params) {
     return fetch(
       '/blade-project-manage-v2/project-dispatch/v2/situation-file-list',
       params
     )
   },
-  //添加项目前期文件
+  // 添加项目前期文件
   preliminaryFilesAdd(params) {
     return fetch(
       '/blade-project-manage-v2/project-dispatch/v2/situation-save-file',
@@ -396,13 +396,35 @@ export default {
       'json'
     )
   },
-  //删除项目前期文件
+  // 删除项目前期文件
   preliminaryFilesRemove(params) {
     return fetch(
       '/blade-project-manage-v2/project-dispatch/v2/situation-delete-file',
       params,
       'post'
     )
+  },
+  /**
+   * 项目照片
+   */
+  addPhotoProject(params) {
+    return fetch(
+      '/blade-project-manage-v2/project-dispatch/v2/save-project-address-pic',
+      params,
+      'post',
+      'json'
+    )
+  },
+  /**
+   * 获取项目地址相关照片
+   * @param params
+   * @returns {Promise | Promise<unknown>}
+   */
+  photoProject(params) {
+    return fetch(
+      '/blade-project-manage-v2/project-dispatch/v2/project-address-pic-list',
+      params
+    )
   }
 }
 

+ 0 - 22
src/directives/watermark.js

@@ -1,22 +0,0 @@
-import { createApp } from 'vue'
-
-const app = createApp({})
-export default () => {
-  app.directive('watermark', (el, binding) => {
-    const addWaterMarker = (text, el) => {
-      const canvas = document.createElement('canvas')
-      canvas.width = 400
-      canvas.height = 200
-      const cans = canvas.getContext('2d')
-      cans.rotate((-20 * Math.PI) / 180) // 旋转弧度
-      cans.font = '16px' // 字体
-      cans.fillStyle = 'rgba(0, 0, 0, 0.5)' // 字体填充颜色
-      cans.textAlign = 'left' // 对齐方式
-      cans.textBaseline = 'Middle' // 基线
-      cans.fillText(text, canvas.width / 3, canvas.height / 2) // 被填充的文本
-      el.style.background = `url(${canvas.toDataURL('image/png')})`
-    }
-    const { text } = binding.value
-    addWaterMarker(text, el)
-  })
-}

+ 1 - 1
src/layout/top.vue

@@ -179,7 +179,6 @@ export default {
   mounted() {
     this.initWebSocket()
     this.readCount()
-    setWaterMark(this.user.info.deptName, this.user.info.nickName)
   },
   unmounted() {
     this.websock.close() // 离开路由之后断开websocket连接
@@ -271,6 +270,7 @@ export default {
     start() {
       // 开启心跳
       console.log('开启心跳')
+      setWaterMark(this.user.info.deptName, this.user.info.nickName)
       const self = this
       self.timeoutObj && clearTimeout(self.timeoutObj)
       self.serverTimeoutObj && clearTimeout(self.serverTimeoutObj)

+ 0 - 2
src/main.js

@@ -13,7 +13,6 @@ import '@/assets/style/theme/index.scss'
 import Avue from '@smallwei/avue'
 import '@smallwei/avue/lib/index.css'
 import bus from 'vue3-eventbus'
-import watermark from './directives/watermark.js'
 
 const myApp = createApp(App)
 myApp.config.globalProperties.$router = router
@@ -33,5 +32,4 @@ myApp
   .use(elementPlus, { locale, size: 'default', zIndex: 300 })
   .use(Avue)
   .use(bus)
-  .use(watermark)
   .mount('#app')

+ 6 - 6
src/utils/watermark.js

@@ -1,18 +1,18 @@
 /**  水印添加方法  */
 
-let setWatermark = (str1, str2) => {
-  let id = '1.23452384164.123412415'
+const setWatermark = (str1, str2) => {
+  const id = '1.23452384164.123412415'
 
   if (document.getElementById(id) !== null) {
     document.body.removeChild(document.getElementById(id))
   }
 
-  let can = document.createElement('canvas')
+  const can = document.createElement('canvas')
   // 设置canvas画布大小
   can.width = 420
   can.height = 180
 
-  let cans = can.getContext('2d')
+  const cans = can.getContext('2d')
   cans.rotate((-22.5 * Math.PI) / 180) // 水印旋转角度
   cans.font = '15px Vedana'
   cans.fillStyle = '#666666'
@@ -21,7 +21,7 @@ let setWatermark = (str1, str2) => {
   cans.fillText(str1, can.width / 2, can.height) // 水印在画布的位置x,y轴
   cans.fillText(str2, can.width / 2, can.height + 22)
 
-  let div = document.createElement('div')
+  const div = document.createElement('div')
   div.id = id
   div.style.pointerEvents = 'none'
   div.style.top = '40px'
@@ -47,7 +47,7 @@ export const setWaterMark = (str1, str2) => {
 
 // 移除水印方法
 export const removeWatermark = () => {
-  let id = '1.23452384164.123412415'
+  const id = '1.23452384164.123412415'
   if (document.getElementById(id) !== null) {
     document.body.removeChild(document.getElementById(id))
   }

+ 176 - 37
src/views/project/componens/info1.vue

@@ -42,13 +42,35 @@
         <el-form-item class="full-width flex-child-average">
           <div class="flex flex-center full-width item">
             <span class="title">责任单位:</span>
-            <el-input></el-input>
+            <el-select
+              v-model="form.responsible_unit"
+              placeholder="请选择项目标签"
+              class="full-width"
+            >
+              <el-option
+                v-for="item in form.tags === 1 ? deptDic : compDic"
+                :key="item.dictValue"
+                :label="item.dictValue"
+                :value="item.dictKey"
+              />
+            </el-select>
           </div>
         </el-form-item>
         <el-form-item class="full-width flex-child-average">
           <div class="flex flex-center full-width item">
             <span class="title">主管单位:</span>
-            <el-input></el-input>
+            <el-select
+              v-model="form.competent_unit"
+              placeholder="请选择项目标签"
+              class="full-width"
+            >
+              <el-option
+                v-for="item in deptDic"
+                :key="item.dictValue"
+                :label="item.dictValue"
+                :value="item.dictKey"
+              />
+            </el-select>
           </div>
         </el-form-item>
         <el-form-item class="full-width flex-child-average">
@@ -73,14 +95,78 @@
         </el-form-item>
         <el-form-item class="full-width flex-child-average">
           <div class="flex flex-center full-width item">
-            <span class="title">所属领域:</span>
+            <span class="title">所属行业:</span>
             <el-input></el-input>
           </div>
         </el-form-item>
         <el-form-item class="full-width flex-child-average">
           <div class="flex flex-center full-width item">
-            <span class="title">所属行业:</span>
-            <el-input></el-input>
+            <span class="title">产业项目:</span>
+            <el-select
+              v-model="form.social_investment"
+              placeholder="是否是产业项目"
+              class="full-width"
+            >
+              <el-option
+                v-for="item in yesOrNo"
+                :key="item.label"
+                :label="item.label"
+                :value="item.value"
+              />
+            </el-select>
+          </div>
+        </el-form-item>
+      </div>
+      <div class="flex flex-justify-center">
+        <el-form-item class="full-width flex-child-average">
+          <div class="flex flex-center full-width item">
+            <span class="title">民间投资项目:</span>
+            <el-select
+              v-model="form.social_investment"
+              placeholder="是否民间投资项目"
+              class="full-width"
+            >
+              <el-option
+                v-for="item in yesOrNo"
+                :key="item.label"
+                :label="item.label"
+                :value="item.value"
+              />
+            </el-select>
+          </div>
+        </el-form-item>
+        <el-form-item class="full-width flex-child-average">
+          <div class="flex flex-center full-width item">
+            <span class="title">获得资金支持:</span>
+            <el-select
+              v-model="form.social_investment"
+              placeholder="是否获得资金支持"
+              class="full-width"
+            >
+              <el-option
+                v-for="item in yesOrNo"
+                :key="item.label"
+                :label="item.label"
+                :value="item.value"
+              />
+            </el-select>
+          </div>
+        </el-form-item>
+        <el-form-item class="full-width flex-child-average">
+          <div class="flex flex-center full-width item">
+            <span class="title">项目标签:</span>
+            <el-select
+              v-model="form.project_stage"
+              placeholder="请选择项目标签"
+              class="full-width"
+            >
+              <el-option
+                v-for="item in projectSituation"
+                :key="item.dictValue"
+                :label="item.dictValue"
+                :value="item.dictKey"
+              />
+            </el-select>
           </div>
         </el-form-item>
       </div>
@@ -90,7 +176,7 @@
             class="flex flex-center flex-justify-start full-width"
             style="width: 99%"
           >
-            <span style="width: 90px" class="text-left">项目位置:</span>
+            <span style="width: 100px" class="text-left">项目位置:</span>
             <div class="full-width">
               <map-picker
                 :project-id="form.id"
@@ -101,12 +187,6 @@
             </div>
           </div>
         </el-form-item>
-        <el-form-item class="full-width" style="flex: 1">
-          <div class="flex flex-center full-width item">
-            <span class="title">项目标签:</span>
-            <el-input></el-input>
-          </div>
-        </el-form-item>
       </div>
       <div class="flex flex-justify-center">
         <el-form-item class="full-width" style="flex: 1">
@@ -149,6 +229,7 @@
 import wtCard from '@/components/wt-card/index.vue'
 import areaPicker from '@/components/area-picker/index.vue'
 import mapPicker from '@/views/project/componens/map-picker.vue'
+import { useStore } from '@/store/user.js'
 
 export default {
   components: {
@@ -168,40 +249,97 @@ export default {
     info: {
       handler(val) {
         this.form = val
-        this.mapForm = [
-          this.form.latitude,
-          this.form.longitude,
-          this.form.address
-        ]
+        if (val.tags === 1) {
+          // 1 政府项目,主管单位和责任单位都为政府机构
+          this.getDepList()
+        } else {
+          // 2 企业项目,主管单位为机构,责任单位为企业
+          this.getDepList()
+          this.getCompList()
+        }
+        this.getDict('project-situation')
+        // fixme需要接口
+        this.getChildDict('industry-classification')
       },
       immediate: true
-    },
-    mapForm: {
-      handler(val) {
-        this.form.latitude = val[0]
-        this.form.longitude = val[1]
-        this.form.address = val[2]
-      },
-      immediate: false
     }
   },
+  setup() {
+    const user = useStore()
+    return { user }
+  },
   data() {
     return {
       disabled: true,
       form: {},
-      params: {
-        zoom: 10
-      },
-      mapForm: [
-        113.10235504165291,
-        41.03624227495205,
-        '内蒙古自治区乌兰察布市集宁区新体路街道顺达源广告传媒'
-      ]
+      photoList: [],
+      yesOrNo: [
+        {
+          label: '否',
+          value: 0
+        },
+        {
+          label: '是',
+          value: 1
+        }
+      ],
+      projectSituation: [],
+      deptDic: [],
+      compDic: []
     }
   },
   methods: {
+    getDict(code) {
+      this.$api.common.dicList({ code }).then(res => {
+        if (res.code === 200) {
+          this.projectSituation = res.data
+        }
+      })
+    },
+    getChildDict(code) {
+      this.$api.common.dicChildList({ code }).then(res => {
+        if (res.code === 200) {
+          this.projectSituation = res.data
+        }
+      })
+    },
+    getDepList() {
+      const local = {
+        label: this.user.info.deptName,
+        value: this.user.info.deptId
+      }
+      this.deptDic.push(local)
+      this.$api.system
+        .getDeptLazy({ parentId: this.user.info.deptId, deptCategory: 3 })
+        .then(res => {
+          if (res.code === 200) {
+            const tmp = res.data.map(ele => {
+              const item = { label: ele.deptName, value: ele.id }
+              return item
+            })
+            this.deptDic = this.deptDic.concat(tmp)
+          }
+        })
+    },
+    getCompList() {
+      this.$api.system.getNewDeptLazy({ deptCategory: 4 }).then(res => {
+        if (res.code === 200) {
+          const tmp = res.data.map(ele => {
+            const item = { label: ele.deptName, value: ele.id }
+            return item
+          })
+          this.compDic = this.compDic.concat(tmp)
+        }
+      })
+    },
     save() {
-      console.log('save')
+      if (this.photoList.length > 0) {
+        this.$api.project.addPhotoProject(this.photoList).then(res => {
+          if (res.code === 200) {
+            console.log(res)
+          }
+        })
+      }
       this.$api.project.proUpdate(this.form).then(res => {
         if (res.code === 200) {
           console.log(res)
@@ -219,10 +357,11 @@ export default {
       this.form.district_code = list[2].key
       this.form.district_name = list[2].title
     },
-    mapSuccess(res) {
+    mapSuccess(res, list) {
       this.form.address = res.address
       this.form.longitude = res.longitude
       this.form.latitude = res.latitude
+      this.photoList = list
     }
   }
 }
@@ -230,12 +369,12 @@ export default {
 
 <style lang="scss" scoped>
 .title {
-  width: 100px;
+  width: 120px;
   text-align: left;
 }
 
 .title-textarea {
-  width: 85px;
+  width: 100px;
   text-align: left;
 }
 

+ 108 - 27
src/views/project/componens/info4.vue

@@ -5,18 +5,26 @@
     :edit-btn="true"
     @edit="change"
     @save="save"
+    @on-load="getFundsList(this.type)"
   >
     <div
       class="full-width text-right main-color pointer"
       style="margin-top: -10px"
+      :style="styleObject"
       @click="openFundsList"
     >
       更多到位资金>>
     </div>
     <el-form class="mt-20" :disabled="disabled">
-      <div class="flex">
-        <button style="margin-left: 10px">到位资金</button>
-        <button style="margin-left: 10px">筹措资金</button>
+      <div style="display: flex; align-items: center">
+        <el-button-group>
+          <el-button type="primary" @click="getFundsList(1)"
+            >到位资金</el-button
+          >
+          <el-button type="primary" @click="getFundsList(2)"
+            >筹措资金<i class="el-icon-arrow-right el-icon--right"></i
+          ></el-button>
+        </el-button-group>
         <div style="margin-left: 20px">
           * 点击对应按钮,查看到位资金、筹措资金详情
         </div>
@@ -30,14 +38,18 @@
             <el-input
               class="input"
               placeholder="中央预算内投资"
-              v-model="form.investment_invest"
+              v-model="this.data.investmentOfCentralBudget"
             ></el-input>
           </div>
         </el-form-item>
         <el-form-item class="full-width flex-child-average">
           <div class="flex flex-center full-width item">
             <span class="title">银行贷款:</span>
-            <el-input class="input" placeholder="银行贷款"></el-input>
+            <el-input
+              class="input"
+              placeholder="银行贷款"
+              v-model="this.data.bankLoans"
+            ></el-input>
           </div>
         </el-form-item>
       </div>
@@ -48,7 +60,7 @@
             <el-input
               class="input"
               placeholder="专项债券资金"
-              v-model="form.special_funds"
+              v-model="this.data.specialBondFunds"
             ></el-input>
           </div>
         </el-form-item>
@@ -58,7 +70,7 @@
             <el-input
               class="input"
               placeholder="抗疫特别国债资金"
-              v-model="form.epidemic_funds"
+              v-model="this.data.antiEpidemicSpecialTreasuryBondFund"
             ></el-input>
           </div>
         </el-form-item>
@@ -70,7 +82,7 @@
             <el-input
               class="input"
               placeholder="其他地方财政性建设资金"
-              v-model="form.other_funds"
+              v-model="this.data.otherLocalFiscalConstructionFunds"
             ></el-input>
           </div>
         </el-form-item>
@@ -80,7 +92,7 @@
             <el-input
               class="input"
               placeholder="政策性开发性金融工具(基金)投资"
-              v-model="form.policy_finance_funds"
+              v-model="this.data.policyBasedDevelopmentFinancialInvestment"
             ></el-input>
           </div>
         </el-form-item>
@@ -90,13 +102,21 @@
         <el-form-item class="full-width flex-child-average">
           <div class="flex flex-center full-width item">
             <span class="title">省级预算内投资:</span>
-            <el-input class="input" placeholder="省级预算内投资"></el-input>
+            <el-input
+              class="input"
+              placeholder="省级预算内投资"
+              v-model="this.data.investmentWithinProvincialBudget"
+            ></el-input>
           </div>
         </el-form-item>
         <el-form-item class="full-width flex-child-average">
           <div class="flex flex-center full-width item">
             <span class="title">市级预算内投资:</span>
-            <el-input class="input" placeholder="市级预算内投资"></el-input>
+            <el-input
+              class="input"
+              placeholder="市级预算内投资"
+              v-model="this.data.investmentWithinMunicipalBudget"
+            ></el-input>
           </div>
         </el-form-item>
       </div>
@@ -104,7 +124,11 @@
         <el-form-item class="full-width flex-child-average">
           <div class="flex flex-center full-width item">
             <span class="title">县级预算内投资:</span>
-            <el-input class="input" placeholder="县级预算内投资"></el-input>
+            <el-input
+              class="input"
+              placeholder="县级预算内投资"
+              v-model="this.data.investmentWithinCountyLevelBudget"
+            ></el-input>
           </div>
         </el-form-item>
         <el-form-item class="full-width flex-child-average">
@@ -123,36 +147,93 @@ export default {
     wtCard
   },
   props: {
-    info: {
-      type: Object,
-      default: () => {
-        return {}
-      }
+    projectId: {
+      required: true,
+      type: String,
+      default: ''
     }
   },
   watch: {
-    info: {
+    projectId: {
       handler(val) {
-        this.form = val
+        if (val.length > 0) {
+          this.getFundsList(1)
+        }
       },
       immediate: true
     }
   },
   data() {
     return {
+      styleObject: {
+        visibility: 'visible'
+      },
+      type: 1,
       disabled: true,
-      form: {}
+      data: {},
+      t1: 0,
+      t2: 0,
+      t3: 0,
+      t4: 0,
+      t5: 0,
+      t6: 0,
+      t7: 0,
+      t8: 0,
+      t9: 0
     }
   },
   methods: {
+    getFundsList(type) {
+      this.type = type
+      if (type === 2) {
+        this.styleObject.visibility = 'hidden'
+      } else {
+        this.styleObject.visibility = 'visible'
+      }
+      this.$api.funds
+        .fundsList({ projectId: this.projectId, type: type })
+        .then(res => {
+          if (res.code === 200) {
+            if (type === 1) {
+              res.data.forEach(item => {
+                this.t1 = this.t1 + item.investmentOfCentralBudget
+                this.t2 = this.t2 + item.bankLoans
+                this.t3 = this.t3 + item.specialBondFunds
+                this.t4 = this.t4 + item.antiEpidemicSpecialTreasuryBondFund
+                this.t5 = this.t5 + item.otherLocalFiscalConstructionFunds
+                this.t6 =
+                  this.t6 + item.policyBasedDevelopmentFinancialInvestment
+                this.t7 = this.t7 + item.investmentWithinProvincialBudget
+                this.t8 = this.t8 + item.investmentWithinMunicipalBudget
+                this.t9 = this.t9 + item.investmentWithinCountyLevelBudget
+              })
+              this.data.investmentOfCentralBudget = this.t1
+              this.data.bankLoans = this.t2
+              this.data.specialBondFunds = this.t3
+              this.data.antiEpidemicSpecialTreasuryBondFund = this.t4
+              this.data.otherLocalFiscalConstructionFunds = this.t5
+              this.data.policyBasedDevelopmentFinancialInvestment = this.t6
+              this.data.investmentWithinProvincialBudget = this.t7
+              this.data.investmentWithinMunicipalBudget = this.t8
+              this.data.investmentWithinCountyLevelBudget = this.t9
+            } else {
+              this.data = res.data[0]
+            }
+          }
+        })
+    },
     save() {
-      this.$api.project.proUpdate(this.form).then(res => {
-        if (res.code === 200) {
-          this.$message.success(res.msg)
-        } else {
-          this.$message.error(res.msg)
-        }
-      })
+      if (this.type == 2) {
+        this.$api.funds.fundsSaveOrUpdate(this.data).then(res => {
+          if (res.code === 200) {
+            this.$message.success(res.msg)
+          } else {
+            this.$message.error(res.msg)
+          }
+        })
+      } else {
+        this.$message.warning('到位资金合计不可编辑!')
+      }
     },
     change(res) {
       this.disabled = res

+ 9 - 2
src/views/project/componens/info6.vue

@@ -23,7 +23,9 @@
         <thead>
           <tr>
             <th>类型</th>
-            <th v-for="item in month">{{ item.month }}月</th>
+            <th v-for="item in month">
+              {{ item.month != '合计' ? item.month + '月' : '合计' }}
+            </th>
           </tr>
         </thead>
         <tbody>
@@ -205,7 +207,6 @@ thead {
 }
 
 tr {
-  display: flex;
   height: 40px;
 }
 
@@ -223,6 +224,12 @@ th {
   border: none;
 }
 
+
+:deep(.el-input__wrapper) {
+  border: none;
+  border-radius: revert;
+}
+
 :deep(.el-input__inner) {
   text-align: center;
 }

+ 69 - 7
src/views/project/componens/map-picker.vue

@@ -8,7 +8,7 @@
       ></el-input>
       <el-button type="primary" plain @click="show = true">查看地图</el-button>
     </div>
-    <el-dialog v-model="show" :width="960">
+    <el-dialog v-model="show" :width="960" @close="close">
       <template #header
         ><h4 class="full-width text-left">地理位置</h4></template
       >
@@ -34,10 +34,16 @@
         <el-divider />
         <div class="flex flex-center flex-justify-start full-width">
           <div class="text-left bold-500 black mr-10">相关图片</div>
-          <filepicker :project-id="projectId" />
+          <filepicker :project-id="projectId" @submit="filePicker" />
+          <span class="ml-20 font-12 grey-6">*请选择图片类型的文件</span>
         </div>
         <div class="img-content flex flex-justify-start hide-scrollbar mt-20">
-          <img src="../../../assets/svg/folder.svg" v-for="i in 20" />
+          <img
+            :src="item.url"
+            v-for="(item, index) in photoList"
+            :key="item.url"
+            @click="showImg(index)"
+          />
         </div>
         <div class="full-width flex flex-center flex-justify-end">
           <el-button type="primary" plain @click="show = false"
@@ -47,20 +53,32 @@
         </div>
       </div>
     </el-dialog>
+    <el-image-viewer
+      v-if="showImage"
+      :url-list="preList"
+      :initial-index="initial"
+      @close="showImage = false"
+    />
   </div>
 </template>
 
 <script>
 import filepicker from '@/components/filepicker/index.vue'
+import api from '@/api/index.js'
 
 export default {
   components: {
     filepicker
   },
   watch: {
+    projectId: {
+      type: String,
+      default: ''
+    },
     show: {
       handler(val) {
         if (val) {
+          this.getPhoto()
           setTimeout(() => {
             this.initMap()
           }, 1000)
@@ -90,12 +108,17 @@ export default {
     },
     latLng: {
       type: Array,
-      default: []
+      default: () => {
+        return []
+      }
     }
   },
   data() {
     return {
       show: false,
+      showImage: false,
+      initial: 0,
+      preList: [],
       map: null,
       geocoder: '',
       keyword: '相国',
@@ -110,10 +133,25 @@ export default {
         address: '',
         longitude: '',
         latitude: ''
-      }
+      },
+      photoList: [],
+      editPhoto: false
     }
   },
   methods: {
+    getPhoto() {
+      this.$api.project
+        .photoProject({ projectId: this.projectId })
+        .then(res => {
+          if (res.code === 200) {
+            this.photoList = res.data.map(ele => {
+              ele.fileVO.url = ele.fileVO.filePath
+              return ele.fileVO
+            })
+            this.preList = this.photoList.map(ele => ele.url)
+          }
+        })
+    },
     initMap() {
       window._AMapSecurityConfig = {
         securityJsCode: 'b7c07b56f6647ae56ff3d926a42d9565'
@@ -198,7 +236,6 @@ export default {
           e.value = e.name + '(' + e.district + ')'
           return e
         })
-        console.log(tmp)
         cb(tmp)
       })
     },
@@ -207,7 +244,32 @@ export default {
       this.form.latitude = this.latitude
       this.form.longitude = this.longitude
       this.show = false
-      this.$emit('success', this.form)
+      this.$emit('success', this.form, this.editPhoto ? this.photoList : [])
+    },
+    filePicker(list) {
+      this.editPhoto = true
+      const tmps = list
+        .filter(ele => !api.offices.includes(ele.suffix))
+        .map(ele => {
+          console.log(ele)
+          return {
+            bladeFileId: ele.fileId,
+            fileId: ele.id,
+            projectId: ele.projectId,
+            title: ele.title,
+            url: ele.url,
+            folderId: ele.parentId
+          }
+        })
+      this.photoList = this.photoList.concat(tmps)
+      this.preList = this.photoList.map(ele => ele.url)
+    },
+    showImg(index) {
+      this.initial = index
+      this.showImage = true
+    },
+    close() {
+      // this.photoList.length = 0
     }
   }
 }

+ 24 - 24
src/views/project/componens/top.vue

@@ -3,17 +3,17 @@
     <div class="white-bg border radius-5 picker flex flex-center">
       <span class="padding">项目阶段:</span>
       <el-select
-          class="padding-right"
-          style="width: 200px"
-          clearable
-          v-model="stage"
-          @change="changeStage"
+        class="padding-right"
+        style="width: 200px"
+        clearable
+        v-model="stage"
+        @change="changeStage"
       >
         <el-option
-            v-for="item in stages"
-            :key="item.id"
-            :label="item.name"
-            :value="item.id"
+          v-for="item in stages"
+          :key="item.id"
+          :label="item.name"
+          :value="item.id"
         />
       </el-select>
     </div>
@@ -51,23 +51,23 @@ export default {
      */
     getStage() {
       this.$api.project
-          .includeStage({projectId: this.projectId})
-          .then(res => {
-            if (res.code === 200) {
-              this.stages = res.data
-              this.stage = this.stages.find(ele => ele.isLastSelect === 1).id
-              this.$emit('change', this.stage)
-            }
-          })
+        .includeStage({ projectId: this.projectId })
+        .then(res => {
+          if (res.code === 200) {
+            this.stages = res.data
+            this.stage = this.stages.find(ele => ele.isLastSelect === 1).id
+            this.$emit('change', this.stage)
+          }
+        })
     },
     changeStage(res) {
-      this.$api.project.changeStage({projectId: this.projectId, stageId: res}).then(res => {
-        if (res.code === 200) {
-          this.$emit('change', res)
-        }
-      })
-
-
+      this.$api.project
+        .changeStage({ projectId: this.projectId, stageId: res })
+        .then(res => {
+          if (res.code === 200) {
+            this.$emit('change', res)
+          }
+        })
     }
   }
 }

+ 2 - 1
src/views/project/index.vue

@@ -15,7 +15,7 @@
       <info1 :info="detail" />
       <info2 :project-id="projectId" :stage-id="stageId" />
       <info3 :project-id="projectId" :stage-id="stageId" />
-      <info4 :info="detail" />
+      <info4 :project-id="projectId" />
       <info5 :info="detail" />
       <info6 :project-id="projectId" />
       <info7 :info="detail" />
@@ -111,6 +111,7 @@ export default {
 .bottom {
   position: fixed;
   bottom: 0;
+  z-index: 3;
   height: 68px;
   width: 1300px;
   background-color: white;