|
|
@@ -109,13 +109,14 @@
|
|
|
<el-text size="large">项目文件列表</el-text>
|
|
|
</el-col>
|
|
|
<el-col
|
|
|
- :span="3"
|
|
|
- :offset="15"
|
|
|
+ :span="6"
|
|
|
+ :offset="12"
|
|
|
>
|
|
|
<el-button
|
|
|
type="primary"
|
|
|
:icon="Edit"
|
|
|
- >类型编辑
|
|
|
+ @click="openOptionEdit"
|
|
|
+ >项目状态和文件类型编辑
|
|
|
</el-button>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
@@ -136,6 +137,7 @@
|
|
|
v-model="fileType"
|
|
|
clearable
|
|
|
@change="changeFileType"
|
|
|
+ placeholder="项目状态"
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="item in fileTypeList"
|
|
|
@@ -189,12 +191,14 @@
|
|
|
</el-button>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
- <el-row style="margin-top: 20px">
|
|
|
+ <el-row style="margin-top: 20px" >
|
|
|
<el-col :span="24">
|
|
|
<el-table
|
|
|
:data="fileList"
|
|
|
row-class-name="row-class"
|
|
|
border
|
|
|
+ height="560px"
|
|
|
+ stripe
|
|
|
>
|
|
|
<el-table-column
|
|
|
prop="ID"
|
|
|
@@ -237,6 +241,15 @@
|
|
|
</el-table>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
+ <el-row justify="end">
|
|
|
+ <el-pagination
|
|
|
+ :page-size="10"
|
|
|
+ background
|
|
|
+ layout="prev, pager, next"
|
|
|
+ :total="fileTotal"
|
|
|
+ @change="changeFilePage"
|
|
|
+ />
|
|
|
+ </el-row>
|
|
|
</el-card>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
@@ -410,6 +423,13 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
+ <el-dialog
|
|
|
+ v-model="stateTypeShow"
|
|
|
+ title="状态和类型编辑"
|
|
|
+ width="40%"
|
|
|
+ >
|
|
|
+ <option-edit/>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -420,7 +440,7 @@ import { getAllUsers } from '@/api/user'
|
|
|
import { getFileType, queryFileList, createProjectFile, downloadProjectFile } from '@/api/file'
|
|
|
import { Download, Upload, Delete, Search, RefreshLeft, Edit } from '@element-plus/icons-vue'
|
|
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
|
|
-
|
|
|
+import OptionEdit from './components/optionEdit.vue'
|
|
|
defineOptions({
|
|
|
name: 'ProjectDetails'
|
|
|
})
|
|
|
@@ -448,6 +468,8 @@ const messagePopupShow = ref(false)
|
|
|
const userList = reactive([])
|
|
|
// 项目文件列表
|
|
|
const fileList = reactive([])
|
|
|
+
|
|
|
+const fileTotal = ref(0)
|
|
|
// 项目文件类型列表
|
|
|
const fileTypeList = reactive([])
|
|
|
// 项目文件类型
|
|
|
@@ -459,7 +481,7 @@ const uploadFileType = ref('')
|
|
|
|
|
|
const uploadFileData = ref([])
|
|
|
|
|
|
-// const uploadFileList = ref([])
|
|
|
+const stateTypeShow = ref(false)
|
|
|
|
|
|
// .............................................
|
|
|
// 计算属性
|
|
|
@@ -484,6 +506,7 @@ onMounted(() => {
|
|
|
projectMessage('LCZM202407161229')
|
|
|
queryFileType()
|
|
|
getProjectState()
|
|
|
+ queryFile()
|
|
|
getAllUsers().then(res => {
|
|
|
if (res.code === 0) {
|
|
|
userList.push(...res.data)
|
|
|
@@ -499,11 +522,6 @@ const projectMessage = (code) => {
|
|
|
data.CreatedAt = formatDate(data.CreatedAt)
|
|
|
data.UpdatedAt = formatDate(data.UpdatedAt)
|
|
|
Object.keys(data).forEach(key => {
|
|
|
- if (key === 'files') {
|
|
|
- // data[key].CreatedAt = formatDate(data[key].CreatedAt)
|
|
|
- // data[key].UpdatedAt = formatDate(data[key].UpdatedAt)
|
|
|
- fileList.push(...data[key])
|
|
|
- }
|
|
|
information[key] = data[key]
|
|
|
editData[key] = data[key]
|
|
|
})
|
|
|
@@ -544,8 +562,9 @@ const changeFileType = (value) => {
|
|
|
const queryFile = () => {
|
|
|
queryFileList(fileCondition).then(res => {
|
|
|
if (res.code === 0) {
|
|
|
- console.log(res.data)
|
|
|
- fileList.push(...res.data)
|
|
|
+ fileTotal.value = res.data.total
|
|
|
+ fileList.length = 0
|
|
|
+ fileList.push(...res.data.list)
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
@@ -553,6 +572,7 @@ const queryFile = () => {
|
|
|
// 编辑基本信息
|
|
|
const editBasicMessage = () => {
|
|
|
const data = {
|
|
|
+ id: editData.ID,
|
|
|
code: 'LCZM202407161229',
|
|
|
name: editData.name,
|
|
|
principal: editData.principal,
|
|
|
@@ -574,9 +594,15 @@ const editBasicMessage = () => {
|
|
|
}
|
|
|
}
|
|
|
editProject(data).then(res => {
|
|
|
- console.log(res)
|
|
|
if (res.code === 0) {
|
|
|
- console.log(res.data)
|
|
|
+ ElMessage({
|
|
|
+ message: '编辑成功',
|
|
|
+ type: 'success',
|
|
|
+ showClose: true,
|
|
|
+ duration: 2000
|
|
|
+ })
|
|
|
+ messagePopupShow.value = false
|
|
|
+ projectMessage('LCZM202407161229')
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
@@ -684,6 +710,15 @@ const headSelect = () => {
|
|
|
//
|
|
|
const changeUrgency = () => {
|
|
|
}
|
|
|
+
|
|
|
+const changeFilePage = (value) => {
|
|
|
+ fileCondition.pageInfo.page = value
|
|
|
+ queryFile()
|
|
|
+}
|
|
|
+
|
|
|
+const openOptionEdit = () => {
|
|
|
+ stateTypeShow.value = true
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|