scorpioyq 2 سال پیش
والد
کامیت
eeac55d60c
3فایلهای تغییر یافته به همراه163 افزوده شده و 165 حذف شده
  1. 18 18
      src/layout/left.vue
  2. 28 27
      src/views/company/index.vue
  3. 117 120
      src/views/home/component/owner_serach.vue

+ 18 - 18
src/layout/left.vue

@@ -2,37 +2,37 @@
   <div class="box-shadow-blue full-height" style="background-color: #f4f3ee">
     <div class="padding mt-20">
       <div class="flex flex-center mt-10" style="margin-bottom: 60px">
-        <img src="@/assets/svg/logo.svg" />
+        <img src="@/assets/svg/logo.svg"/>
       </div>
     </div>
     <div>
       <div
-        class="flex flex-center flex-col bold font-18 item-bg padding-bottom full-width"
+          class="flex flex-center flex-col bold font-18 item-bg padding-bottom full-width"
       >
         <div
-          v-for="(item, index) in data"
-          :key="item.name"
-          class="full-width flex flex-col flex-center pointer"
+            v-for="(item, index) in data"
+            :key="item.name"
+            class="full-width flex flex-col flex-center pointer"
         >
           <div
-            class="full-width flex flex-center padding"
-            style="z-index: 2"
-            :class="active === index ? 'item-s' : 'item'"
-            @click="navClick(item, index)"
+              class="full-width flex flex-center padding"
+              style="z-index: 2"
+              :class="active === index ? 'item-s' : 'item'"
+              @click="navClick(item, index)"
           >
-            <img :src="item.img" />
+            <img :src="item.img"/>
             <span class="flex-child-average">{{ item.name }}</span>
           </div>
           <div
-            v-if="item.children && item.children.length > 0 && active === index"
-            class="flex flex-col flex-center item-sub padding"
+              v-if="item.children && item.children.length > 0 && active === index"
+              class="flex flex-col flex-center item-sub padding"
           >
             <div
-              v-for="(sub, subIndex) in item.children"
-              :key="item"
-              class="padding full-width flex flex-center"
-              :class="subIndex === subActive ? 'item-sub-active' : ''"
-              @click="subClick(sub, subIndex)"
+                v-for="(sub, subIndex) in item.children"
+                :key="item"
+                class="padding full-width flex flex-center"
+                :class="subIndex === subActive ? 'item-sub-active' : ''"
+                @click="subClick(sub, subIndex)"
             >
               <div class="mr-10 main-color">·</div>
               <span>{{ sub.name }}</span>
@@ -76,7 +76,7 @@ export default {
               path: '/database'
             },
             {
-              name: '公司资料',
+              name: '内部资料',
               img: new URL('../assets/svg/icon2.svg', import.meta.url).href,
               path: '/company'
             }

+ 28 - 27
src/views/company/index.vue

@@ -76,14 +76,15 @@
         @close='showImage = false'
     />
     <el-dialog v-model='authorShow' title='批量授权'>
-      <authorize :list='data' :folder-id='currentFolder.id' :extra='{type:2}' :author-type='false' @close='authorShow = false'/>
+      <authorize :list='data' :folder-id='currentFolder.id' :extra='{type:2}' :author-type='false'
+                 @close='authorShow = false'/>
     </el-dialog>
   </el-row>
 </template>
 
 <route>
 {
-name: '公司资料'
+name: '内部资料'
 }
 </route>
 
@@ -93,13 +94,13 @@ import baseButton from '@/components/base-button.vue'
 import basicCurd from '@/components/basic-curd/index.vue'
 import api from '@/api'
 import authorize from '@/views/home/component/authorize.vue'
