scorpio 2 lat temu
rodzic
commit
ad14277c55

+ 1 - 15
src/views/contract/component/info3.vue

@@ -94,9 +94,7 @@ export default {
   },
   methods: {
     beforeOpen(done, type) {
-      if (type === 'add') {
-        this.openFile()
-      } else if (type === 'view') {
+      if (type === 'view') {
         this.previewFile(this.form)
       } else if (type === 'edit') {
         this.downLoad(this.form)
@@ -137,18 +135,6 @@ export default {
         return Object.assign(ele, file)
       })
     },
-    openFile() {
-      const routeUrl = this.$router.resolve({
-        path: '/home/details',
-        query: {
-          dispatchType: 1,
-          id: this.info.projectId,
-          type: 5,
-          contractId: this.info.id
-        }
-      })
-      window.open(routeUrl.href, '_blank')
-    },
     submit(list) {
       const tmps = list.map(ele => {
         return { fileId: ele.id, contractId: this.info.id }

+ 0 - 1
src/views/database/component/list.vue

@@ -129,7 +129,6 @@ export default {
     beforeOpen(done, type) {
       if (['view'].includes(type)) {
         this.showInfo = true
-        console.log(this.showInfo)
         this.id = this.form.id
       } else if (type === 'edit') {
         this.$router.push({

+ 0 - 279
src/views/home/component/current.vue

@@ -1,279 +0,0 @@
-<template>
-  <div class="flex flex-col padding">
-    <div class="flex flex-center mt-20">
-      <div
-        class="bold font-16 grey flex-child-average text-left"
-        style="margin-left: 50px"
-      >
-        <div>
-          <el-button
-            type="primary"
-            class="mr-20"
-            icon="el-icon-back"
-            @click="this.$router.go(-1)"
-            >返回上一层
-          </el-button>
-          <span>{{ folderName }}({{ folderNumber }})</span>
-        </div>
-      </div>
-      <div
-        class="flex flex-center flex-child-average flex-justify-end"
-        style="margin-right: 50px"
-      >
-        <base-button
-          v-if="permissions && permissions.permissions.home_folder_authorize"
-          class="mr-5"
-          icon="User"
-          title="批量授权"
-          type="0"
-          @click="showClick"
-        />
-        <base-button
-          v-if="
-            permissions &&
-            permissions.permissions.floder_detail_add &&
-            isAccess === '2'
-          "
-          icon="Plus"
-          title="添加文件夹"
-          class="mr-5"
-          type="0"
-          @click="addShow = true"
-        />
-        <base-button
-          v-if="isAccess === '2'"
-          icon="Upload"
-          title="上传文件"
-          @click="show = true"
-        />
-      </div>
-    </div>
-    <files-list :data="data" class="mt-20" @change="changePage" />
-    <el-dialog v-model="show" append-to-body center title="附件上传(可批量)">
-      <div class="flex flex-col" style="margin-top: -20px">
-        <span class="font-16 main-color bold mb-10">{{ folderName }}</span>
-        <uploadFile
-          :data="{ type: 1, toStatus: 0 }"
-          :max="20"
-          @close="show = false"
-          accept=".doc,.docx,.pdf,.xls,.xlsx,.png,.jpg,.jpeg,.ppt,pptx"
-          @success="success"
-        />
-      </div>
-    </el-dialog>
-
-    <el-dialog
-      v-model="authorizeShow"
-      :show-close="false"
-      append-to-body
-      center
-    >
-      <template #header="{ close, titleId, titleClass }">
-        <div class="flex flex-justify-between">
-          <h4 :id="titleId" :class="titleClass">{{ data.folderName }}</h4>
-          <el-button text type="danger" @click="close">
-            <el-icon class="el-icon--left">
-              <CircleCloseFilled />
-            </el-icon>
-          </el-button>
-        </div>
-      </template>
-      <authorize
-        :list="data.records"
-        :folder-id="id"
-        :extra="{ type: 1 }"
-        :project-id="projectId"
-        :folder-name="folderName"
-        :author-type="false"
-        @close="authorizeShow = false"
-      />
-    </el-dialog>
-    <el-dialog v-model="addShow" append-to-body width="40%">
-      <div class="flex flex-col">
-        <el-form
-          ref="ruleFormRef"
-          :model="folderInfo"
-          class="demo-ruleForm"
-          label-width="120px"
-          status-icon
-        >
-          <el-form-item label="文件夹名称">
-            <el-input
-              v-model="folderInfo.title"
-              placeholder="填写文件夹名称"
-              style="width: 100%"
-            />
-          </el-form-item>
-        </el-form>
-        <div class="full-width flex flex-center mt-10">
-          <base-button icon="Lock" title="保存" type="1" @click="folderAdd" />
-        </div>
-      </div>
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-import filesList from './files_list.vue'
-import baseButton from '../../../components/base-button.vue'
-import uploadFile from '../../../components/upload-file.vue'
-import authorize from '@/views/home/component/authorize.vue'
-import permissionStore from '@/store/permission.js'
-import { useStore } from '@/store/user.js'
-
-export default {
-  name: 'current',
-  components: { filesList, baseButton, uploadFile, authorize },
-  props: {
-    id: String,
-    data: Object
-  },
-  data() {
-    return {
-      dispatchParams: null,
-      authorizeShow: false,
-      addShow: false,
-      show: false,
-      folderInfo: {
-        title: '',
-        stageId: '',
-        projectId: '',
-        parentId: '',
-        dictKey: '',
-        folderType: '1',
-        type: 2
-      },
-      fileList: [],
-      saveCount: 0,
-      libraryList: [],
-      projectId: '',
-      sendParams: {
-        ids: '',
-        ownerId: '',
-        projectId: ''
-      },
-      isAccess: '',
-      folderName: '',
-      folderNumber: 0
-    }
-  },
-  setup() {
-    const permissions = permissionStore()
-    const user = useStore()
-    return { permissions, user }
-  },
-  created() {
-    this.dispatchParams = this.$route.query
-    this.folderName = this.$route.query.folderName
-    this.folderNumber = this.$route.query.folderNumber
-    this.isAccess = this.$route.query.isAccess
-    this.projectId = this.$route.query.projectId
-    this.folderInfo.dictKey = this.$route.query.dictKey
-    this.folderInfo.stageId = this.$route.query.projectStageId
-  },
-  methods: {
-    showClick() {
-      this.authorizeShow = true
-    },
-    success(res) {
-      this.fileList = res.fileList.map(res => {
-        const item = {}
-        item.title = res.response.data.originalFileName
-        item.suffix = res.response.data.suffix
-        item.volume = res.response.data.volume
-        item.fileId = res.response.data.id
-        item.url = res.response.data.filePath
-        item.parentId = this.id
-        item.projectId = this.$route.query.projectId
-        item.type = 1
-        item.dictKey = this.$route.query.dictKey
-        item.stageId = this.$route.query.projectStageId
-        return item
-      })
-      this.fileList.forEach(sub => {
-        this.saveCount++
-        if (
-          ['pdf', 'doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx'].includes(
-            sub.suffix
-          )
-        ) {
-          this.saveLibrary(sub)
-        }
-        if (this.saveCount === this.fileList.length) {
-          this.saveCount = 0
-          this.addFile()
-        }
-      })
-    },
-    saveLibrary(sub) {
-      const data = { category: 4, content: '' }
-      this.$api.common.submit(Object.assign(sub, data)).then(res => {
-        if (res.code === 200) {
-          this.saveCount++
-          this.libraryList.push(res.data.id)
-        } else {
-          this.$message.error(res.msg)
-        }
-      })
-    },
-    addFile() {
-      let data = { files: this.fileList }
-      if (this.dispatchParams) {
-        data = Object.assign(data, this.dispatchParams)
-      }
-      this.$api.project.fileAdd(data).then(res => {
-        if (res.code === 200) {
-          this.show = false
-          this.$emit('reFiles')
-          this.$message.success(res.msg)
-          if (this.user.info.type !== 3) {
-            this.$confirm('文件上传成功,是否给业主发送提醒消息?', {
-              confirmButtonText: '确定',
-              cancelButtonText: '取消',
-              type: 'warning'
-            }).then(() => {
-              this.SendMsg()
-            })
-          }
-        } else {
-          this.show = false
-          this.$message.error(res.msg)
-        }
-      })
-    },
-    SendMsg() {
-      this.sendParams.ids = this.fileList.map(e => e.fileId).join(',')
-      this.sendParams.projectId = this.$route.query.projectId
-      this.sendParams.ownerId = this.$route.query.ownerId
-      console.log(this.sendParams)
-      this.$api.project.send(this.sendParams).then(res => {
-        if (res.code === 200) {
-          this.$message.success('消息已经发送成功!')
-          this.$bus.emit('reFolder')
-          this.sendMsg = false
-        } else {
-          this.$message.error(res.msg)
-        }
-      })
-    },
-    folderAdd() {
-      this.folderInfo.projectId = this.projectId
-      this.folderInfo.parentId = this.id
-      this.$api.project.folderAdd(this.folderInfo).then(res => {
-        if (res.code === 200) {
-          this.addShow = false
-          this.$message.success(res.msg)
-          this.$emit('reFiles')
-        } else {
-          this.$message.error(res.msg)
-        }
-      })
-    },
-    changePage(page) {
-      this.$emit('change', page)
-    }
-  }
-}
-</script>
-
-<style scoped></style>

+ 0 - 13
src/views/home/component/dispatch.vue

@@ -390,19 +390,6 @@ export default {
         })
       })
     },
-    openFile(row) {
-      const routeUrl = this.$router.resolve({
-        path: '/home/details',
-        query: {
-          id: this.projectId,
-          dispatchType: row.dispatchType,
-          type: 2,
-          year: this.year,
-          month: this.month
-        }
-      })
-      window.open(routeUrl.href, '_blank')
-    },
     fileDownload(res) {
       if (Object.hasOwn(res, 'fileFolder')) {
         window.open(res.fileFolder.url)

+ 0 - 505
src/views/home/component/files_list.vue

@@ -1,505 +0,0 @@
-<template>
-  <div class="full-width full-height mb-10">
-    <div class="flex flex-col">
-      <div class="flex flex-align-center padding border-bottom bold title-sp">
-        <span class="flex-05"></span>
-        <span style="flex: 1.5; text-align: left">文件/文件夹名称</span>
-        <span class="flex-1">更新(上传)时间</span>
-        <span class="flex-05">文件大小(数量)</span>
-        <!--        <span class="flex-05">是否同步</span>-->
-        <span class="flex-05">上传人</span>
-        <span class="flex-1">上传机构</span>
-        <span style="flex: 1.5">操作</span>
-      </div>
-      <el-empty v-if="files && files.length === 0" />
-      <div
-        v-for="item in files"
-        v-else
-        :key="item.id"
-        class="flex flex-center border-bottom padding content-sp"
-      >
-        <div v-if="item.type === 1" class="flex-05">
-          <img
-            v-if="item.suffix === 'docx'"
-            class="icon"
-            src="../../../assets/svg/folder/doc.svg"
-          />
-          <img
-            v-else-if="item.suffix === 'pdf'"
-            class="icon"
-            src="../../../assets/svg/folder/pdf.svg"
-          />
-          <img
-            v-else-if="item.suffix === 'xls'"
-            class="icon"
-            src="../../../assets/svg/folder/xls.svg"
-          />
-          <img v-else class="icon" src="../../../assets/svg/folder/other.svg" />
-        </div>
-        <div v-else class="flex-05 pointer" @click="View(item)">
-          <img
-            v-if="item.isAccess === 1"
-            src="../../../assets/svg/folder/see.svg"
-            class="icon-1"
-          />
-          <img
-            v-if="item.isAccess === 2"
-            src="../../../assets/svg/folder/edit.svg"
-            class="icon-1"
-          />
-          <img
-            v-if="item.isAccess === 3"
-            src="../../../assets/svg/folder/invisible.svg"
-            class="icon-1"
-          />
-        </div>
-        <span style="flex: 1.5; text-align: left">{{ item.title }}</span>
-        <span class="flex-1">{{ item.updateTime }}</span>
-        <span v-if="item.type === 1" class="flex-05">{{ item.size }}</span>
-        <span v-if="item.type === 2" class="flex-05"
-          >{{ item.fileAmount }}个</span
-        >
-        <span v-if="item.type === 1" class="flex-05">{{
-          item.createUserName
-        }}</span>
-        <span v-if="item.type === 2" class="flex-05">-</span>
-        <span v-if="item.type === 1" class="flex-1">{{
-          item.createDeptName
-        }}</span>
-        <span v-if="item.type === 2" class="flex-1">-</span>
-        <div class="flex flex-center" style="flex: 1.5">
-          <main-button
-            icon="View"
-            title="详情"
-            width="85"
-            @click="View(item)"
-          />
-          <main-button
-            v-if="item.type === 1 && item.isAccess === 2"
-            icon="Download"
-            title="下载"
-            width="85"
-            @click="downFile(item)"
-          />
-          <main-button
-            v-else-if="item.type === 2 && item.isAccess === 2"
-            icon="Upload"
-            title="上传文件"
-            width="85"
-            @click="upload(item)"
-          />
-          <main-button
-            v-else-if="item.type === 2 && item.isAccess === 3"
-            icon="Position"
-            title="授权申请"
-            width="85"
-            @click="folderApply(item)"
-          />
-          <main-button
-            v-if="
-              permission &&
-              permission.permissions.home_folder_del &&
-              item.isAccess === 2
-            "
-            icon="Delete"
-            title="删除"
-            width="85"
-            @click="removeFile(item)"
-          />
-        </div>
-      </div>
-    </div>
-    <!-------分页----->
-    <div
-      v-if="files && files.length !== 0"
-      class="mt-20 flex flex-center flex-justify-end"
-      style="margin-right: 50px"
-    >
-      <span class="mr-20">共{{ data.total }}条</span>
-      <el-pagination
-        :total="data.total"
-        background
-        layout="prev, pager, next"
-        @current-change="changePage"
-      />
-    </div>
-
-    <el-image-viewer
-      v-if="showImage"
-      :url-list="imgList"
-      @close="viewerClose"
-    />
-    <el-dialog v-model="show" append-to-body center title="附件上传(可批量)">
-      <div class="flex flex-col" style="margin-top: -20px">
-        <span class="bold main-color font-16 mb-10">{{ folderName }}</span>
-        <uploadFile
-          :data="{ type: 1, toStatus: 0 }"
-          :max="20"
-          @close="show = false"
-          accept=".doc,.docx,.pdf,.xls,.xlsx,.png,.jpg,.jpeg,.ppt,pptx"
-          @success="success"
-        />
-      </div>
-    </el-dialog>
-    <!--    申请授权-->
-    <el-dialog title="申请授权" v-model="applyShow" width="35%">
-      <div class="full-width flex flex-center flex-col">
-        <text class="full-width black text-left font-14 bold"
-          >确认向业主申请{{ currentFolder.folderName }}的管理权限?
-        </text>
-        <div class="full-width flex flex-align-center mt-20">
-          <span class="font-14 bold">授权时长</span>
-          <el-date-picker
-            v-model="applyTime"
-            class="ml-20"
-            end-placeholder="截止日期"
-            range-separator="至"
-            start-placeholder="开始日期"
-            type="daterange"
-            value-format="YYYY-MM-DD"
-          />
-        </div>
-        <el-divider />
-        <div class="full-width flex flex-center">
-          <el-button type="danger" plain @click="applyShow = false"
-            >取 消</el-button
-          >
-          <el-button type="primary" @click="submit">确 定</el-button>
-        </div>
-      </div>
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-import mainButton from '../../../components/main-button.vue'
-import { bytesToSize } from '@/utils/tools.js'
-import { useStore } from '@/store/user.js'
-import permissionStore from '@/store/permission.js'
-import uploadFile from '../../../components/upload-file.vue'
-
-export default {
-  name: 'files_list',
-  components: { mainButton, uploadFile },
-  props: {
-    data: Object
-  },
-  watch: {
-    data: {
-      handler(val) {
-        if (val === '' || val === null) {
-          return
-        }
-        this.files = val.records
-        this.files.map(e => {
-          if (e.volume === '') {
-            e.size = 0
-          }
-          e.size = bytesToSize(e.volume)
-          if (this.user.info.type === 3) {
-            // 业主可以任意删除操作
-            e.del = true
-          } else {
-            // 服务商上传的文件可以自行删除
-            if (e.createUser === this.user.info.bladeUserId) {
-              e.del = true
-            } else {
-              e.del = false
-            }
-          }
-          return e
-        })
-      },
-      immediate: true
-    }
-  },
-  setup() {
-    const user = useStore()
-    const permission = permissionStore()
-    return { user, permission }
-  },
-  data() {
-    return {
-      dispatchParams: null,
-      show: false,
-      applyShow: false,
-      files: [],
-      showImage: false,
-      imgList: [],
-      query: null,
-      fileList: [],
-      saveCount: 0,
-      libraryList: [],
-      fileFolderId: '',
-      sendParams: {
-        ids: '',
-        ownerId: '',
-        projectId: ''
-      },
-      currentFolder: null,
-      applyTime: [],
-      folderName: ''
-    }
-  },
-  created() {
-    this.query = this.$route.query
-    this.isHistory()
-  },
-  methods: {
-    isHistory() {
-      const data = { folderId: this.query.id, projectId: this.query.projectId }
-      const _this = this
-      this.$api.project.isHistory(data).then(res => {
-        if (res.code === 200) {
-          if (res.data) {
-            this.$confirm('系统检测到您有文件可以归档,是否进行归档?', {
-              confirmButtonText: '确定',
-              cancelButtonText: '取消',
-              type: 'warning'
-            }).then(res => {
-              if (res === 'confirm') {
-                _this.doHistory(data)
-              }
-            })
-          }
-        } else {
-          this.$message.error(res.msg)
-        }
-      })
-    },
-    doHistory(data) {
-      this.$api.project.doneHistory(data).then(res => {
-        if (res.code === 200) {
-          this.$message.success(res.msg)
-        } else {
-          this.$message.error(res.msg)
-        }
-      })
-    },
-    View(item) {
-      console.log(item)
-      if (item.type === 1) {
-        if (['png', 'jpg'].includes(item.suffix)) {
-          this.showImage = true
-          this.imgList.push(item.url)
-          return
-        }
-        const routeData = this.$router.resolve({
-          path: '/home/file_detail',
-          query: { id: item.fileId }
-        })
-        window.open(routeData.href, '_blank')
-      } else {
-        this.query.id = item.id
-        this.$router.push({
-          path: '/home/files',
-          query: {
-            id: item.id,
-            projectId: item.projectId,
-            projectStageId: item.stageId,
-            dictKey: item.dictKey,
-            parentId: item.id,
-            isAccess: item.isAccess,
-            ownerId: this.query.ownerId,
-            folderName: item.title,
-            folderNumber: item.fileAmount,
-            isHistory: false
-          }
-        })
-      }
-    },
-    upload(item) {
-      this.show = true
-      this.fileFolderId = item.id
-      this.folderName = item.title
-      this.currentFolder = item
-    },
-    success(res) {
-      this.fileList = res.fileList.map(res => {
-        const item = {}
-        item.title = res.response.data.originalFileName
-        item.suffix = res.response.data.suffix
-        item.volume = res.response.data.volume
-        item.fileId = res.response.data.id
-        item.url = res.response.data.filePath
-        item.projectId = this.currentFolder.projectId
-        item.stageId = this.currentFolder.stageId
-        item.parentId = this.currentFolder.id
-        item.type = 1
-        item.dictKey = this.$route.query.dictKey
-        return item
-      })
-      this.fileList.forEach(sub => {
-        this.saveCount++
-        if (
-          ['pdf', 'doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx'].includes(
-            sub.suffix
-          )
-        ) {
-          this.saveLibrary(sub)
-        }
-        if (this.saveCount === this.fileList.length) {
-          this.saveCount = 0
-          this.addFile()
-        }
-      })
-    },
-    saveLibrary(sub) {
-      const data = { category: 4, content: '' }
-      this.$api.common.submit(Object.assign(sub, data)).then(res => {
-        if (res.code === 200) {
-          this.saveCount++
-          this.libraryList.push(res.data.id)
-        } else {
-          this.$message.error(res.msg)
-        }
-      })
-    },
-    addFile() {
-      let data = { files: this.fileList }
-      if (this.query) {
-        data = Object.assign(data, this.query)
-      }
-      this.$api.project.fileAdd(data).then(res => {
-        if (res.code === 200) {
-          this.show = false
-          this.$emit('reFiles')
-          this.$message.success(res.msg)
-          if (this.user.info.type !== 3) {
-            this.$confirm('文件上传成功,是否给业主发送提醒消息?', {
-              confirmButtonText: '确定',
-              cancelButtonText: '取消',
-              type: 'warning'
-            }).then(() => {
-              this.SendMsg()
-            })
-          }
-        } else {
-          this.show = false
-          this.$message.error(res.msg)
-        }
-      })
-    },
-    SendMsg() {
-      this.sendParams.ids = this.fileList.map(e => e.fileId).join(',')
-      this.sendParams.projectId = this.$route.query.projectId
-      this.sendParams.ownerId = this.$route.query.ownerId
-      this.$api.project.send(this.sendParams).then(res => {
-        if (res.code === 200) {
-          this.$message.success('消息已经发送成功!')
-          this.$bus.emit('reFolder')
-          this.sendMsg = false
-        } else {
-          this.$message.error(res.msg)
-        }
-      })
-    },
-    downFile(item) {
-      window.open(item.url, '')
-    },
-    viewerClose() {
-      this.showImage = false
-      this.imgList = []
-    },
-    removeFile(item) {
-      if (item.type === 1) {
-        this.$confirm('确认是否删除所选文件/文件夹?', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-          this.$api.project.fileRemove({ ids: item.id }).then(res => {
-            if (res.code === 200) {
-              this.$bus.emit('delete')
-              this.$message.success(res.msg)
-            } else {
-              this.$message.error(res.msg)
-            }
-          })
-        })
-      } else if (item.type === 2) {
-        this.$confirm('确认是否删除所选文件/文件夹?', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-          this.$api.project.folderRemove({ ids: item.id }).then(res => {
-            if (res.code === 200) {
-              this.$message.success(res.msg)
-              this.$bus.emit('delete')
-            } else {
-              this.$message.error(res.msg)
-            }
-          })
-        })
-      }
-    },
-    folderApply(item) {
-      this.currentFolder = item
-      this.applyShow = true
-    },
-    submit() {
-      if (this.applyTime.length !== 2) {
-        this.$message.error('请选择授权时间')
-        return
-      }
-      console.log(this.currentFolder)
-      const tmp = {
-        projectId: this.$route.query.projectId,
-        ownerId: this.$route.query.ownerId
-      }
-      const item = {
-        startTime: this.applyTime[0],
-        endTime: this.applyTime[1],
-        folderId: this.currentFolder.id
-      }
-      const list = [item]
-      this.$api.project
-        .apply(Object.assign(tmp, { folders: list }))
-        .then(res => {
-          if (res.code === 200) {
-            this.applyShow = false
-            this.$confirm(res.data, {
-              confirmButtonText: '确定',
-              cancelButtonText: '取消',
-              type: 'warning'
-            })
-          } else {
-            this.$message.error(res.msg)
-          }
-        })
-    },
-    changePage(page) {
-      this.$emit('change', page)
-    }
-  }
-}
-</script>
-
-<style lang="scss" scoped>
-.title-sp {
-  color: #596a8a;
-}
-
-.content-sp {
-  color: #707070;
-}
-
-.flex-05 {
-  flex: 0.5;
-}
-
-.flex-1 {
-  flex: 1;
-}
-
-.icon {
-  width: 80px;
-  height: 66px;
-}
-
-.icon-1 {
-  width: 50px;
-  height: 46px;
-}
-</style>

+ 0 - 388
src/views/home/component/folder_info.vue

@@ -1,388 +0,0 @@
-<template>
-  <div class="flex flex-col white-bg">
-    <div class="flex flex-center ml-20 mb-20 mt-10">
-      <div class="flex flex-center" style="flex: 3">
-        <span class="grey-6 bold nowrap mr-10">文件搜索</span>
-        <el-select
-          v-model="keyWords"
-          remote
-          filterable
-          clearable
-          placeholder="输入关键字"
-          :remote-method="remoteMethod"
-          :loading="loading"
-          style="width: 100%"
-          @change="result"
-        >
-          <el-option
-            v-for="item in findData"
-            :key="item.value"
-            :label="item.label"
-            :value="item.value"
-          >
-          </el-option>
-        </el-select>
-      </div>
-    </div>
-    <div
-      style="
-        background-color: #e4e4e4;
-        height: 10px;
-        width: 100%;
-        margin-left: -10px;
-      "
-    />
-    <!------tab------>
-    <div class="flex flex-center mt-15">
-      <div class="flex flex-center" style="flex: 3.8">
-        <div
-          v-for="(item, index) in folderType"
-          :key="item.id"
-          class="flex flex-center tab"
-        >
-          <el-badge :value="item.fileAmount" :hidden="item.fileAmount === 0">
-            <div
-              :class="active === index ? 'tab-active' : ''"
-              @click="change(index, item.dictKey)"
-            >
-              {{ item.dictValue }}
-            </div>
-          </el-badge>
-        </div>
-      </div>
-      <div class="flex flex-center ml-10" style="flex: 1.2">
-        <base-button
-          v-if="canCreateFolder"
-          class="mr-10"
-          icon="User"
-          title="批量授权"
-          type="0"
-          @click="authorizeShow = true"
-        />
-        <base-button
-          v-if="canCreateFolder"
-          icon="Plus"
-          title="添加文件夹"
-          type="0"
-          @click="addShow = true"
-        />
-      </div>
-    </div>
-    <div class="mt-20">
-      <folder-list
-        :folder="folderList"
-        :total="total"
-        :project-id="id"
-        :owner-id="data.createUser"
-        :dict-key="dictKey"
-        @delFolder="getFolderList"
-        @change="changePage"
-      />
-    </div>
-    <!--    新增文件夹-->
-    <el-dialog v-model="addShow" append-to-body width="40%">
-      <div class="flex flex-col">
-        <el-form
-          ref="ruleFormRef"
-          :model="folderInfo"
-          class="demo-ruleForm"
-          label-width="120px"
-          status-icon
-        >
-          <el-form-item label="文件夹名称">
-            <el-input
-              v-model="folderInfo.title"
-              placeholder="填写文件夹名称"
-              style="width: 100%"
-            />
-          </el-form-item>
-          <el-form-item label="文件夹类型">
-            <el-select
-              v-model="dictKey"
-              clearable
-              placeholder="输入项目领域"
-              style="width: 100%"
-            >
-              <el-option
-                v-for="item in folderType"
-                :key="item.dictKey"
-                :label="item.dictValue"
-                :value="item.dictKey"
-              />
-            </el-select>
-          </el-form-item>
-        </el-form>
-        <div class="full-width flex flex-center mt-10">
-          <base-button icon="Lock" title="保存" type="1" @click="folderAdd" />
-        </div>
-      </div>
-    </el-dialog>
-    <el-image-viewer
-      v-if="showImage"
-      :url-list="imgList"
-      @close="viewerClose"
-    />
-    <!--    授权-->
-    <el-dialog v-model="authorizeShow" append-to-body width="40%">
-      <authorize
-        :list="folderList"
-        @close="authorizeShow = false"
-        :project-id="projectId"
-        :extra="{ type: 1 }"
-      />
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-import baseButton from '../../../components/base-button.vue'
-import folderList from './folder_list.vue'
-import permissionStore from '@/store/permission.js'
-import authorize from '@/views/home/component/authorize.vue'
-
-export default {
-  name: 'right2',
-  components: { baseButton, folderList, authorize },
-  props: {
-    data: {
-      type: Object,
-      default: null
-    },
-    projectStageId: String,
-    id: String
-  },
-  watch: {
-    projectStageId: {
-      handler(val) {
-        if (val) {
-          this.getDict()
-        }
-      },
-      immediate: true
-    },
-    authorizeShow: {
-      handler(val) {
-        console.log(val)
-      },
-      immediate: true
-    }
-  },
-  setup() {
-    const permissions = permissionStore()
-    return { permissions }
-  },
-  data() {
-    return {
-      projectId: '',
-      authorizeShow: false,
-      loading: false,
-      showImage: false,
-      imgList: [],
-      addShow: false,
-      folderInfo: {
-        title: '',
-        stageId: '',
-        projectId: '',
-        parentId: '',
-        dictKey: '',
-        folderType: 1
-      },
-      keyWords: '',
-      active: 0,
-      folderType: [],
-      folderList: [],
-      total: '',
-      dictKey: '',
-      page: {
-        current: 1,
-        size: 10
-      },
-      findData: [],
-      option: {
-        align: 'center',
-        menuAlign: 'center',
-        menuWidth: 380,
-        size: 'mini',
-        addBtn: false,
-        viewBtn: true,
-        editBtn: false,
-        refreshBtn: false,
-        columnBtn: false,
-        labelWidth: 140,
-        border: true,
-        column: [
-          {
-            label: '文件/文件夹名称',
-            prop: 'title'
-          },
-          {
-            label: '更新/上传时间',
-            prop: 'updateTime'
-          },
-          {
-            label: '文件',
-            prop: 'updateTime'
-          }
-        ]
-      },
-      canCreateFolder: false
-    }
-  },
-  created() {
-    this.projectId = this.$route.query.id
-    this.getFolderList()
-    this.queryCreateFolder()
-    this.$bus.on('reFolder', () => {
-      console.log('reFolder')
-      this.getFolderList()
-    })
-  },
-  methods: {
-    queryCreateFolder() {
-      this.$api.project
-        .queryCreateFolder({ projectId: this.projectId })
-        .then(res => {
-          if (res.code === 200) {
-            console.log(res)
-            this.canCreateFolder = res.data.status === 2
-          } else {
-            console.log(res)
-          }
-        })
-    },
-    getDict() {
-      this.$api.project
-        .folderType({
-          stageId: this.projectStageId,
-          projectId: this.$route.query.id
-        })
-        .then(res => {
-          if (res.code === 200) {
-            this.folderType = res.data
-            this.change(0, this.folderType[0].dictKey)
-          }
-        })
-    },
-    change(index, key) {
-      this.active = index
-      this.dictKey = key
-      this.getFolderList()
-    },
-    clear() {
-      this.keyWords = ''
-      this.getFolderList()
-    },
-    getFolderList() {
-      const data = {
-        stageId: this.projectStageId,
-        folderName: this.keyWords,
-        dictKey: this.dictKey
-      }
-      this.$api.project.folderList(Object.assign(data, this.page)).then(res => {
-        if (res.code === 200) {
-          this.folderList = res.data.records.map(sub => {
-            const item = sub
-            item.title = sub.title
-            return item
-          })
-          this.total = res.data.total
-        }
-      })
-    },
-    remoteMethod(query) {
-      if (query !== '') {
-        this.loading = true
-        setTimeout(() => {
-          const data = {
-            projectId: this.id,
-            keyword: query
-          }
-          this.$api.project
-            .findFiles(Object.assign(data, this.page))
-            .then(res => {
-              if (res.code === 200) {
-                this.findData = res.data.map(sub => {
-                  const dataItem = {}
-                  dataItem.label = sub.title
-                  if (['png', 'jpg', 'jpeg'].includes(sub.suffix)) {
-                    dataItem.value = sub.url
-                  } else {
-                    dataItem.value = sub.fileId
-                  }
-                  return dataItem
-                })
-              }
-              this.loading = false
-            })
-        }, 200)
-      } else {
-        this.findData = []
-      }
-    },
-    result(res) {
-      if (res.indexOf('http') > -1) {
-        this.showImage = true
-        this.imgList.push(res)
-      } else {
-        this.$router.push('/home/file_detail?id=' + res)
-      }
-    },
-    viewerClose() {
-      this.showImage = false
-      this.imgList = []
-    },
-    folderAdd() {
-      this.folderInfo.projectId = this.id
-      this.folderInfo.stageId = this.projectStageId
-      this.folderInfo.dictKey = this.dictKey
-      this.folderInfo.parentId = 0
-      this.$api.project.folderAdd(this.folderInfo).then(res => {
-        if (res.code === 200) {
-          this.addShow = false
-          this.folderInfo.title = ''
-          this.folderInfo.dictKey = 1
-          this.$message.success(res.msg)
-          this.getFolderList()
-        } else {
-          this.$message.error(res.msg)
-        }
-      })
-    },
-    changePage(page) {
-      console.log(page)
-      this.page.current = page
-      this.getFolderList()
-    }
-  }
-}
-</script>
-
-<style lang="scss" scoped>
-.tab {
-  width: 150px;
-  height: 38px;
-  background-color: #edf0f3;
-  padding: 2px 10px;
-  color: #707070;
-  font-size: 13px;
-}
-
-.tab:first-child {
-  border-radius: 20px 0 0 20px;
-}
-
-.tab:last-child {
-  border-radius: 0 20px 20px 0;
-}
-
-.tab-active {
-  width: 130px;
-  flex-wrap: nowrap;
-  color: white;
-  font-size: 15px;
-  background-color: #ab7630;
-  font-weight: 500;
-  padding: 4px 10px;
-  border-radius: 20px;
-}
-</style>

+ 0 - 538
src/views/home/component/folder_list.vue

@@ -1,538 +0,0 @@
-<template>
-  <div class="full-width full-height mb-10">
-    <div class="flex flex-col">
-      <div class="flex flex-align-center padding border-bottom bold title-sp">
-        <span class="flex-1"></span>
-        <span style="flex: 2; text-align: left">文件/文件夹名称</span>
-        <span style="flex: 1">更新(上传)时间</span>
-        <span style="flex: 1.5">文件数量</span>
-        <span style="flex: 3">操作</span>
-      </div>
-
-      <el-empty v-if="folder && folder.length === 0" description="暂无数据" />
-      <div
-        v-for="item in folder"
-        :key="item.id"
-        v-else
-        class="flex flex-center border-bottom padding content-sp"
-      >
-        <div class="flex-1 pointer" @click="fileView(item)">
-          <img
-            v-if="item.isAccess === 1"
-            class="icon"
-            src="../../../assets/svg/folder/see.svg"
-          />
-          <img
-            v-else-if="item.isAccess === 2"
-            class="icon"
-            src="../../../assets/svg/folder/edit.svg"
-          />
-          <img
-            v-else
-            class="icon"
-            src="../../../assets/svg/folder/invisible.svg"
-          />
-        </div>
-        <div class="flex" style="flex: 2; text-align: left">
-          <span>{{ item.title }}</span>
-          <el-icon
-            style="margin-top: 3px; margin-left: 2px"
-            @click="showUpdate(item)"
-          >
-            <Edit />
-          </el-icon>
-        </div>
-        <span style="flex: 1">{{ item.updateTime }}</span>
-        <span style="flex: 1.5">{{ item.fileAmount }}</span>
-        <div class="flex flex-center" style="flex: 3">
-          <main-button
-            v-if="item.isAccess !== 3"
-            icon="View"
-            title="详情"
-            width="85"
-            @click="fileView(item)"
-          />
-          <main-button
-            icon="Position"
-            title="任务下发"
-            width="85"
-            v-if="item.isAccess === 2"
-            @click="sendTask(item)"
-          />
-          <main-button
-            v-if="item.isAccess === 2"
-            icon="Upload"
-            title="上传文件"
-            width="85"
-            @click="uploadFiles(item)"
-          />
-          <main-button
-            v-if="[1, 3].includes(item.isAccess)"
-            icon="Position"
-            title="授权申请"
-            width="85"
-            @click="folderApply(item)"
-          />
-          <main-button
-            v-if="
-              item.isAccess === 2 && item.createUser === user.info.bladeUserId
-            "
-            icon="Delete"
-            title="删除"
-            width="85"
-            @click="folderRemove(item)"
-          />
-        </div>
-      </div>
-    </div>
-    <!-------分页----->
-    <div
-      v-if="folder && folder.length !== 0"
-      class="mt-20 flex flex-center flex-justify-end"
-      style="margin-right: 50px"
-    >
-      <span class="mr-20">共{{ total }}条</span>
-      <el-pagination
-        :total="total"
-        background
-        layout="prev, pager, next"
-        @current-change="changePage"
-      />
-    </div>
-    <el-dialog v-model="show" append-to-body center title="附件上传(可批量)">
-      <div class="flex flex-col" style="margin-top: -20px">
-        <span class="main-color bold font-16 mb-10">{{ folderName }}</span>
-        <uploadFile
-          :data="{ type: 1, toStatus: 0 }"
-          :max="20"
-          @close="show = false"
-          accept=".doc,.docx,.pdf,.xls,.xlsx,.png,.jpg,.jpeg,.ppt,pptx"
-          @success="success"
-        />
-      </div>
-    </el-dialog>
-    <!--    授权操作-->
-    <el-dialog
-      v-model="authorizeShow"
-      :show-close="false"
-      append-to-body
-      center
-      class="custom-dialog"
-    >
-      <template #header="{ close, titleId, titleClass }">
-        <div class="flex flex-justify-between">
-          <h4 :id="titleId" :class="titleClass">{{ currentRow.folderName }}</h4>
-          <el-button text type="danger" @click="close">
-            <el-icon class="el-icon--left">
-              <CircleCloseFilled />
-            </el-icon>
-          </el-button>
-        </div>
-      </template>
-      <authorize
-        :list="fileData.records"
-        :folder-id="currentRow.id"
-        :project-id="projectId"
-        :extra="{ type: 1 }"
-        @close="authorizeShow = false"
-      />
-    </el-dialog>
-    <el-dialog v-model="sendMsg" top="20%" width="400px">
-      <div class="flex flex-col flex-center">
-        <span class="font-15">是否给业主发送提醒消息?</span>
-        <div class="flex flex-center mt-20">
-          <el-button class="mr-15" @click="sendMsg = false">取消</el-button>
-          <el-button type="primary" @click="SendMsg">发送</el-button>
-        </div>
-      </div>
-    </el-dialog>
-    <!--    申请授权-->
-    <el-dialog title="申请授权" v-model="applyShow" width="35%">
-      <div class="full-width flex flex-center flex-col">
-        <text class="full-width black text-left font-14 bold"
-          >确认向业主申请{{ currentFolder.folderName }}的管理权限?
-        </text>
-        <div class="full-width flex flex-align-center mt-20">
-          <span class="font-14 bold">授权时长</span>
-          <el-date-picker
-            v-model="applyTime"
-            class="ml-20"
-            end-placeholder="截止日期"
-            range-separator="至"
-            start-placeholder="开始日期"
-            type="daterange"
-            value-format="YYYY-MM-DD"
-          />
-        </div>
-        <el-divider />
-        <div class="full-width flex flex-center">
-          <el-button type="danger" plain @click="applyShow = false"
-            >取 消</el-button
-          >
-          <el-button type="primary" @click="submit">确 定</el-button>
-        </div>
-      </div>
-    </el-dialog>
-    <el-dialog v-model="updateShow" append-to-body width="40%">
-      <div class="flex flex-col">
-        <div class="main-color bold font-15 text-center">
-          <span>请谨慎修改文件夹名称!</span>
-        </div>
-        <div class="flex flex-col mt-20">
-          <el-form
-            ref="ruleFormRef"
-            :model="folderInfo"
-            class="demo-ruleForm"
-            label-width="120px"
-            status-icon
-          >
-            <el-form-item label="新文件夹名称">
-              <el-input
-                v-model="folderInfo.title"
-                placeholder="填写修改的文件夹名称"
-                style="width: 100%"
-              />
-            </el-form-item>
-          </el-form>
-        </div>
-        <div class="full-width flex flex-center mt-10">
-          <base-button
-            icon="Close"
-            title="取消"
-            type="0"
-            @click="updateShow = false"
-          />
-          <base-button
-            icon="Check"
-            title="保存"
-            type="1"
-            @click="folderUpdate"
-          />
-        </div>
-      </div>
-    </el-dialog>
-    <!--    任务下发-->
-    <el-dialog v-model="taskShow" append-to-body title="任务下发">
-      <task
-        :project-id="projectId"
-        :folders="currentFolders"
-        @close="closeTask"
-      ></task>
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-import mainButton from '../../../components/main-button.vue'
-import uploadFile from '../../../components/upload-file.vue'
-import authorize from '@/views/home/component/authorize.vue'
-import permissionStore from '@/store/permission.js'
-import { useStore } from '@/store/user.js'
-import baseButton from '@/components/base-button.vue'
-import task from './task.vue'
-
-export default {
-  name: 'file_list',
-  components: { mainButton, uploadFile, authorize, baseButton, task },
-  setup() {
-    const permissions = permissionStore()
-    const user = useStore()
-    return { permissions, user }
-  },
-  props: {
-    dictKey: String,
-    folder: Array,
-    total: String,
-    projectId: String,
-    ownerId: String,
-    type: {
-      type: Number,
-      default: 0
-    }
-  },
-  data() {
-    return {
-      dispatchParams: null,
-      taskShow: false,
-      show: false,
-      updateShow: false,
-      sendMsg: false,
-      authorizeShow: false,
-      currentRow: null,
-      libraryList: [],
-      saveCount: 0,
-      fileList: [],
-      check: '2',
-      fileData: null,
-      authorizeDate: [],
-      qrCodeShow: false,
-      logoSrc: new URL('../../../assets/img/logo.png', import.meta.url).href,
-      qrCodeText: '',
-      startTime: '',
-      endTime: '',
-      sendParams: {
-        ids: '',
-        ownerId: '',
-        projectId: ''
-      },
-      applyShow: false,
-      currentFolder: null,
-      applyTime: [],
-      folderInfo: {
-        id: '',
-        title: ''
-      },
-      folderName: '',
-      currentFolders: []
-    }
-  },
-  created() {
-    const dispatchType = this.$route.query.dispatchType
-    if (dispatchType) {
-      this.dispatchParams = {
-        preId: this.$route.query.pid,
-        projectId: this.$route.query.id,
-        ...this.$route.query
-      }
-    }
-  },
-  methods: {
-    sendTask(item) {
-      const index = this.currentFolders.findIndex(sub => sub.id === item.id)
-      if (index === -1) {
-        this.currentFolders.push(item)
-      }
-      this.taskShow = true
-    },
-    fileView(item) {
-      if (this.type === 0) {
-        const data = {
-          id: item.id,
-          projectId: item.projectId,
-          ownerId: this.ownerId,
-          dictKey: item.dictKey,
-          projectStageId: item.stageId,
-          isAccess: item.isAccess,
-          folderName: item.title,
-          folderNumber: item.fileAmount
-        }
-        let dispatchQuery = {}
-        if (this.dispatchParams) {
-          dispatchQuery = this.dispatchParams
-          console.log(this.dispatchParams)
-          delete dispatchQuery.id
-        }
-        this.$router.push({
-          path: '/home/files',
-          query: Object.assign(data, dispatchQuery)
-        })
-      } else {
-        this.$router.push({
-          path: '/home/his_files',
-          query: { id: item.id }
-        })
-      }
-    },
-    uploadFiles(item) {
-      this.currentRow = item
-      this.folderName = item.folderName
-      this.show = true
-    },
-    folderRemove(item) {
-      this.$confirm('确认是否删除所选文件/文件夹?', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-        this.$api.project.folderRemove({ ids: item.id }).then(res => {
-          if (res.code === 200) {
-            this.$message.success(res.msg)
-            this.$emit('delFolder')
-          } else {
-            this.$message.error(res.msg)
-          }
-        })
-      })
-    },
-    folderApply(item) {
-      this.currentFolder = item
-      this.applyShow = true
-    },
-    success(res) {
-      this.fileList = res.fileList.map(res => {
-        const item = {}
-        item.title = res.response.data.originalFileName
-        item.suffix = res.response.data.suffix
-        item.volume = res.response.data.volume
-        item.fileId = res.response.data.id
-        item.url = res.response.data.filePath
-        item.parentId = this.currentRow.id
-        item.projectId = this.currentRow.projectId
-        item.stageId = this.currentRow.stageId
-        item.type = 1
-        item.dictKey = this.currentRow.dictKey
-        return item
-      })
-      this.fileList.forEach(sub => {
-        this.saveCount++
-        if (
-          ['pdf', 'doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx'].includes(
-            sub.suffix
-          )
-        ) {
-          this.saveLibrary(sub)
-        }
-        if (this.saveCount === this.fileList.length) {
-          this.saveCount = 0
-          this.addFile()
-        }
-      })
-    },
-    saveLibrary(sub) {
-      const data = { category: 4, content: '' }
-      this.$api.common.submit(Object.assign(sub, data)).then(res => {
-        if (res.code === 200) {
-          this.libraryList.push(res.data.id)
-        } else {
-          this.$message.error(res.msg)
-        }
-      })
-    },
-    addFile() {
-      let data = { files: this.fileList }
-      if (this.dispatchParams) {
-        data = Object.assign(data, this.dispatchParams)
-      }
-      this.$api.project.fileAdd(data).then(res => {
-        if (res.code === 200) {
-          this.show = false
-          this.$bus.emit('reFolder')
-          this.$message.success(res.msg)
-          if (this.user.info.type !== 3) {
-            this.$confirm('文件上传成功,是否给业主发送提醒消息?', {
-              confirmButtonText: '确定',
-              cancelButtonText: '取消',
-              type: 'warning'
-            }).then(() => {
-              this.SendMsg()
-            })
-          }
-        } else {
-          this.show = false
-          this.$message.error(res.msg)
-        }
-      })
-    },
-    SendMsg() {
-      this.sendParams.ids = this.fileList.map(e => e.fileId).join(',')
-      this.sendParams.projectId = this.$route.query.id
-      this.sendParams.ownerId = this.$route.query.ownerId
-      this.$api.project.send(this.sendParams).then(res => {
-        if (res.code === 200) {
-          this.$message.success('消息已经发送成功!')
-          this.$bus.emit('reFolder')
-          this.sendMsg = false
-        } else {
-          this.$message.error(res.msg)
-        }
-      })
-    },
-    getFileList(item) {
-      this.currentRow = item
-      this.$api.project.fileList({ folderId: item.id }).then(res => {
-        if (res.code === 200) {
-          this.authorizeShow = true
-          this.fileData = res.data
-          this.fileData.records = this.fileData.records.map(sub => {
-            const item = sub
-            sub.check = this.check
-            return item
-          })
-        } else {
-          this.$message.error(res.msg)
-        }
-      })
-    },
-
-    change(res) {
-      this.fileData[res.index] = res
-    },
-    submit() {
-      if (this.applyTime.length !== 2) {
-        this.$message.error('请选择授权时间')
-        return
-      }
-      const tmp = { projectId: this.projectId, ownerId: this.ownerId }
-      const item = {
-        startTime: this.applyTime[0],
-        endTime: this.applyTime[1],
-        folderId: this.currentFolder.id
-      }
-      const list = [item]
-      this.$api.project
-        .apply(Object.assign(tmp, { folders: list }))
-        .then(res => {
-          if (res.code === 200) {
-            this.applyShow = false
-            this.$confirm(res.data, {
-              confirmButtonText: '确定',
-              cancelButtonText: '取消',
-              type: 'warning'
-            })
-          } else {
-            this.$message.error(res.msg)
-          }
-        })
-    },
-    showUpdate(item) {
-      this.updateShow = true
-      this.folderInfo = item
-    },
-    folderUpdate() {
-      this.$api.project.folderUpdate(this.folderInfo).then(res => {
-        if (res.code === 200) {
-          this.updateShow = false
-          this.$message.success('文件名修改成功!')
-          this.$emit('delFolder')
-        } else {
-          this.updateShow = false
-          this.$message.error(res.msg)
-        }
-      })
-    },
-    changePage(res) {
-      this.$emit('change', res)
-    },
-    closeTask() {
-      this.taskShow = false
-      this.currentFolders = []
-    }
-  }
-}
-</script>
-
-<style lang="scss" scoped>
-.title-sp {
-  color: #596a8a;
-}
-
-.content-sp {
-  color: #707070;
-}
-
-.flex-1 {
-  flex: 0.5;
-}
-
-.icon {
-  flex: 0.5;
-  width: 43px;
-  height: 45px;
-}
-
-.custom-dialog {
-  :deep(.el-dialog) {
-    --el-dialog-padding-primary: 0;
-  }
-}
-</style>

+ 0 - 223
src/views/home/component/grant_record.vue

@@ -1,223 +0,0 @@
-<template>
-  <div class="flex flex-col full-width full-height white-bg">
-    <div class="white-bg flex flex-col padding">
-      <div class="flex flex-align-center mb-10 tip">
-        <el-icon class="ml-20" color="#BC002D">
-          <WarningFilled/>
-        </el-icon>
-        <span class="ml-5">共授权过<span
-            class="main-color font-15 mr-5 ml-5 bold">{{ total }}</span>个文件夹</span>
-      </div>
-    </div>
-    <avue-crud ref="crud"
-               v-model="form"
-               :page="page"
-               :before-open="beforeOpen"
-               :data="data"
-               :option="option"
-               :table-loading="loading"
-               class="curd"
-               @current-change="currentChange"
-               @size-change="sizeChange"
-               @refresh-change="refreshChange"
-               @on-load="onLoad">
-      <template
-          v-slot:isExpired="{row}">
-        <el-tag :type="row.isExpired ? 'danger':''">{{ row.isExpired ? '过期' : '有效' }}</el-tag>
-      </template>
-      <template v-slot:menu="{row}">
-        <el-button icon="Operation" text @click="apply(row)">{{
-            row.isExpired ? '重新申请' : '申请延期'
-          }}
-        </el-button>
-      </template>
-    </avue-crud>
-    <el-dialog title='申请授权' v-model='applyShow' width='35%'>
-      <div class='full-width flex flex-center flex-col'>
-        <text class='full-width black text-left bold'>确认向业主申请 <span class="main-color bold font-15">{{
-            folderName
-          }}</span> 的管理权限?
-        </text>
-        <div class='full-width flex flex-align-center mt-20'>
-          <span class='font-14 bold'>授权时长</span>
-          <el-date-picker
-              v-model="applyTime"
-              class='ml-20'
-              end-placeholder="截止日期"
-              range-separator="至"
-              start-placeholder="开始日期"
-              type="daterange"
-              value-format='YYYY-MM-DD'
-          />
-        </div>
-        <el-divider/>
-        <div class='full-width flex flex-center'>
-          <el-button type='danger' plain @click="applyShow = false">取 消</el-button>
-          <el-button type='primary' @click='submit'>确 定</el-button>
-        </div>
-      </div>
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-
-export default {
-  data () {
-    return {
-      applyShow: false,
-      applyTime: [],
-      currentFolder: null,
-      folderName: '',
-      loading: false,
-      data: [],
-      form: {},
-      option: {
-        calcHeight: 230,
-        refreshBtn: false,
-        tip: false,
-        columnBtn: false,
-        searchShow: true,
-        editBtn: false,
-        addBtn: false,
-        delBtn: false,
-        border: true,
-        index: true,
-        align: 'center',
-        viewBtn: false,
-        dialogClickModal: false,
-        column: [
-          {
-            label: '授权文件夹',
-            prop: 'folderName',
-            addDisplay: false,
-            editDisplay: false
-          },
-          {
-            label: '授权人员',
-            prop: 'ownerUserName'
-          },
-          {
-            label: '授权机构',
-            prop: 'ownerDeptName',
-            type: 'select'
-          },
-          {
-            label: '接受人员',
-            prop: 'providerUserName'
-          },
-          {
-            label: '接受机构',
-            prop: 'providerDeptName'
-          },
-          {
-            label: '授权状态',
-            prop: 'isExpired'
-          },
-          {
-            label: '授权到期时间',
-            prop: 'endTime'
-          }]
-      },
-      page: {
-        size: 10,
-        current: 1,
-        total: 0
-      },
-      total: ''
-    }
-  },
-  computed: {
-    // permissionList () {
-    //   return {
-    //     delBtn: vaildData(this.permissions.permissions.home_del, false)
-    //   }
-    // }
-  },
-  methods: {
-    onLoad (query = {}) {
-      this.loading = true
-      const data = { ...query, ...this.page }
-      this.$api.project.sqRecord(data).then(res => {
-        this.loading = false
-        if (res.code === 200) {
-          this.data = res.data.records
-          this.total = res.data.total
-          this.page.total = this.total
-          this.loading = false
-        }
-      })
-    },
-    beforeOpen (done, type) {
-      if (['view'].includes(type)) {
-        this.$router.push({
-          path: '/home/details',
-          query: { id: this.form.id, type: '0', ownerId: this.form.createUser }
-        })
-      } else if (type === 'edit') {
-        this.$alert('功能建设中,尽情期待...', '消息提醒', {
-          confirmButtonText: 'OK'
-        })
-        // this.$router.push({
-        //   path: '/home/details',
-        //   query: { id: this.form.id, type: '1' }
-        // })
-      }
-    },
-    currentChange (currentPage) {
-      this.page.currentPage = currentPage
-      // this.refreshChange()
-    },
-    sizeChange (pageSize) {
-      this.page.pageSize = pageSize
-      // this.refreshChange()
-    },
-    refreshChange () {
-      this.onLoad(this.query)
-    },
-    apply (row) {
-      this.currentFolder = row.fileFolderId
-      this.folderName = row.folderName
-      this.applyShow = true
-    },
-    submit () {
-      if (this.applyTime.length !== 2) {
-        this.$message.error('请选择授权时间')
-        return
-      }
-      const tmp = { projectId: this.$route.query.id, ownerId: this.$route.query.ownerId }
-      const item = { startTime: this.applyTime[0], endTime: this.applyTime[1], folderId: this.currentFolder }
-      const list = [item]
-      this.$api.project.apply(Object.assign(tmp, { folders: list })).then(res => {
-        if (res.code === 200) {
-          this.applyShow = false
-          this.$confirm(res.data, {
-            confirmButtonText: '确定',
-            cancelButtonText: '取消',
-            type: 'warning'
-          })
-        } else {
-          this.$message.error(res.msg)
-        }
-      })
-    }
-  }
-}
-</script>
-
-<style lang="scss" scoped>
-.tip {
-  width: 260px;
-  height: 38px;
-  background-color: #FBF6ED;
-  font-weight: 500;
-  flex-wrap: nowrap;
-  margin-left: 20px;
-}
-
-.curd {
-  :deep(.avue-crud__menu) {
-    min-height: 5px;
-  }
-}
-</style>

+ 0 - 149
src/views/home/component/historical.vue

@@ -1,149 +0,0 @@
-<template>
-  <div class="flex flex-col padding">
-    <div class="flex flex-center mt-20">
-      <div class="bold font-16 grey flex-child-average text-left" style="margin-left: 50px">
-        <span>历史数据({{ total }})</span>
-      </div>
-      <!--      <div class="flex flex-center flex-child-average flex-justify-end" style="margin-right: 50px">-->
-      <!--        <base-button v-if="permissions.permissions.floder_detail_add" icon="Plus" title="添加文件夹"-->
-      <!--                     class="mr-5"-->
-      <!--                     type="0" @click="addShow = true"/>-->
-      <!--        <base-button icon="Upload" @click="show = true" title="上传文件"/>-->
-      <!--      </div>-->
-    </div>
-    <folder_list :folder="folderList" :total="total" :type="1" class="mt-20"/>
-    <el-dialog v-model="show"
-               append-to-body
-               center
-               title="附件上传(可批量)">
-      <uploadFile :data='{type:1,toStatus:0}' :max='20'
-                  @close='show = false'
-                  accept='.doc,.docx,.pdf,.xls,.xlsx,.png,.jpg,.jpeg,.ppt,pptx'
-                  @success='success'/>
-    </el-dialog>
-    <el-dialog v-model='addShow' append-to-body width='40%'>
-      <div class="flex flex-col">
-        <el-form ref="ruleFormRef"
-                 :model="folderInfo"
-                 class="demo-ruleForm"
-                 label-width="120px"
-                 status-icon>
-          <el-form-item label="文件夹名称">
-            <el-input
-                v-model="folderInfo.title"
-                placeholder="填写文件夹名称"
-                style="width: 100%"
-            />
-          </el-form-item>
-        </el-form>
-        <div class="full-width flex flex-center mt-10">
-          <base-button icon="Lock" title="保存" type="1" @click="folderAdd"/>
-        </div>
-      </div>
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-import folder_list from './folder_list.vue'
-import permissionStore from '@/store/permission.js'
-import { useStore } from '@/store/user.js'
-import baseButton from '@/components/base-button.vue'
-import uploadFile from '../../../components/upload-file.vue'
-
-export default {
-  name: 'historical',
-  components: { folder_list, baseButton, uploadFile },
-  props: {
-    folderList: Array,
-    total: String
-  },
-  data () {
-    return {
-      show: false,
-      addShow: false,
-      folderInfo: {
-        title: '',
-        projectStageId: '',
-        projectId: '',
-        parentId: '',
-        dictKey: ''
-      },
-      fileList: [],
-      saveCount: 0,
-      libraryList: []
-    }
-  },
-  setup () {
-    const permissions = permissionStore()
-    const user = useStore()
-    return { permissions, user }
-  },
-  methods: {
-    success (res) {
-      this.fileList = res.fileList.map(res => {
-        const item = {}
-        item.title = res.response.data.originalFileName
-        item.suffix = res.response.data.suffix
-        item.volume = res.response.data.volume
-        item.fileId = res.response.data.id
-        item.url = res.response.data.filePath
-        item.fileFolderId = this.id
-        item.dictKey = this.$route.query.dictKey
-        item.projectId = this.$route.query.projectId
-        return item
-      })
-      this.fileList.forEach(sub => {
-        this.saveCount++
-        if (['pdf', 'doc'].includes(sub.suffix)) {
-          this.saveLibrary(sub)
-        }
-        if (this.saveCount === this.fileList.length) {
-          this.saveCount = 0
-          this.addFile()
-        }
-      })
-    },
-    saveLibrary (sub) {
-      const data = { category: 4, content: '' }
-      this.$api.common.submit(Object.assign(sub, data)).then(res => {
-        if (res.code === 200) {
-          this.saveCount++
-          this.libraryList.push(res.data.id)
-        } else {
-          this.$message.error(res.msg)
-        }
-      })
-    },
-    addFile () {
-      this.$api.project.fileAdd(this.fileList).then(res => {
-        if (res.code === 200) {
-          this.show = false
-          this.$emit('reFiles')
-          this.$message.success(res.msg)
-        } else {
-          this.show = false
-          this.$message.error(res.msg)
-        }
-      })
-    },
-    folderAdd () {
-      this.folderInfo.projectId = this.projectId
-      this.folderInfo.parentId = this.id
-      this.$api.project.folderAdd(this.folderInfo).then(res => {
-        if (res.code === 200) {
-          this.addShow = false
-          this.$message.success(res.msg)
-          this.$emit('reFiles')
-        } else {
-          this.$message.error(res.msg)
-        }
-      })
-    }
-  }
-}
-</script>
-
-<style scoped>
-
-</style>

+ 0 - 17
src/views/home/component/params/params4.vue

@@ -259,8 +259,6 @@ export default {
     beforeOpen(done, type) {
       if (type === 'view') {
         this.previewFile(this.form)
-      } else if (type === 'edit') {
-        this.openFile(this.form)
       } else {
         done()
       }
@@ -299,21 +297,6 @@ export default {
         this.showImage = true
       }
     },
-    /**
-     * 打开上传文件夹?
-     * @param row
-     */
-    openFile(row) {
-      const routeUrl = this.$router.resolve({
-        path: '/home/details',
-        query: {
-          id: this.newDetail.id,
-          dispatchType: row.dispatchType,
-          type: 3
-        }
-      })
-      window.open(routeUrl.href, '_blank')
-    },
     initFileList(list) {
       this.data.length = 0
       this.data = defaultData

+ 1 - 2
src/views/home/details.vue

@@ -43,11 +43,10 @@ meta: { layout: 'empty', keepAlive:true }
 import leftBar from './component/left_bar.vue'
 import proinfo from './component/proinfo.vue'
 import resource from '@/views/resource/index.vue'
-import grantRecord from '@/views/home/component/grant_record.vue'
 
 export default {
   name: '资料管理',
-  components: { leftBar, proinfo, grantRecord, resource },
+  components: { leftBar, proinfo, resource },
   watch: {
     stage: {
       handler(newValue) {

+ 0 - 88
src/views/home/files.vue

@@ -1,88 +0,0 @@
-<template>
-  <div class="flex flex-col full-height mt-20 wrapper">
-    <div class="full-height white-bg">
-      <current
-        :id="id"
-        :data="fileData"
-        :total="total"
-        @reFiles="getFileList"
-        @change="changePage"
-      />
-    </div>
-    <div class="full-height full-width white-bg mt-10">
-      <historical :folderList="historyFolder" :total="total" />
-    </div>
-  </div>
-</template>
-
-<route>
-{
-name:'项目文件',
-meta :{ layout: 'empty' }
-}
-</route>
-
-<script>
-import current from './component/current.vue'
-import historical from './component/historical.vue'
-
-export default {
-  name: 'files',
-  components: { current, historical },
-  data() {
-    return {
-      id: '',
-      fileData: '',
-      historyFolder: [],
-      total: '',
-      page: {
-        current: 1,
-        size: 10
-      }
-    }
-  },
-  created() {
-    this.id = this.$route.query.id
-    this.getFileList()
-    this.getFolderAll()
-    this.$bus.on('delete', () => {
-      this.getFileList()
-    })
-    this.$bus.on('reFolder', () => {
-      console.log('reFolder')
-      this.getFolderAll()
-    })
-  },
-  methods: {
-    getFileList() {
-      const data = { id: this.id, isHistory: 0 }
-      this.$api.project.fileList(Object.assign(data, this.page)).then(res => {
-        if (res.code === 200) {
-          this.fileData = res.data
-        } else {
-          this.$message.error(res.msg)
-        }
-      })
-    },
-    getFolderAll() {
-      // fixme
-      this.$api.project.fileList({ isHistory: 1, id: this.id }).then(res => {
-        if (res.code === 200) {
-          this.historyFolder = res.data.records.map(e => {
-            e.folderName = e.title
-            e.fileNumber = e.childrenNumber
-            return e
-          })
-          this.total = res.data.total
-        }
-      })
-    },
-    changePage(page) {
-      this.page.current = page
-      this.getFileList()
-    }
-  }
-}
-</script>
-
-<style scoped></style>

+ 0 - 166
src/views/home/his_files.vue

@@ -1,166 +0,0 @@
-<template>
-  <div class="full-width full-height white-bg mb-10">
-    <div class="flex flex-col">
-      <div class="flex flex-align-center padding border-bottom bold title-sp">
-        <span class="flex-1"></span>
-        <span style="flex: 2">文件/文件夹名称</span>
-        <span style="flex: 1">更新(上传)时间</span>
-        <span class="flex-1">文件大小</span>
-<!--        <span class="flex-1">是否同步</span>-->
-        <span class="flex-1">上传人</span>
-        <span style="flex: 3">操作</span>
-      </div>
-      <el-empty v-if="fileData && fileData.length === 0"/>
-      <div v-for="item in fileData" :key='item.id' class="flex flex-center  border-bottom padding content-sp">
-        <div class="flex-1" v-if='item.type === 1 '>
-          <img v-if="item.suffix === 'docx'" class="icon" src="../../assets/svg/folder/doc.svg">
-          <img v-else-if="item.suffix === 'pdf'" class="icon" src="../../assets/svg/folder/pdf.svg">
-          <img v-else-if="item.suffix === 'xlsx'" class="icon" src="../../assets/svg/folder/xls.svg">
-          <img v-else class="icon" src="../../assets/svg/folder/other.svg">
-        </div>
-        <div class="flex-1" v-if='item.type ===  2 '>
-          <img v-if="item.isAccess === 1" class="icon" src="../../assets/svg/folder/see.svg">
-          <img v-else-if="item.isAccess === 2" class="icon" src="../../assets/svg/folder/edit.svg">
-          <img v-else class="icon" src="../../assets/svg/folder/invisible.svg">
-        </div>
-        <span style="flex: 2">{{ item.title }}</span>
-        <span style="flex: 1">{{ item.updateTime }}</span>
-        <span class="flex-1" >{{ item.type !== 2 ? item.size: '-' }}</span>
-<!--        <span class="flex-1">{{ item.status }}</span>-->
-        <span class="flex-1">{{ item.createUserName }}</span>
-        <div class="flex flex-center" style="flex: 3">
-          <main-button icon="View" title="详情" width="85" @click="fileView(item)"/>
-          <main-button icon="Download" v-if='item.type !== 2' title="下载" width="85" @click="downFile(item)"/>
-<!--          <main-button icon="UploadFilled" title="同步" width="85"/>-->
-          <main-button icon="Delete" title="删除" v-if='item.isAccess === 2' width="85" @click="removeFile(item)"/>
-        </div>
-      </div>
-    </div>
-    <!-------分页----->
-    <div v-if="fileData && fileData.length !== 0" class="mt-20 flex flex-center flex-justify-end"
-         style="margin-right: 50px;padding-bottom: 20px">
-      <span class="mr-20">共{{ fileData.total }}条</span>
-      <el-pagination :total="fileData.total" background layout="prev, pager, next"/>
-    </div>
-    <el-image-viewer
-        v-if='showImage'
-        :url-list="imgList"
-        @close='showImage = false'
-    />
-  </div>
-</template>
-
-<route>
-{
-name: '历史文件',
-}
-</route>
-
-<script>
-import mainButton from '../../components/main-button.vue'
-import { bytesToSize } from '../../utils/tools.js'
-import api from '@/api/index.js'
-
-export default {
-  name: 'his_files',
-  components: { mainButton },
-  data () {
-    return {
-      showImage: false,
-      imgList: [],
-      id: '',
-      fileData: []
-    }
-  },
-  created () {
-    this.id = this.$route.query.id
-    this.getFileList()
-  },
-  methods: {
-    getFileList () {
-      this.$api.project.fileList({ id: this.id, isHistory: 1 }).then(res => {
-        if (res.code === 200) {
-          this.fileData = res.data.records.map(e => {
-            e.size = bytesToSize(e.volume)
-            return e
-          })
-        } else {
-          this.$message.error(res.msg)
-        }
-      })
-    },
-    fileView (item) {
-      if (item.type === 2) {
-        // 文件夹
-        this.$api.project.fileList({ id: item.id, isHistory: 1 }).then(res => {
-          if (res.code === 200) {
-            this.fileData = res.data.records.map(e => {
-              e.size = bytesToSize(e.volume)
-              return e
-            })
-          } else {
-            this.$message.error(res.msg)
-          }
-        })
-      } else {
-        if (api.offices.includes(item.suffix)) {
-          const routeData = this.$router.resolve({ path: '/home/file_detail', query: { id: item.fileId } })
-          window.open(routeData.href, '_blank')
-        } else {
-          this.imgList = [item.url]
-          this.showImage = true
-        }
-      }
-    },
-    downFile (item) {
-      window.open('/api/wutong-file/minio/file/downFile/' + item.dowloadFileId, '')
-    },
-    removeFile (item) {
-      if (item.hasChildren || item.fileAmount > 0) {
-        this.$confirm('该文件夹不为空,请先删除子文件', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        })
-        return
-      }
-      this.$confirm('确认是否删除该文件?', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      })
-        .then(() => {
-          this.$api.project.fileRemove({ ids: item.id }).then(res => {
-            if (res.code === 200) {
-              this.$message.success(res.msg)
-              this.getFileList()
-            } else {
-              this.$message.error(res.msg)
-            }
-          })
-        }
-        )
-    }
-  }
-}
-</script>
-
-<style lang="scss" scoped>
-.title-sp {
-  color: #596A8A;
-  height: 55px;
-}
-
-.content-sp {
-  color: #707070;
-}
-
-.flex-1 {
-  flex: 0.5;
-}
-
-.icon {
-  width: 43px;
-  height: 45px;
-}
-</style>

+ 0 - 104
src/views/home/track.vue

@@ -1,104 +0,0 @@
-<template>
-  <div class='flex flex-justify-start full-height'>
-    <div class="full-height">
-      <left-bar/>
-    </div>
-    <div class="flex flex-col full-height full-width" style="margin-left: 300px">
-      <div class="white-bg padding-left padding-top flex flex-col">
-        <div class="flex flex-center full-width">
-          <!------tab------>
-          <div class="flex flex-center mt-15 full-width mb-20">
-            <div class="flex flex-center" style="flex: 3">
-              <div v-for="(item,index) in tab" :key="item.id" class="flex flex-center tab">
-                <div :class="active === index ? 'tab-active' : ''"
-                     @click="change(index)">{{ item.name }}
-                </div>
-              </div>
-            </div>
-            <div class="flex flex-center ml-20 mr-10" style="flex: 1">
-              <base-button icon="Plus" title="添加文件夹" type="0"/>
-              <base-button class="ml-20" icon="User" title="批量授权"/>
-            </div>
-          </div>
-        </div>
-        <folder_list/>
-      </div>
-      <div class="white-bg padding-left padding-top mt-10">
-        <files_list/>
-      </div>
-    </div>
-  </div>
-</template>
-
-<route>
-{
-name:'跟踪审计',
-}
-</route>
-
-<script>
-import leftBar from './component/left_bar.vue'
-import folder_list from './component/folder_list.vue'
-import files_list from './component/files_list.vue'
-import baseButton from '../../components/base-button.vue'
-
-export default {
-  name: 'track',
-  components: { leftBar, folder_list, files_list, baseButton },
-  data () {
-    return {
-      type: 1,
-      active: 0,
-      tab: [
-        {
-          name: '项目必须文件'
-        },
-        {
-          name: '相关合同'
-        },
-        {
-          name: '财务相关资料'
-        },
-        {
-          name: '其他文件'
-        }
-      ]
-    }
-  },
-  methods: {
-    change (index) {
-      this.active = index
-    }
-  }
-}
-</script>
-
-<style lang="scss" scoped>
-.tab {
-  width: 130px;
-  height: 38px;
-  background-color: #EDF0F3;
-  padding: 2px 10px;
-  color: #707070;
-  font-size: 13px;
-}
-
-.tab:first-child {
-  border-radius: 20px 0 0 20px;
-}
-
-.tab:last-child {
-  border-radius: 0 20px 20px 0;
-}
-
-.tab-active {
-  width: 130px;
-  flex-wrap: nowrap;
-  color: white;
-  font-size: 15px;
-  background-color: #BC002D;
-  font-weight: 500;
-  padding: 4px 10px;
-  border-radius: 20px;
-}
-</style>

+ 0 - 16
src/views/store/component/info3.vue

@@ -289,22 +289,6 @@ export default {
       })
       window.open(data.href, '_blank')
     },
-    /**
-     * 打开文件
-     * @param row
-     */
-    openFile(row) {
-      const routeUrl = this.$router.resolve({
-        path: '/home/details',
-        query: {
-          pid: this.pid,
-          id: this.info.id,
-          dispatchType: row,
-          type: 4
-        }
-      })
-      window.open(routeUrl.href, '_blank')
-    },
     exportFile() {
       console.log('export')
       this.$api.store