|
|
@@ -10,27 +10,27 @@
|
|
|
<span class="bold font-18 main-color">进度描述</span>
|
|
|
<div class="flex flex-center">
|
|
|
<base-button
|
|
|
- type="0"
|
|
|
- title="批量导出"
|
|
|
- icon="upload"
|
|
|
- @click="exportFile"
|
|
|
+ type="0"
|
|
|
+ title="批量导出"
|
|
|
+ icon="upload"
|
|
|
+ @click="exportFile"
|
|
|
/>
|
|
|
<base-button
|
|
|
- v-if="projectInfo.can_update"
|
|
|
- class="ml-10"
|
|
|
- :title="btnTitle"
|
|
|
- icon="upload"
|
|
|
- @click="edit"
|
|
|
+ v-if="projectInfo.can_update"
|
|
|
+ class="ml-10"
|
|
|
+ :title="btnTitle"
|
|
|
+ icon="upload"
|
|
|
+ @click="edit"
|
|
|
/>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="mt-20">
|
|
|
<el-input
|
|
|
- v-model="progress"
|
|
|
- :rows="10"
|
|
|
- type="textarea"
|
|
|
- :disabled="btnTitle === '编辑'"
|
|
|
- placeholder="填写项目进度信息"
|
|
|
+ v-model="progress"
|
|
|
+ :rows="10"
|
|
|
+ type="textarea"
|
|
|
+ :disabled="btnTitle === '编辑'"
|
|
|
+ placeholder="填写项目进度信息"
|
|
|
/>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -40,40 +40,38 @@
|
|
|
<span class="bold font-18 main-color">相关文件</span>
|
|
|
</div>
|
|
|
<avue-crud
|
|
|
- ref="crud"
|
|
|
- v-model="form"
|
|
|
- v-model:page="page"
|
|
|
- :data="data"
|
|
|
- :option="option"
|
|
|
- :table-loading="loading"
|
|
|
- class="curd"
|
|
|
- :before-open="beforeOpen"
|
|
|
- @row-del="rowDel"
|
|
|
+ ref="crud"
|
|
|
+ v-model="form"
|
|
|
+ v-model:page="page"
|
|
|
+ :data="data"
|
|
|
+ :option="option"
|
|
|
+ :table-loading="loading"
|
|
|
+ class="curd"
|
|
|
+ :before-open="beforeOpen"
|
|
|
+ @row-del="rowDel"
|
|
|
>
|
|
|
- <template #menu="{ row }">
|
|
|
- <el-button
|
|
|
- v-if="projectInfo.can_update"
|
|
|
- icon="Upload"
|
|
|
- type="primary"
|
|
|
- text
|
|
|
- @click="openFile(row)"
|
|
|
- >
|
|
|
- 上传
|
|
|
- </el-button>
|
|
|
- <el-button
|
|
|
+ <template #menu="{ row, index }">
|
|
|
+ <div class="flex flex-center">
|
|
|
+ <filepicker
|
|
|
+ :project-id="projectId"
|
|
|
+ :menu-btn="true"
|
|
|
+ @submit="selection($event, index + 1)"
|
|
|
+ />
|
|
|
+ <el-button
|
|
|
text
|
|
|
type="primary"
|
|
|
icon="Download"
|
|
|
@click="fileDownload(row)"
|
|
|
- >下载
|
|
|
- </el-button>
|
|
|
+ >下载
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
<template #menu-right>
|
|
|
<div class="full-width">
|
|
|
<el-button
|
|
|
- icon="el-icon-refresh"
|
|
|
- circle
|
|
|
- @click="detail"
|
|
|
+ icon="el-icon-refresh"
|
|
|
+ circle
|
|
|
+ @click="detail"
|
|
|
></el-button>
|
|
|
</div>
|
|
|
</template>
|
|
|
@@ -89,34 +87,27 @@
|
|
|
<div class="flex flex-center flex-justify-between mt-20">
|
|
|
<span class="bold font-18 main-color">施工现场图</span>
|
|
|
<div class="flex flex-center">
|
|
|
- <base-button
|
|
|
- type="0"
|
|
|
- v-if="projectInfo.can_update"
|
|
|
- title="上传"
|
|
|
- icon="upload"
|
|
|
- @click="
|
|
|
- openFile({
|
|
|
- dispatchType: 4
|
|
|
- })
|
|
|
- "
|
|
|
+ <filepicker
|
|
|
+ :project-id="projectId"
|
|
|
+ @submit="selection($event, 4)"
|
|
|
/>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="mt-20">
|
|
|
- <el-empty description="暂无施工现场图" v-if="srcList.length === 0"/>
|
|
|
+ <el-empty description="暂无施工现场图" v-if="srcList.length === 0" />
|
|
|
<el-carousel
|
|
|
- v-else
|
|
|
- autoplay
|
|
|
- :interval="4000"
|
|
|
- type="card"
|
|
|
- height="400px"
|
|
|
- :initial-index="0"
|
|
|
+ v-else
|
|
|
+ autoplay
|
|
|
+ :interval="4000"
|
|
|
+ type="card"
|
|
|
+ height="400px"
|
|
|
+ :initial-index="0"
|
|
|
>
|
|
|
<el-carousel-item v-for="(item, index) in srcList" :key="item">
|
|
|
<el-image
|
|
|
- :src="item"
|
|
|
- fit="cover"
|
|
|
- @click="showImageView(item, index)"
|
|
|
+ :src="item"
|
|
|
+ fit="cover"
|
|
|
+ @click="showImageView(item, index)"
|
|
|
/>
|
|
|
</el-carousel-item>
|
|
|
</el-carousel>
|
|
|
@@ -124,10 +115,10 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<el-image-viewer
|
|
|
- v-if="showImage"
|
|
|
- :url-list="preList"
|
|
|
- :initial-index="imageIndex"
|
|
|
- @close="showImage = false"
|
|
|
+ v-if="showImage"
|
|
|
+ :url-list="preList"
|
|
|
+ :initial-index="imageIndex"
|
|
|
+ @close="showImage = false"
|
|
|
/>
|
|
|
</basic-container>
|
|
|
</template>
|
|
|
@@ -136,10 +127,11 @@
|
|
|
import BasicContainer from '@/components/basic-container/main.vue'
|
|
|
import baseButton from '@/components/base-button.vue'
|
|
|
import api from '@/api/index.js'
|
|
|
+import filepicker from '@/components/filepicker/index.vue'
|
|
|
|
|
|
export default {
|
|
|
name: 'dispatch',
|
|
|
- components: {BasicContainer, baseButton},
|
|
|
+ components: { BasicContainer, baseButton, filepicker },
|
|
|
props: {
|
|
|
projectInfo: {
|
|
|
type: Object,
|
|
|
@@ -210,7 +202,7 @@ export default {
|
|
|
tip: false,
|
|
|
columnBtn: false,
|
|
|
selection: false,
|
|
|
- editBtn: true,
|
|
|
+ editBtn: false,
|
|
|
editBtnText: '打开',
|
|
|
editBtnIcon: 'FolderOpened',
|
|
|
addBtn: false,
|
|
|
@@ -369,7 +361,7 @@ export default {
|
|
|
if (api.offices.includes(item.fileFolder.suffix)) {
|
|
|
const routeData = this.$router.resolve({
|
|
|
path: '/home/file_detail',
|
|
|
- query: {id: item.fileFolder.fileId}
|
|
|
+ query: { id: item.fileFolder.fileId }
|
|
|
})
|
|
|
window.open(routeData.href, '_blank')
|
|
|
} else {
|
|
|
@@ -388,7 +380,7 @@ export default {
|
|
|
cancelButtonText: '取消',
|
|
|
type: 'warning'
|
|
|
}).then(() => {
|
|
|
- this.$api.project.fileRemove({ids: row.fileId, type: 2}).then(res => {
|
|
|
+ this.$api.dispatch.removeFile({ ids: row.id, type: 2 }).then(res => {
|
|
|
if (res.code === 200) {
|
|
|
this.$message.success(res.msg)
|
|
|
this.detail()
|
|
|
@@ -433,6 +425,26 @@ export default {
|
|
|
this.$message.success('资料打包中,完成后系统将会发送通知消息给您')
|
|
|
this.loading = false
|
|
|
})
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * 选择关联文件
|
|
|
+ * @param list
|
|
|
+ */
|
|
|
+ selection(list, type) {
|
|
|
+ const tmps = list.map(e => {
|
|
|
+ return {
|
|
|
+ projectId: this.projectId,
|
|
|
+ year: this.year,
|
|
|
+ month: this.month,
|
|
|
+ fileId: e.id,
|
|
|
+ type
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.$api.dispatch.linkFile(tmps).then(res => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.detail()
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
}
|