scorpioyq 2 年之前
父節點
當前提交
7b2e8d15a8

+ 13 - 0
src/api/resource/index.js

@@ -63,5 +63,18 @@ export default {
       'post',
       'json'
     )
+  },
+  /**
+   * 文件归档接口
+   * @param params
+   * @returns {Promise<unknown>}
+   */
+  fileArchives(params) {
+    return fetch(
+      '/blade-project-manage-v2/folder/v2/fileFile',
+      params,
+      'post',
+      'json'
+    )
   }
 }

+ 89 - 96
src/views/home/component/owner_serach.vue

@@ -6,29 +6,29 @@
         <div class="flex flex-col mr-10">
           <el-form-item class="full-width" label="项目名称">
             <el-input
-                v-model="form.projectName"
-                placeholder="输入项目关键字"
-                prefix-icon="Search"
+              v-model="form.projectName"
+              placeholder="输入项目关键字"
+              prefix-icon="Search"
             />
           </el-form-item>
           <div class="flex flex-center">
             <el-form-item class="full-width" label="是否开工">
               <el-select v-model="form.isStart" style="width: 100%">
                 <el-option
-                    v-for="item in start"
-                    :key="item.value"
-                    :label="item.label"
-                    :value="item.value"
+                  v-for="item in start"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value"
                 />
               </el-select>
             </el-form-item>
             <el-form-item class="full-width" label="是否入库">
               <el-select v-model="form.isStorage" style="width: 100%">
                 <el-option
-                    v-for="item in storage"
-                    :key="item.value"
-                    :label="item.label"
-                    :value="item.value"
+                  v-for="item in storage"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value"
                 />
               </el-select>
             </el-form-item>
@@ -38,28 +38,22 @@
         <div class="flex flex-col ml-10">
           <div class="flex flex-center">
             <el-form-item class="full-width" label="省重点">
-              <el-select
-                  v-model="form.isImportant"
-                  style="width: 100%"
-              >
+              <el-select v-model="form.isImportant" style="width: 100%">
                 <el-option
-                    v-for="item in isimport"
-                    :key="item.value"
-                    :label="item.label"
-                    :value="item.value"
+                  v-for="item in isimport"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value"
                 />
               </el-select>
             </el-form-item>
             <el-form-item class="full-width" label="省集中开工">
-              <el-select
-                  v-model="form.isFocusStart"
-                  style="width: 100%"
-              >
+              <el-select v-model="form.isFocusStart" style="width: 100%">
                 <el-option
-                    v-for="item in isfocus"
-                    :key="item.value"
-                    :label="item.label"
-                    :value="item.value"
+                  v-for="item in isfocus"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value"
                 />
               </el-select>
             </el-form-item>
@@ -67,28 +61,25 @@
           <div class="flex flex-center flex-justify-between">
             <el-form-item class="full-width" label="总投资额">
               <el-select
-                  v-model="form.amount"
-                  @change="changeAmount"
-                  style="width: 100%"
+                v-model="form.amount"
+                @change="changeAmount"
+                style="width: 100%"
               >
                 <el-option
-                    v-for="item in totalAmount"
-                    :key="item.value"
-                    :label="item.name"
-                    :value="item.value"
+                  v-for="item in totalAmount"
+                  :key="item.value"
+                  :label="item.name"
+                  :value="item.value"
                 />
               </el-select>
             </el-form-item>
             <el-form-item class="full-width" label="行业分类">
-              <el-select
-                  v-model="form.dictKey"
-                  style="width: 100%"
-              >
+              <el-select v-model="form.dictKey" style="width: 100%">
                 <el-option
-                    v-for="item in industryList"
-                    :key="item.dictKey"
-                    :label="item.dictValue"
-                    :value="item.dictKey"
+                  v-for="item in industryList"
+                  :key="item.dictKey"
+                  :label="item.dictValue"
+                  :value="item.dictKey"
                 />
               </el-select>
             </el-form-item>
@@ -99,54 +90,54 @@
         <div class="flex-child-average flex flex-center">
           <el-form-item class="full-width" label="项目状态">
             <el-select
-                v-model="form.reportType"
-                style="width: 98%; margin: 0; padding: 0"
+              v-model="form.reportType"
+              style="width: 98%; margin: 0; padding: 0"
             >
               <el-option