-import { Base64 } from 'js-base64'
+import {Base64} from 'js-base64'
 import website from '@/config/website.js'
 
 export default {
   name: 'index',
-  components: { BasicContainer, baseButton, basicCurd, authorize },
-  data () {
+  components: {BasicContainer, baseButton, basicCurd, authorize},
+  data() {
     return {
       clientId: '',
       authorShow: false,
@@ -148,13 +149,13 @@ export default {
       fileList: []
     }
   },
-  created () {
+  created() {
     this.clientId = Base64.encode(`${website.clientId}:${website.clientSecret}`)
     this.list()
   },
   methods: {
-    list () {
-      this.$api.company.list({ current: 1, size: 100, parentId: '' }).then(res => {
+    list() {
+      this.$api.company.list({current: 1, size: 100, parentId: ''}).then(res => {
         if (res.code === 200) {
           this.folders = res.data.records
           if (this.folders.length > 0) {
@@ -166,12 +167,12 @@ export default {
         }
       })
     },
-    addFolder () {
+    addFolder() {
       this.$prompt('请输入分类名称', '提示', {
         confirmButtonText: '确定',
         cancelButtonText: '取消'
-      }).then(({ value }) => {
-        this.$api.company.submint({ title: value, type: 2 }).then(res => {
+      }).then(({value}) => {
+        this.$api.company.submint({title: value, type: 2}).then(res => {
           if (res.code === 200) {
             this.$message.success(res.msg)
             this.list()
@@ -181,14 +182,14 @@ export default {
         })
       })
     },
-    changeFolder (index) {
+    changeFolder(index) {
       this.active = index
       this.currentFolder = this.folders[index]
       this.page.current = 1
       this.onLoad()
     },
-    onLoad () {
-      const data = { parentId: this.currentFolder.id }
+    onLoad() {
+      const data = {parentId: this.currentFolder.id}
       this.$api.company.list(Object.assign(data, this.page)).then(res => {
         if (res.code === 200) {
           this.data = res.data.records
@@ -200,7 +201,7 @@ export default {
         this.loading = false
       })
     },
-    rowSave (row, done, loading) {
+    rowSave(row, done, loading) {
       const data = {
         projectInfoId: this.info.id
       }
@@ -217,7 +218,7 @@ export default {
         loading()
       })
     },
-    rowUpdate (row, index, done, loading) {
+    rowUpdate(row, index, done, loading) {
       const data = {
         projectInfoId: this.info.id
       }
@@ -234,10 +235,10 @@ export default {
         loading()
       })
     },
-    rowDetail (row, index) {
+    rowDetail(row, index) {
       if (row.type === 1) {
         if (['pdf', 'doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx'].includes(row.suffix)) {
-          const routeData = this.$router.resolve({ path: '/home/file_detail', query: { id: row.fileId } })
+          const routeData = this.$router.resolve({path: '/home/file_detail', query: {id: row.fileId}})
           window.open(routeData.href, '_blank')
         } else {
           this.imgList = [row.url]
@@ -250,14 +251,14 @@ export default {
         this.onLoad()
       }
     },
-    rowDel (row, index, done) {
+    rowDel(row, index, done) {
       console.log(row, index, done)
       this.$confirm('确定将选择数据删除?', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
         type: 'warning'
       }).then(() => {
-        return this.$api.company.removeList({ ids: row.id })
+        return this.$api.company.removeList({ids: row.id})
       }).then(() => {
         this.$message({
           type: 'success',
@@ -268,10 +269,10 @@ export default {
       }).catch(() => {
       })
     },
-    uploadSuccess (res, file, files) {
+    uploadSuccess(res, file, files) {
       this.fileList = files.map(sub => sub.response.data)
     },
-    saveFile () {
+    saveFile() {
       if (this.fileList.length === 0) {
         return
       }
@@ -306,7 +307,7 @@ export default {
      * @param item
      * @param type 1 图片 2 文件夹
      */
-    addFile (parentId, item, type) {
+    addFile(parentId, item, type) {
       const data = {
         title: item.originalFileName,
         parentId,
@@ -325,12 +326,12 @@ export default {
         }
       })
     },
-    addSubFolder () {
+    addSubFolder() {
       this.$prompt('请输入文件夹名称', '提示', {
         confirmButtonText: '确定',
         cancelButtonText: '取消'
-      }).then(({ value }) => {
-        const data = { parentId: this.currentFolder.id, title: value, type: 2 }
+      }).then(({value}) => {
+        const data = {parentId: this.currentFolder.id, title: value, type: 2}
         this.$api.company.submint(data).then(res => {
           if (res.code === 200) {
             this.$message.success(res.msg)
@@ -341,7 +342,7 @@ export default {
         })
       })
     },
-    backFolder () {
+    backFolder() {
       this.currentFolder = this.lastParentFolder[this.lastParentFolder.length - 1]
       this.lastParentFolder = this.lastParentFolder.filter(sub => sub.id !== this.currentFolder.id)
       this.onLoad()

+ 117 - 120
src/views/home/component/owner_serach.vue

@@ -2,33 +2,34 @@
   <div class="flex flex-center padding white-bg">
     <el-form v-model="form" class="lab mt-20 full-width" label-width="160px">
       <div class="flex">
-        <div class="flex flex-col mr-15">
+        <!-------left------->
+        <div class="flex flex-col mr-20">
           <el-form-item class="full-width" label="项目名称">
             <el-input
-              v-model="form.projectName"
-              placeholder="输入项目关键字"
-              prefix-icon="Search"
-              clearable
+                v-model="form.projectName"
+                placeholder="输入项目关键字"
+                prefix-icon="Search"
+                clearable
             />
           </el-form-item>
           <div class="flex flex-center">
             <el-form-item class="full-width" label="是否开工">
               <el-select v-model="form.isStart" style="width: 100%" clearable>
                 <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%" clearable>
                 <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>
@@ -36,46 +37,61 @@
           <div>
             <el-form-item class="full-width" label="计划(实际)开工时间">
               <el-date-picker
-                v-model="time1"
-                type="daterange"
-                @visible-change="visibleTime($event, 1)"
-                range-separator="至"
-                start-placeholder="开始时间"
-                end-placeholder="结束时间"
-                value-format="YYYY-MM-DD"
-                format="YYYY-MM-DD"
-                clearable
+                  v-model="time1"
+                  type="daterange"
+                  @visible-change="visibleTime($event, 1)"
+                  range-separator="至"
+                  start-placeholder="开始时间"
+                  end-placeholder="结束时间"
+                  value-format="YYYY-MM-DD"
+                  format="YYYY-MM-DD"
+                  clearable
               />
             </el-form-item>
           </div>
+          <div>
+            <el-form-item class="full-width" label="认定时间">
+              <el-select
+                  v-model="form.projectYear"
+                  style="width: 100%">
+                <el-option
+                    v-for="item in years"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value"
+                />
+              </el-select>
+            </el-form-item>
+          </div>
         </div>
-        <div class="flex flex-col ml-20 mr-15">
+        <!-------right------->
+        <div class="flex flex-col ml-20">
           <div class="flex flex-center">
             <el-form-item class="full-width" label="省重点">
               <el-select
-                v-model="form.isImportant"
-                style="width: 100%"
-                clearable
+                  v-model="form.isImportant"
+                  style="width: 100%"
+                  clearable
               >
                 <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%"
-                clearable
+                  v-model="form.isFocusStart"
+                  style="width: 100%"
+                  clearable
               >
                 <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>
@@ -83,16 +99,16 @@
           <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%"
-                clearable
-              >
+                  v-model="form.amount"
+                  @change="changeAmount"
+                  style="width: 100%"
+                  clearable
+              >1
                 <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>
@@ -106,73 +122,54 @@
           <div>
             <el-form-item class="full-width" label="计划(实际)入库时间">
               <el-date-picker
-                v-model="time2"
-                type="daterange"
-                @visible-change="visibleTime($event, 2)"
-                range-separator="至"
-                start-placeholder="开始时间"
-                end-placeholder="结束时间"
-                value-format="YYYY-MM-DD"
-                format="YYYY-MM-DD"
-                clearable
+                  v-model="time2"
+                  type="daterange"
+                  @visible-change="visibleTime($event, 2)"
+                  range-separator="至"
+                  start-placeholder="开始时间"
+                  end-placeholder="结束时间"
+                  value-format="YYYY-MM-DD"
+                  format="YYYY-MM-DD"
+                  clearable
               />
             </el-form-item>
           </div>
-        </div>
-      </div>
-      <div class="flex flex-center">
-        <div class="flex-child-average">
-          <el-form-item class="full-width" label="认定时间">
-            <el-select
-              v-model="form.projectYear"
-              style="width: 100%; margin-right: 20px"
-            >
-              <el-option
-                v-for="item in years"
-                :key="item.value"
-                :label="item.label"
-                :value="item.value"
-              />
-            </el-select>
-          </el-form-item>
-        </div>
-        <div
-          class="flex flex-align-center flex-justify-end ml-10 flex-child-average"
-          style="margin-bottom: 18px"
-        >
-          <base-button
-            class="pointer"
-            icon="Delete"
-            title="清空"
-            type="0"
-            :width="130"
-            @click="clear"
-          />
-          <base-button class="pointer ml-20" width="130" @click="sure" />
+          <div
+              class="flex flex-align-center flex-justify-end">
+            <base-button
+                class="pointer"
+                icon="Delete"
+                title="清空"
+                type="0"
+                :width="130"
+                @click="clear"
+            />
+            <base-button class="pointer ml-20" width="130" @click="sure"/>
+          </div>
         </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"
-          clearable
-          placeholder="机构快速搜索"
-          prefix-icon="Search"
-          @blur="change"
+            v-model="keyWords"
+            clearable
+            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'/>-->
@@ -181,20 +178,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>
@@ -202,12 +199,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>
@@ -216,11 +213,11 @@
 
 <script>
 import baseButton from '../../../components/base-button.vue'
-import { useStore } from '@/store/user.js'
+import {useStore} from '@/store/user.js'
 
 export default {
   name: 'owner_serach',
-  components: { baseButton },
+  components: {baseButton},
   watch: {
     keyWords: {
       handler(val) {
@@ -233,7 +230,7 @@ export default {
   },
   setup() {
     const user = useStore()
-    return { user }
+    return {user}
   },
   data() {
     return {
@@ -356,7 +353,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 = ''
@@ -368,7 +365,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 = ''
@@ -462,8 +459,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