scorpioyq пре 2 година
родитељ
комит
20d9b336e0

+ 1 - 1
src/components/filepicker/index.vue

@@ -157,7 +157,7 @@ export default {
   props: {
     btnText: {
       type: Boolean,
-      default: '文件上传'
+      default: '上传文件'
     },
     projectId: {
       required: true,

+ 3 - 3
src/views/contract/component/info.vue

@@ -7,8 +7,8 @@
           >{{ disabled ? '编 辑' : '保 存' }}
         </el-button>
         <el-button type="primary" plain @click="libraryDetail">
-          查 看</el-button
-        >
+          查 看
+        </el-button>
       </div>
     </div>
     <div class="padding">
@@ -20,7 +20,7 @@
       >
         <div class="full-width flex flex-center flex-justify-between">
           <el-form-item label="合同名称" class="flex-child-average">
-            <el-input v-if="form.fileFolder" v-model="form.fileFolder.title" />
+            <el-input v-if="form" v-model="form.title" />
           </el-form-item>
           <el-form-item label="合同类别" class="flex-child-average">
             <el-input v-model="form.type" />

+ 6 - 1
src/views/dash/compoents/profile.vue

@@ -4,7 +4,12 @@
       <div class="bold font-16" style="margin-top: -10px">我的信息</div>
       <div class="mt-10 ml-20" @click="show = true">
         <el-avatar :src="user.info.avatarUrl" :size="100"></el-avatar>
-        <el-icon :size="25" style="margin-left: -30px">
+        <el-icon
+          :size="25"
+          style="margin-left: -20px"
+          color="gray"
+          class="pointer"
+        >
           <EditPen />
         </el-icon>
       </div>

+ 1 - 1
src/views/home/pro_detail.vue

@@ -65,7 +65,7 @@ import params4 from '@/views/home/component/params/params4.vue'
 import params5 from '@/views/home/component/params/params5.vue'
 import params6 from '@/views/home/component/params/params6.vue'
 import params7 from '@/views/home/component/params/params7.vue'
-import params8 from '@/views/home/component/params/params8.vue'
+import params8 from '@/views/project/componens/params8.vue'
 import inspect1 from '@/views/home/component/inspect/Inspect1.vue'
 import dispatch from '@/views/home/component/dispatch.vue'
 

+ 174 - 3
src/views/project/componens/info2.vue

@@ -1,15 +1,186 @@
 <template>
   <wt-card title="前期情况" class="mt-10">
-    <div v-watermark:[text]="33">info2</div>
+    <div class="flex flex-justify-start full-width mt-15">
+      <avue-crud
+        :option="option"
+        :data="data"
+        ref="crud"
+        v-model="form"
+        :before-open="beforeOpen"
+        @row-del="rowDel"
+        @refresh-change="refreshChange"
+        @row-save="rowSave"
+        @row-update="rowUpdate"
+      >
+        <template #menu-left>
+          <div class="flex flex-center">
+            <filepicker
+              :project-id="info.id"
+              :command="dictList"
+              @submit="selection"
+            />
+          </div>
+        </template>
+      </avue-crud>
+    </div>
   </wt-card>
 </template>
 
 <script>
 import wtCard from '@/components/wt-card/index.vue'
+import filepicker from '@/components/filepicker/index.vue'
 
 export default {
-  components: {
-    wtCard
+  components: { wtCard, filepicker },
+  props: {
+    info: {
+      type: Object,
+      default: null
+    }
+  },
+  data() {
+    return {
+      form: {},
+      data: [],
+      option: {
+        align: 'center',
+        menuAlign: 'center',
+        menuWidth: 180,
+        size: 'mini',
+        addBtn: false,
+        editBtn: false,
+        viewBtn: true,
+        delBtn: true,
+        columnBtn: false,
+        labelWidth: 140,
+        border: true,
+        column: [
+          {
+            label: '文件名称',
+            prop: 'title',
+            fixed: true,
+            width: 400
+          },
+          {
+            label: '文号',
+            prop: 'amount'
+          },
+          {
+            label: '上传人',
+            prop: 'contacts',
+            width: 120
+          },
+          {
+            label: '上传时间',
+            prop: 'partyB'
+          }
+        ]
+      },
+      page: {
+        size: 10,
+        current: 1
+      },
+      dictList: []
+    }
+  },
+  created() {
+    this.getDic('traffic')
+  },
+  methods: {
+    getDic(code) {
+      this.$api.common.dicList({ code }).then(res => {
+        if (res.code === 200) {
+          if (code === 'traffic') {
+            this.dictList = res.data.map(e => {
+              return { label: e.dictValue, value: e.dictKey }
+            })
+          }
+        }
+      })
+    },
+    onLoad() {
+      this.loading = true
+      const data = Object.assign({
+        projectId: this.projectId,
+        stageId: this.stageId
+      })
+      this.$api.contract
+        .contractList(Object.assign(this.page, data))
+        .then(res => {
+          this.data = res.data.records.map(ele => {
+            if (ele.contractsStatus === -1) {
+              ele.contractsStatus = ''
+            }
+            if (ele.type === -1) {
+              ele.type = ''
+            }
+            return ele
+          })
+          this.page.total = res.data.total
+        })
+        .finally(() => {
+          this.loading = false
+        })
+    },
+    beforeOpen(done, type) {
+      if (type === 'view') {
+        const data = this.$router.resolve({
+          path: '/contract/detail',
+          query: { id: this.form.id }
+        })
+        window.open(data.href, '_blank')
+      }
+    },
+    rowDel(row, index, done) {
+      this.$confirm('确定将选择数据删除?', {
+        type: 'warning'
+      }).then(res => {
+        console.log(res)
+        if (res === 'confirm') {
+          this.$api.contract.contractRemove({ ids: row.id }).then(res => {
+            if (res.code === 200) {
+              this.$message.success(res.msg)
+              this.onLoad()
+            } else {
+              this.$message.error(res.msg)
+            }
+          })
+        }
+      })
+    },
+    currentChange(currentPage) {
+      this.page.current = currentPage
+    },
+    sizeChange(pageSize) {
+      this.page.size = pageSize
+    },
+    refreshChange() {
+      this.onLoad()
+    },
+    selection(list, command, extra) {
+      console.log(command, extra)
+      const tmps = list.map(ele => {
+        return {
+          fileId: ele.fileId,
+          projectId: ele.projectId,
+          pid: ele.id,
+          type: command.value
+        }
+      })
+      this.$api.project.linkFile(tmps).then(res => {
+        if (res.code === 200) {
+          this.refreshChange()
+        } else {
+          this.$message.error(res.msg)
+        }
+      })
+    },
+    moreContract() {
+      this.$router.push({
+        path: '/contract',
+        query: { id: this.projectId }
+      })
+    }
   }
 }
 </script>

+ 2 - 3
src/views/project/componens/info3.vue

@@ -15,8 +15,7 @@
         v-model="form"
         :before-open="beforeOpen"
         @row-del="rowDel"
-        @row-save="rowSave"
-        @row-update="rowUpdate"
+        @refresh-change="refreshChange"
       >
         <template #menu-left>
           <div class="flex flex-center">
@@ -82,7 +81,6 @@ export default {
         menuWidth: 180,
         size: 'mini',
         addBtn: false,
-        // addBtnText: '新增合同',
         editBtn: false,
         viewBtn: true,
         delBtn: true,
@@ -182,6 +180,7 @@ export default {
         return {
           fileId: ele.id,
           projectId: ele.projectId,
+          stageId: this.stageId,
           title: ele.title
         }
       })

+ 25 - 20
src/views/home/component/params/params8.vue → src/views/project/componens/info8.vue

@@ -1,33 +1,38 @@
 <template>
-  <div
-    class="flex flex-center full-width flex-justify-between mt-10 mb-10 flex-col"
-  >
-    <span class="full-width text-left bold mt-20 mb-10">编制任务</span>
-    <div style="width: 92%">
-      <task-table
-        :option="option"
-        :data="data"
-        :project-id="detail.id"
-        :total="total"
-        @refresh="list"
-      ></task-table>
+  <wt-card title="任务列表" class="mt-10">
+    <div
+      class="flex flex-center full-width flex-justify-between mb-10 flex-col"
+    >
+      <span class="full-width text-left bold mb-10">编制任务</span>
+      <div style="width: 100%" class="mt-10">
+        <task-table
+          :option="option"
+          :data="data"
+          :project-id="projectId"
+          :total="total"
+          @refresh="list"
+        ></task-table>
+      </div>
     </div>
-  </div>
+  </wt-card>
 </template>
 
 <script>
+import wtCard from '@/components/wt-card/index.vue'
 import TaskTable from '@/views/task/component/task-table.vue'
 
 export default {
-  components: { TaskTable },
+  name: 'info8',
+  components: { wtCard, TaskTable },
   props: {
-    detail: {
-      type: Object,
-      default: null
+    projectId: {
+      required: true,
+      type: String,
+      default: ''
     }
   },
   watch: {
-    detail: {
+    projectId: {
       handler(val) {
         if (val !== null && val !== undefined) {
           this.list()
@@ -70,7 +75,7 @@ export default {
   methods: {
     list() {
       this.$api.task
-        .taskListByProject({ projectId: this.detail.id, level: 1 })
+        .taskListByProject({ projectId: this.projectId, level: 1 })
         .then(res => {
           if (res.code === 200) {
             this.data = res.data.records
@@ -82,4 +87,4 @@ export default {
 }
 </script>
 
-<style lang="scss" scoped></style>
+<style scoped></style>

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

@@ -13,11 +13,12 @@
     <!--    content-->
     <div style="margin-bottom: 60px">
       <info1 :info="detail" />
-      <info2 />
+      <info2 :info="detail" />
       <info3 :project-id="projectId" :stage-id="stageId" />
       <info4 :info="detail" />
       <info5 :info="detail" />
       <info7 :info="detail" />
+      <info8 :project-id="projectId" />
     </div>
     <!--    buttom-->
     <div class="bottom flex flex-center flex-justify-end">
@@ -48,9 +49,20 @@ import info3 from '@/views/project/componens/info3.vue'
 import Info4 from '@/views/project/componens/info4.vue'
 import Info5 from '@/views/project/componens/info5.vue'
 import Info7 from '@/views/project/componens/info7.vue'
+import Info8 from '@/views/project/componens/info8.vue'
 
 export default {
-  components: { Info2, Info1, Info4, Info5, Info7, tipsCustom, top, info3 },
+  components: {
+    Info2,
+    Info1,
+    Info4,
+    Info5,
+    Info7,
+    tipsCustom,
+    top,
+    info3,
+    Info8
+  },
   data() {
     return {
       projectId: '',

+ 4 - 1
src/views/task/component/task-table.vue

@@ -22,7 +22,10 @@
           class="flex-child-shrink flex flex-justify-start first"
           :style="`width:` + item.width + 'px'"
         >
-          共 {{ total }}个任务
+          共<span class="main-color main-color font-16"
+            >&nbsp;{{ total }}&nbsp;</span
+          >
+          个任务
         </div>
         <div v-else class="flex-child-average">
           {{ item.label }}