-                  v-for="item in reportTypes"
-                  :key="item.value"
-                  :label="item.label"
-                  :value="item.value"
+                v-for="item in reportTypes"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value"
               />
             </el-select>
           </el-form-item>
         </div>
         <div
-            class="flex-child-average flex flex-align-center flex-justify-end"
-            style="margin-bottom: 18px"
+          class="flex-child-average flex flex-align-center flex-justify-end"
+          style="margin-bottom: 18px"
         >
           <base-button
-              class="pointer"
-              icon="Delete"
-              title="清空"
-              type="0"
-              :width="130"
-              @click="clear"
+            class="pointer"
+            icon="Delete"
+            title="清空"
+            type="0"
+            :width="130"
+            @click="clear"
           />
-          <base-button class="pointer" width="130" @click="sure"/>
+          <base-button class="pointer" width="130" @click="sure" />
         </div>
       </div>
     </el-form>
     <!----机构选择----->
     <el-dialog
-        v-model="showOrg"
-        append-to-body
-        center
-        title="机构选择"
-        width="45%"
+      v-model="showOrg"
+      append-to-body
+      center
+      title="机构选择"
+      width="45%"
     >
       <div class="flex flex-col">
         <el-input
-            v-model="keyWords"
-            placeholder="机构快速搜索"
-            prefix-icon="Search"
-            @blur="change"
+          v-model="keyWords"
+          placeholder="机构快速搜索"
+          prefix-icon="Search"
+          @blur="change"
         />
       </div>
-      <el-divider/>
+      <el-divider />
       <div
-          class="hide-scrollbar full-width"
-          style="height: 40vh; overflow-x: scroll"
+        class="hide-scrollbar full-width"
+        style="height: 40vh; overflow-x: scroll"
       >
         <!--        <div v-if='attaches.length === 0' class='full-width flex flex-center '>-->
         <!--          <el-empty image-size='100'/>-->
@@ -155,20 +146,20 @@
           <span class="bold font-15 grey ml-5">部门</span>
         </div>
         <div
-            class="grid radius mt-15 padding"
-            style="border: 1px solid #dddfe6"
+          class="grid radius mt-15 padding"
+          style="border: 1px solid #dddfe6"
         >
           <div
-              v-for="(item, index) in deptList"
-              :key="item.id"
-              class="flex flex-center pointer padding"
-              :class="item.search ? 'org-search' : item.checked ? 'org-s' : 'org'"
-              @click="changeChecked(index)"
+            v-for="(item, index) in deptList"
+            :key="item.id"
+            class="flex flex-center pointer padding"
+            :class="item.search ? 'org-search' : item.checked ? 'org-s' : 'org'"
+            @click="changeChecked(index)"
           >
             <div :class="item.checked ? 'dot-checked' : 'dot'"></div>
             <div
-                class="ml-5 full-width"
-                :class="item.checked || item.search ? 'white' : ''"
+              class="ml-5 full-width"
+              :class="item.checked || item.search ? 'white' : ''"
             >
               {{ item.deptName }}
             </div>
@@ -176,12 +167,12 @@
         </div>
       </div>
       <div class="flex flex-center mt-20 mb-5">
-        <base-button title="重置" type="0" icon="Refresh" @click="orgRefresh"/>
+        <base-button title="重置" type="0" icon="Refresh" @click="orgRefresh" />
         <base-button
-            class="ml-20"
-            title="确定"
-            icon="Check"
-            @click="orgCheck"
+          class="ml-20"
+          title="确定"
+          icon="Check"
+          @click="orgCheck"
         />
       </div>
     </el-dialog>
@@ -190,12 +181,12 @@
 
 <script>
 import baseButton from '../../../components/base-button.vue'
-import {useStore} from '@/store/user.js'
+import { useStore } from '@/store/user.js'
 import confing from '@/config/website'
 
 export default {
   name: 'owner_serach',
-  components: {baseButton},
+  components: { baseButton },
   watch: {
     keyWords: {
       handler(val) {
@@ -208,7 +199,7 @@ export default {
   },
   setup() {
     const user = useStore()
-    return {user}
+    return { user }
   },
   data() {
     return {
@@ -224,7 +215,7 @@ export default {
         isFocusStart: '', // 是否集中开工
         type: true,
         reportType: '',
-        dictKey: '',
+        dictKey: ''
       },
       totalAmount: [
         {
@@ -297,11 +288,13 @@ export default {
   },
   methods: {
     getDic() {
-      this.$api.common.dicList({code: 'industry-classification'}).then(res => {
-        if (res.code === 200) {
-          this.industryList = res.data
-        }
-      })
+      this.$api.common
+        .dicList({ code: 'industry-classification' })
+        .then(res => {
+          if (res.code === 200) {
+            this.industryList = res.data
+          }
+        })
     },
 
     getTypeList() {
@@ -319,7 +312,7 @@ export default {
       }
       if (this.form.isStart === 0) {
         this.form.planCommencementTime =
-            this.time1 === null ? '' : this.time1.join(',')
+          this.time1 === null ? '' : this.time1.join(',')
         this.form.startTime = ''
       } else if (this.form.isStart === 1 && this.time1 !== null) {
         this.form.planCommencementTime = ''
@@ -331,7 +324,7 @@ export default {
 
       if (this.form.isStorage === 0) {
         this.form.planStorageTime =
-            this.time2 === null ? '' : this.time2.join(',')
+          this.time2 === null ? '' : this.time2.join(',')
         this.form.storageTime = ''
       } else if (this.form.isStorage === 1 && this.time2 !== null) {
         this.form.planStorageTime = ''
@@ -416,8 +409,8 @@ export default {
         return
       }
       const tmp = this.deptList
-          .filter(sub => sub.deptName.indexOf(this.keyWords) > -1)
-          .map(sub => sub.id)
+        .filter(sub => sub.deptName.indexOf(this.keyWords) > -1)
+        .map(sub => sub.id)
       tmp.forEach(sub => {
         const index = this.deptList.findIndex(ele => ele.id === sub)
         this.deptList[index].search = true

+ 47 - 47
src/views/home/component/pro_left.vue

@@ -1,33 +1,33 @@
 <template>
   <div>
     <el-card
-        class="top full-height flex flex-col hide-scrollbar"
-        style="overflow-y: auto"
+      class="top full-height flex flex-col hide-scrollbar"
+      style="overflow-y: auto"
     >
       <div class="flex flex-col flex-center mt-15 padding">
         <span class="font-15 bold mb-10">{{ data.name }}</span>
         <span class="font-15 bold mt-5" style="color: #787c90"
-        >项目总投资额</span
+          >项目总投资额</span
         >
         <span class="mt-5 font-15 bold main-color"
-        >{{
+          >{{
             data.total_amount ? data.total_amount.toLocaleString() : '0'
           }}万元</span
         >
         <div class="flex flex-center mt-10">
           <!--          <span class="bold mr-15" style="color:#787C90;">{{ currentSituation.dictValue }}</span>-->
           <el-select
-              v-model="keyWords"
-              class="bold"
-              :placeholder="currentSituation.dictValue"
-              size="small"
-              @change="result"
+            v-model="keyWords"
+            class="bold"
+            :placeholder="currentSituation.dictValue"
+            size="small"
+            @change="result"
           >
             <el-option
-                v-for="item in dicList"
-                :key="item.dictKey"
-                :label="item.dictValue"
-                :value="item.dictKey"
+              v-for="item in dicList"
+              :key="item.dictKey"
+              :label="item.dictValue"
+              :value="item.dictKey"
             >
             </el-option>
           </el-select>
@@ -35,22 +35,22 @@
         <el-divider></el-divider>
         <div class="flex flex-center full-width">
           <span class="title pointer" @click="showRelation = !showRelation"
-          >已关联子项目<span class="bold blue font-16">{{ data.lot }}</span
-          >个</span
+            >已关联子项目<span class="bold blue font-16">{{ data.lot }}</span
+            >个</span
           >
         </div>
       </div>
       <div
-          class="flex flex-center flex-justify-between flex-col mt-15 hide-scrollbar"
-          style="height: 55vh; overflow-x: auto"
+        class="flex flex-center flex-justify-between flex-col mt-15 hide-scrollbar"
+        style="height: 55vh; overflow-x: auto"
       >
         <div v-if="dicList1 && dicList1.length > 0">
           <div
-              class="flex flex-center grey-9 font-15 bold pointer"
-              :class="active === index ? 'box-s' : 'box'"
-              v-for="(item, index) in dicList1"
-              :key="item.id"
-              @click="change(index)"
+            class="flex flex-center grey-9 font-15 bold pointer"
+            :class="active === index ? 'box-s' : 'box'"
+            v-for="(item, index) in dicList1"
+            :key="item.id"
+            @click="change(index)"
           >
             {{ item.dictValue }}
           </div>
@@ -58,25 +58,25 @@
         <div v-else>
           <div>
             <el-select
-                v-model="year"
-                placeholder="选择年份"
-                clearable
-                @change="yearSelect"
+              v-model="year"
+              placeholder="选择年份"
+              clearable
+              @change="yearSelect"
             >
               <el-option
-                  v-for="item in years"
-                  :key="item.value"
-                  :label="item.value"
-                  :value="item.value"
+                v-for="item in years"
+                :key="item.value"
+                :label="item.value"
+                :value="item.value"
               />
             </el-select>
           </div>
           <div
-              class="flex flex-center grey-9 font-15 bold pointer mt-5"
-              :class="active === index ? 'box-s' : 'box'"
-              v-for="(item, index) in month"
-              :key="item"
-              @click="change(index)"
+            class="flex flex-center grey-9 font-15 bold pointer mt-5"
+            :class="active === index ? 'box-s' : 'box'"
+            v-for="(item, index) in month"
+            :key="item"
+            @click="change(index)"
           >
             {{ item.value }}
           </div>
@@ -84,10 +84,10 @@
       </div>
     </el-card>
     <pro-relation
-        :showRelation="showRelation"
-        :projectId="data.id"
-        @close="showRelation = false"
-        @success="updateLot"
+      :showRelation="showRelation"
+      :projectId="data.id"
+      @close="showRelation = false"
+      @success="updateLot"
     />
   </div>
 </template>
@@ -97,7 +97,7 @@ import proRelation from '@/views/home/component/pro_relation.vue'
 
 export default {
   name: 'pro_left',
-  components: {proRelation},
+  components: { proRelation },
   props: {
     data: Object,
     code: {
@@ -204,7 +204,7 @@ export default {
       this.years.length = 0
       this.year = new Date().getFullYear()
       for (let i = 2015; i <= this.year; i++) {
-        const item = {label: i, value: i}
+        const item = { label: i, value: i }
         this.years.push(item)
       }
       this.years.reverse()
@@ -216,7 +216,7 @@ export default {
       this.$bus.on('scorll', e => {
         const scrollTop = e
         const index = this.scorllTopList.findIndex(
-            e => scrollTop >= e.start && scrollTop < e.end
+          e => scrollTop >= e.start && scrollTop < e.end
         )
         if (this.code === 'project_dispatch') {
           return
@@ -228,12 +228,12 @@ export default {
       })
     },
     getDic(code) {
-      this.$api.common.dicList({code}).then(res => {
+      this.$api.common.dicList({ code }).then(res => {
         if (res.code === 200) {
           if (code === 'project-situation') {
             this.dicList = res.data
             const local = this.dicList.filter(
-                e => e.dictKey === this.projectStage
+              e => e.dictKey === this.projectStage
             )
             if (local.length > 0) {
               this.currentSituation = local[0]
@@ -247,9 +247,9 @@ export default {
             setTimeout(() => {
               for (let i = 0; i < this.resultList.length; i++) {
                 const start =
-                    i === 0 ? 0 : document.getElementById('header' + i).offsetTop
+                  i === 0 ? 0 : document.getElementById('header' + i).offsetTop
                 const end = document.getElementById(
-                    'header' + (i + 1)
+                  'header' + (i + 1)
                 ).offsetTop
                 const data = {
                   index: i,
@@ -270,7 +270,7 @@ export default {
       this.$emit('typeChange1')
     },
     result(item) {
-      const data = {id: this.data.id, project_stage: Number.parseInt(item)}
+      const data = { id: this.data.id, project_stage: Number.parseInt(item) }
       this.$api.project.proUpdate(data).then(res => {
         if (res.code === 200) {
           this.$message.success(res.msg)

+ 68 - 59
src/views/home/component/top_serach.vue

@@ -4,31 +4,32 @@
       <div class="flex flex-center">
         <el-form-item class="full-width" label="项目名称">
           <el-input
-              v-model="form.name"
-              clearable
-              placeholder="输入项目关键字"
-              prefix-icon="Search"
+            v-model="form.name"
+            clearable
+            placeholder="输入项目关键字"
+            prefix-icon="Search"
           />
         </el-form-item>
         <el-form-item class="full-width" label="业主部门">
           <el-input
-              v-model="form.createDept"
-              clearable
-              placeholder="输入业主部门"
-              prefix-icon="Search"
+            v-model="form.createDept"
+            clearable
+            placeholder="输入业主部门"
+            prefix-icon="Search"
           />
         </el-form-item>
         <el-form-item class="full-width" label="项目类型">
           <el-select
-              v-model="form.projectType"
-              clearable
-              placeholder="选择项目类型"
-              style="width: 100%">
+            v-model="form.projectType"
+            clearable
+            placeholder="选择项目类型"
+            style="width: 100%"
+          >
             <el-option
-                v-for="item in typeList"
-                :key="item.id"
-                :label="item.name"
-                :value="item.id"
+              v-for="item in typeList"
+              :key="item.id"
+              :label="item.name"
+              :value="item.id"
             />
           </el-select>
         </el-form-item>
@@ -39,12 +40,11 @@
           <el-col :span="11">
             <el-form-item>
               <el-date-picker
-                  v-model="form.startDate"
-                  placeholder="开始日期"
-                  style="width: 100%"
-                  type="month"
-                  value-format="YYYY-MM"
-
+                v-model="form.startDate"
+                placeholder="开始日期"
+                style="width: 100%"
+                type="month"
+                value-format="YYYY-MM"
               />
             </el-form-item>
           </el-col>
@@ -54,27 +54,28 @@
           <el-col :span="11">
             <el-form-item>
               <el-date-picker
-                  v-model="form.endDate"
-                  placeholder="结束日期"
-                  style="width: 100%"
-                  type="month"
-                  value-format="YYYY-MM"
+                v-model="form.endDate"
+                placeholder="结束日期"
+                style="width: 100%"
+                type="month"
+                value-format="YYYY-MM"
               />
             </el-form-item>
           </el-col>
         </el-form-item>
         <!------领域------>
-        <el-form-item class="full-width " label="项目领域">
+        <el-form-item class="full-width" label="项目领域">
           <el-select
-              v-model="form.dictName"
-              clearable
-              placeholder="输入项目领域"
-              style="width: 100%">
+            v-model="form.dictName"
+            clearable
+            placeholder="输入项目领域"
+            style="width: 100%"
+          >
             <el-option
-                v-for="item in deptFields"
-                :key="item.id"
-                :label="item.dictValue"
-                :value="item.id"
+              v-for="item in deptFields"
+              :key="item.id"
+              :label="item.dictValue"
+              :value="item.id"
             />
           </el-select>
         </el-form-item>
@@ -86,11 +87,11 @@
             <el-col :span="11">
               <el-form-item>
                 <el-date-picker
-                    v-model="form.operationStartDate"
-                    placeholder="开始日期"
-                    style="width: 100%"
-                    type="month"
-                    value-format="YYYY-MM"
+                  v-model="form.operationStartDate"
+                  placeholder="开始日期"
+                  style="width: 100%"
+                  type="month"
+                  value-format="YYYY-MM"
                 />
               </el-form-item>
             </el-col>
@@ -100,31 +101,39 @@
             <el-col :span="11">
               <el-form-item>
                 <el-date-picker
-                    v-model="form.operationEndDate"
-                    placeholder="结束日期"
-                    style="width: 100%"
-                    type="month"
-                    value-format="YYYY-MM"
+                  v-model="form.operationEndDate"
+                  placeholder="结束日期"
+                  style="width: 100%"
+                  type="month"
+                  value-format="YYYY-MM"
                 />
               </el-form-item>
             </el-col>
           </el-form-item>
           <el-form-item class="full-width" label="发债时间">
             <el-date-picker
-                v-model="form.issueYear"
-                placeholder="选择发债年份"
-                style="width: 100%"
-                type="year"
-                value-format="YYYY"
+              v-model="form.issueYear"
+              placeholder="选择发债年份"
+              style="width: 100%"
+              type="year"
+              value-format="YYYY"
             />
           </el-form-item>
         </el-col>
         <el-col :span="8">
-          <div class="flex flex-center flex-justify-end"
-               style="margin-bottom: 18px;width: 82%;margin-left: 120px">
+          <div
+            class="flex flex-center flex-justify-end"
+            style="margin-bottom: 18px; width: 82%; margin-left: 120px"
+          >
             <div class="flex flex-center">
-              <base-button class="pointer mr-20" icon="Delete" title="清空" type="0" @click="clear"/>
-              <base-button class="pointer" @click="sure"/>
+              <base-button
+                class="pointer mr-20"
+                icon="Delete"
+                title="清空"
+                type="0"
+                @click="clear"
+              />
+              <base-button class="pointer" @click="sure" />
             </div>
           </div>
         </el-col>
@@ -138,7 +147,7 @@ import baseButton from '../../../components/base-button.vue'
 
 export default {
   name: 'top-serach',
-  components: {baseButton},
+  components: { baseButton },
   data() {
     return {
       form: {
@@ -150,7 +159,7 @@ export default {
         operationStartDate: '', // 项目运营期
         operationEndDate: '',
         issueYear: '', // 发行日期
-        projectType: ''// 项目类型
+        projectType: '' // 项目类型
       },
       typeList: [],
       deptFields: []
@@ -179,12 +188,12 @@ export default {
         operationStartDate: '', // 项目运营期
         operationEndDate: '',
         issueDate: '', // 发行日期
-        projectType: ''// 项目类型
+        projectType: '' // 项目类型
       }
       this.$bus.emit('serach', this.form)
     },
     getDict() {
-      this.$api.common.dicList({code: 'pc-debt-type'}).then(res => {
+      this.$api.common.dicList({ code: 'pc-debt-type' }).then(res => {
         if (res.code === 200) {
           this.deptFields = res.data.map(sub => {
             sub.checked = false

+ 1 - 2
src/views/invest/components/years.vue

@@ -73,7 +73,6 @@ import wave from '@/views/invest/components/wave.vue'
 import { useStore } from '@/store/user.js'
 import { ElMessageBox } from 'element-plus'
 import index from '@/views/task/Index.vue'
-import permission from '@/store/permission.js'
 import permissionStore from '@/store/permission.js'
 
 export default {
@@ -260,7 +259,7 @@ export default {
 
 <style lang="scss" scoped>
 .content {
-  background-image: url('./src/assets/svg/invest/wave/1.svg');
+  background-image: url('@/assets/svg/invest/wave/1.svg');
   background-size: 100% 100%;
   background-repeat: no-repeat;
 }

+ 315 - 4
src/views/resource/component/archives.vue

@@ -1,17 +1,328 @@
 <template>
   <div>
-    <el-button type="primary" text @click="show = true">归档</el-button>
-    <el-dialog v-model="show">
-      <div>dd</div>
+    <el-button
+      class="ml-10"
+      type="primary"
+      size="small"
+      text
+      @click="this.show = true"
+      >归档
+    </el-button>
+    <el-dialog
+      v-model="show"
+      title="归档"
+      width="960"
+      :close-on-click-modal="false"
+      :show-close="false"
+    >
+      <el-form :model="form" label-width="100px" :rules="rules" ref="formRef">
+        <div class="flex flex-col flex-justify-between border-bottom">
+          <div class="flex flex-center">
+            <el-form-item label="类别:">
+              <el-select
+                v-model="from.category"
+                clearable
+                placeholder="选择文件类别"
+                style="width: 200px"
+              >
+                <el-option
+                  v-for="item in category"
+                  :key="item.dictKey"
+                  :label="item.dictValue"
+                  :value="item.dictKey"
+                />
+              </el-select>
+            </el-form-item>
+            <el-form-item label="属别:">
+              <el-select
+                v-model="from.genus"
+                clearable
+                placeholder="选择归档属别"
+                style="width: 200px"
+              >
+                <el-option
+                  v-for="item in genus"
+                  :key="item.dictKey"
+                  :label="item.dictValue"
+                  :value="item.dictKey"
+                />
+              </el-select>
+            </el-form-item>
+            <el-form-item class="mr-20" label="归档类型:">
+              <el-select
+                v-model="from.fileType"
+                clearable
+                placeholder="选择归档类型"
+                style="width: 200px"
+              >
+                <el-option
+                  v-for="item in fileType"
+                  :key="item.dictKey"
+                  :label="item.dictValue"
+                  :value="item.dictKey"
+                />
+              </el-select>
+            </el-form-item>
+          </div>
+        </div>
+        <div class="mt-20 mr-20">
+          <el-form-item class="full-width" label="案卷标题:" prop="fileTitle">
+            <el-input
+              v-model="from.fileTitle"
+              placeholder="输入案卷标题"
+              autosize
+              type="textarea"
+            />
+          </el-form-item>
+        </div>
+        <div class="mt-20 mr-20 flex flex-center flex-justify-between">
+          <el-form-item class="full-width" label="全宗号:" prop="quanzongNum">
+            <el-input v-model="from.quanzongNum" placeholder="输入全宗号" />
+          </el-form-item>
+          <el-form-item class="full-width" label="目录号:">
+            <el-input v-model="from.directoryNum" placeholder="输入目录号" />
+          </el-form-item>
+          <el-form-item class="full-width" label="案卷号:" prop="recordsNum">
+            <el-input v-model="from.recordsNum" placeholder="输入案卷号" />
+          </el-form-item>
+        </div>
+        <div class="mt-5 mr-20 flex flex-center flex-justify-between">
+          <el-form-item style="width: 33.5%" label="编制单位:" prop="makeUnit">
+            <el-input v-model="from.makeUnit" placeholder="输入编制单位" />
+          </el-form-item>
+          <el-form-item style="width: 66.5%" label="编制日期:" prop="makeDate">
+            <div class="flex flex-center">
+              <el-col :span="10">
+                <el-form-item>
+                  <el-date-picker
+                    v-model="from.makeStartDate"
+                    placeholder="开始日期"
+                    type="date"
+                    value-format="YYYY-MM-DD"
+                  />
+                </el-form-item>
+              </el-col>
+              <el-col :span="3">
+                <span class="grey-6">至</span>
+              </el-col>
+              <el-col :span="10">
+                <el-form-item>
+                  <el-date-picker
+                    v-model="from.makeEndDate"
+                    placeholder="结束日期"
+                    type="date"
+                    value-format="YYYY-MM-DD"
+                  />
+                </el-form-item>
+              </el-col>
+            </div>
+          </el-form-item>
+        </div>
+        <div class="mt-5 mr-20 flex flex-center flex-justify-between">
+          <el-form-item label="归档日期:" prop="fileDate">
+            <el-date-picker
+              style="width: 200px"
+              v-model="from.fileDate"
+              placeholder="归档日期"
+              type="date"
+              value-format="YYYY-MM-DD"
+            />
+          </el-form-item>
+          <el-form-item
+            class="full-width"
+            label="保管期限:"
+            prop="retentionPeriod"
+          >
+            <el-select
+              v-model="from.retentionPeriod"
+              clearable
+              placeholder="选择保管期限"
+              style="width: 200px"
+            >
+              <el-option
+                v-for="item in retentionPeriod"
+                :key="item.dictKey"
+                :label="item.dictValue"
+                :value="item.dictKey"
+              />
+            </el-select>
+          </el-form-item>
+          <el-form-item class="full-width" label="密级:" prop="classification">
+            <el-select
+              v-model="from.classification"
+              clearable
+              placeholder="选择密级"
+              style="width: 200px"
+            >
+              <el-option
+                v-for="item in classification"
+                :key="item.dictKey"
+                :label="item.dictValue"
+                :value="item.dictKey"
+              />
+            </el-select>
+          </el-form-item>
+        </div>
+        <div class="mt-5 mr-20 flex flex-center flex-justify-between">
+          <el-form-item
+            class="full-width"
+            label="归档位置:"
+            prop="fileLocation"
+          >
+            <el-input v-model="from.fileLocation" placeholder="输入归档位置" />
+          </el-form-item>
+        </div>
+        <div class="flex flex-center mt-20 mb-20">
+          <base-button
+            class="mr-20"
+            type="0"
+            icon="CircleClose"
+            title="取消"
+            @click="show = false"
+          />
+          <base-button
+            title="归档"
+            icon="DocumentChecked"
+            @click="archiveInduction"
+          />
+        </div>
+      </el-form>
     </el-dialog>
   </div>
 </template>
 
 <script>
+import baseButton from '@/components/base-button.vue'
+
 export default {
+  components: { baseButton },
+  props: {
+    folderId: {
+      type: String,
+      default: ''
+    }
+  },
   data() {
     return {
-      show: false
+      show: false,
+      from: {
+        folderId: '',
+        category: '1', // 类别
+        classification: '', // 密级
+        directoryNum: '', // 目录号
+        fileDate: '', // 归档日期
+        fileLocation: '', // 归档位置
+        fileTitle: '', // 案卷标题
+        fileType: '1', // 档案类型
+        makeStartDate: '', // 编织开始时间
+        makeEndDate: '', // 编制结束时间
+        makeUnit: '', // 编制单位
+        quanzongNum: '', // 全宗号
+        recordsNum: '', // 案卷号
+        retentionPeriod: '', // 保管期限
+        genus: '1' // 属别
+      },
+      genus: [],
+      category: [],
+      classification: [],
+      fileType: [],
+      retentionPeriod: [],
+      rules: {
+        fileTitle: {
+          required: true,
+          message: '案卷标题不能为空!',
+          trigger: 'blur'
+        },
+        quanzongNum: {
+          required: true,
+          message: '全宗号不能为空!',
+          trigger: 'blur'
+        },
+        recordsNum: [
+          {
+            required: true,
+            message: '案卷号不能为空!',
+            trigger: 'blur'
+          }
+        ],
+        makeUnit: [
+          {
+            required: true,
+            message: '编制单位不能为空!',
+            trigger: 'blur'
+          }
+        ],
+        makeDate: [
+          {
+            required: true,
+            message: '编制时间不能为空!',
+            trigger: 'blur'
+          }
+        ],
+        fileDate: [
+          {
+            required: true,
+            message: '归档日期不能为空!',
+            trigger: 'blur'
+          }
+        ],
+        retentionPeriod: [
+          {
+            required: true,
+            message: '保管期限不能为空!',
+            trigger: 'blur'
+          }
+        ],
+        classification: [
+          {
+            required: true,
+            message: '保管密级不能为空!',
+            trigger: 'blur'
+          }
+        ],
+        fileLocation: [
+          {
+            required: true,
+            message: '档案位置不能为空!',
+            trigger: 'blur'
+          }
+        ]
+      }
+    }
+  },
+  created() {
+    this.getDic('archive-category')
+    this.getDic('file-genus')
+    this.getDic('archives-type')
+    this.getDic('retention-period')
+    this.getDic('file-classification')
+  },
+  methods: {
+    getDic(code) {
+      this.$api.common.dicList({ code }).then(res => {
+        if (res.code === 200) {
+          if (code === 'archive-category') {
+            this.category = res.data
+          } else if (code === 'file-genus') {
+            this.genus = res.data
+          } else if (code === 'archives-type') {
+            this.fileType = res.data
+          } else if (code === 'retention-period') {
+            this.retentionPeriod = res.data
+          } else if (code === 'file-classification') {
+            this.classification = res.data
+          }
+        }
+      })
+    },
+    archiveInduction() {
+      // this.$refs.formRef.validate((valid, fields) => {
+      //   console.log(valid)
+      // })
+      this.from.folderId = this.folderId
+      this.$api.resource.fileArchives(this.from).then(res => {
+        console.log(res)
+      })
     }
   }
 }

+ 3 - 3
src/views/resource/component/xtable.vue

@@ -37,9 +37,9 @@
             >
               <el-button type="primary" size="small" text>查看</el-button>
               <el-button v-if="row.type === 2" type="primary" size="small" text
-                >重命名</el-button
-              >
-              <archives v-if="row.type === 2" />
+                >重命名
+              </el-button>
+              <archives v-if="row.type === 2" :folderId="row.id" />
               <move v-if="row.type === 1" />
               <slot name="menu"></slot>
             </div>