Browse Source

Merge remote-tracking branch 'origin/master'

sangwenwei 1 year ago
parent
commit
78bf71d247

+ 10 - 0
src/api/jy/ProjectInfoService.js

@@ -150,6 +150,16 @@ export default class ProjectInfoService {
 			params: {id:id}
 		})
 	}
+	/*
+	根据id查找外审信息
+	 */
+	getAttachmentList(projectId){
+		return request({
+			url: prefix + '/jyProject/getAttachmentList',
+			method: 'get',
+			params: {projectId:projectId}
+		})
+	}
 
 	/**
 	 * 根据id查找报批签发信息

+ 1 - 1
src/api/program/ProgramFileDictService.js

@@ -1,5 +1,5 @@
 import request from '@/utils/httpRequest'
-import { ASSESS_PATH as prefix } from "../AppPath";
+import { BUSINESS_PATH as prefix } from "../AppPath";
 
 export default class ProgramFileDictService {
   list (params) {

+ 1 - 1
src/api/program/ProgramTypeFileDictService.js

@@ -1,5 +1,5 @@
 import request from '@/utils/httpRequest'
-import { ASSESS_PATH as prefix } from "../AppPath";
+import { BUSINESS_PATH as prefix } from "../AppPath";
 
 export default class ProgramTypeDictService {
   list (params) {

+ 15 - 0
src/api/sys/OSSService.js

@@ -18,6 +18,13 @@ export default class OSSSerive {
       data: param
     })
   }
+	save (param) {
+    return request({
+      url: prefix + '/oss/file/save',
+      method: 'post',
+      data: param
+    })
+  }
   findFileList (attachmentId) {
     return request({
 		  url: prefix + '/oss/file/findFileList',
@@ -54,6 +61,14 @@ export default class OSSSerive {
       params: {file: url}
     })
   }
+
+  getFileListByAttachmentIdAndModuleType (attachmentId,moduleType) {
+	return request({
+		url: prefix + '/oss/file/getFileListByAttachmentIdAndModuleType',
+		method: 'get',
+		params: {attachmentId: attachmentId,moduleType:moduleType}
+	})
+  }
 }
 
 export const client = new OSS({

+ 388 - 0
src/views/common/ProjectTypeUpLoadComponent.vue

@@ -0,0 +1,388 @@
+<!--文件上传组件-->
+<template>
+  <div :key="uploadKey">
+    <el-divider v-if="showDivider" content-position="left"><i class="el-icon-document"></i> {{dividerName}}</el-divider>
+    <el-upload ref="upload" style="display: inline-block; :show-header='status'" action=""
+               :limit="999" :http-request="httpRequest"
+               multiple
+               :on-exceed="(files, fileList) =>{
+                      $message.warning(`当前限制选择 999 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`)
+                     }"
+               :show-file-list="false"
+               :on-change="changes"
+               :on-progress="uploadVideoProcess"
+               :file-list="fileList">
+		<template v-if="auth==='view'&&uploadFlag===false" #tip>
+			<el-button  :loading="loading" type="primary" size="default" :disabled="true"> 点击上传 </el-button>
+		</template>
+		<template v-else #trigger>
+			<el-button  :loading="loading" type="primary" size="default"> 点击上传 </el-button>
+		</template>
+    </el-upload>
+    <div style="height: calc(100% - 80px);margin-top: 10px">
+      <el-table
+        ref="uploadTable"
+        v-loading="loading"
+        :key="tableKey"
+        :data="dataListNew">
+        <el-table-column type="seq" width="40"></el-table-column>
+        <el-table-column label="文件名称" prop="name" align="center">
+          <template #default="scope">
+            <div v-if="ifName(scope.row) === true">
+              <el-image
+                style="width: 30px; height: 30px;padding-top: 4px;"
+                :src="scope.row.lsUrl"
+                :preview-src-list="[scope.row.lsUrl]"
+				:preview-teleported="true"
+              ></el-image>
+            </div>
+            <div v-else>
+              <el-link  type="primary" :underline="false" @click="showFile(scope.row)">{{scope.row.name}}</el-link>
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column label="创建人" prop="createBy.name" align="center"></el-table-column>
+        <el-table-column label="创建时间" prop="createTime" align="center"></el-table-column>
+        <el-table-column label="文件大小" prop="size" align="center">
+          <template #default="scope">
+            {{getSize(scope.row.size)}}
+          </template>
+        </el-table-column>
+        <el-table-column label="操作" width="200px" fixed="right" align="center">
+          <template  #default="scope">
+            <el-button text type="primary" key="01" icon="el-icon-download" size="small" @click="toHref(scope.row)" >下载</el-button>
+            <el-button text type="primary" key="02" icon="el-icon-delete" size="small"  @click="deleteById(scope.row, scope.$index)" :disabled="auth==='view'&&delFlag === false&&createBy!==scope.row.createBy.name">删除</el-button>
+<!--            <el-button v-if="createBy===scope.row.createBy.name" type="text"  icon="el-icon-delete" size="small"  @click="deleteById(scope.row, scope.$index)" :disabled="auth==='view'&&delFlag === false">删除2</el-button>-->
+          </template>
+        </el-table-column>
+      </el-table>
+    </div>
+<!--    <el-image-viewer v-if="showViewer" :on-close="closeViewer" :url-list="[url]" :zIndex=9999></el-image-viewer>-->
+  </div>
+</template>
+
+<script>
+  // eslint-disable-next-line no-unused-vars
+  import OSSSerivce, {
+    httpRequest,
+    // eslint-disable-next-line no-unused-vars
+    handleRemove,
+    fileName,
+    // eslint-disable-next-line no-unused-vars
+    beforeAvatarUpload,
+    // eslint-disable-next-line no-unused-vars
+    openWindowOnUrl,
+    // eslint-disable-next-line no-unused-vars
+    toHref
+  } from '@/api/sys/OSSService'
+  // import ElImageViewer from 'element-ui/packages/image/src/image-viewer'
+  import moment from 'moment'
+  export default {
+    data () {
+      return {
+		  uploadKey: '',
+        progressFlag: false,
+        loadProgress: 0,
+        fileList: [],
+        dataList: [],
+        dataListNew: [],
+        url: '',
+        showViewer: false,
+        ossService: null,
+        auth: '',
+        directory: 'public',
+        maxValue: 300,
+        tableKey: '',
+        fileLoading: true,
+        dividerName: '',
+        uploadFlag: false,
+        delFlag: false,
+        createBy: '',
+        showDivider: true,
+        loading: false,
+        dataListLength: ''
+      }
+    },
+    watch: {
+    },
+    created () {
+      this.ossService = new OSSSerivce()
+    },
+    components: {
+      // ElImageViewer
+    },
+    mounted () {
+      window.onPreview = this.onPreview
+    },
+    methods: {
+      /**
+       * dividerName: 组件中divider的名称赋值
+       * showDivider: ‘附件‘Divider是否展示
+       *     注:值为空时,默认值为true
+       *    showDivider=false时 ‘附件‘Divider隐藏
+       **/
+      setDividerName (dividerName, showDivider) {
+        if (this.commonJS.isNotEmpty(dividerName)) {
+          this.dividerName = dividerName
+        }
+        if (this.commonJS.isNotEmpty(showDivider)) {
+          if (showDivider === false) {
+            this.showDivider = false
+          } else {
+            this.showDivider = true
+          }
+        } else {
+          this.showDivider = true
+        }
+      },
+      /**
+       * 文件上传组件初始化
+       * @param auth
+       *    auth的值为"view"时,不可上传/编辑文件
+       *    auth为其他值时,可上传/编辑文件
+       * @param fileList  要显示到文件上传列表中的文件。
+       *    注:文件必须要有url属性并且文件的url属性值必须是在oss中的路径值
+       *    例:'/attachment-file/xxx/xxx/2022/9/08/xxx.jpg'
+       * @param directory  要存放到oss的哪个文件夹下。
+       *    注:值为空时,默认存放到"public"文件夹
+       * @param maxValue  上传文件允许的最大值,单位:MB
+       *    注:值为空时,默认值为300MB
+       * @param dividerName  组件中divider的名称
+       *    注:值为空时,默认值为‘附件’
+       * @param uploadFlag  ‘上传文件’按钮是否禁用
+       *    注:值为空时,默认值为false
+       *    auth=view&&uploadFlag=false时 ‘上传文件’按钮禁用
+       * @param delFlag  ‘删除’按钮是否禁用
+       *    注:值为空时,默认值为false
+       *    auth=view&&delFlag=false时 ‘删除’按钮禁用
+       * @param showDivider  ‘附件‘Divider是否展示
+       *    注:值为空时,默认值为true
+       *    showDivider=false时 ‘附件‘Divider隐藏
+       */
+      async newUpload (auth, fileList, directory, maxValue, dividerName, uploadFlag, delFlag, showDivider) {
+        await this.fileLoadingFalse()
+        if (this.commonJS.isEmpty(fileList)) {
+          this.fileLoading = true
+        } else {
+          this.dataListLength = fileList.length
+        }
+        if (this.commonJS.isEmpty(dividerName)) {
+          this.dividerName = '附件'
+        } else {
+          this.dividerName = dividerName
+        }
+        if (directory !== undefined && directory !== null && directory !== '' && directory !== {}) {
+          this.directory = directory
+        } else {
+          this.directory = 'public'
+        }
+        if (maxValue !== undefined && maxValue !== null && maxValue !== '' && maxValue !== 0) {
+          this.maxValue = maxValue
+        } else {
+          this.maxValue = 300
+        }
+        this.auth = auth
+        if (this.commonJS.isEmpty(uploadFlag)) {
+          this.uploadFlag = false
+        } else {
+          if (uploadFlag !== true && uploadFlag !== false) {
+            this.uploadFlag = false
+          } else {
+            this.uploadFlag = uploadFlag
+          }
+        }
+        if (this.commonJS.isEmpty(delFlag)) {
+          this.delFlag = false
+        } else {
+          if (delFlag !== true && delFlag !== false) {
+            this.delFlag = false
+            this.createBy = delFlag
+          } else {
+            this.delFlag = delFlag
+          }
+        }
+        for await (let item of fileList) {
+          await this.ossService.getFileSizeByUrl(item.url).then((data) => {
+            item.lsUrl = data.url
+            item.size = data.size
+            this.dataList.push(item)
+            this.dataListNew.push(item)
+            if (this.dataListNew.length === fileList.length) {
+              this.fileLoading = true
+            }
+          })
+        }
+        // this.dataList = JSON.parse(JSON.stringify(fileList))
+        // this.dataListNew = JSON.parse(JSON.stringify(fileList))
+        if (this.commonJS.isEmpty(showDivider)) {
+          this.showDivider = true
+        } else {
+          if (showDivider === false) {
+            this.showDivider = false
+          } else {
+            this.showDivider = true
+          }
+        }
+      },
+      async httpRequest (file) {
+        await httpRequest(file, fileName(file), this.directory, this.maxValue)
+      },
+      uploadVideoProcess (event, file, fileList) {
+        this.progressFlag = true // 显示进度条
+        this.loadProgress = parseInt(event.percent) // 动态获取文件上传进度
+        if (this.loadProgress >= 100) {
+          this.loadProgress = 100
+          setTimeout(() => {
+            this.progressFlag = false
+          }, 1000) // 一秒后关闭进度条
+        }
+      },
+      getSize (value) {
+        if (this.commonJS.isEmpty(value)) {
+          return '0 B'
+        } else {
+          let val = parseInt(value)
+          if (this.commonJS.isEmpty(val)) {
+            return '0 B'
+          }
+          if (isNaN(val)) {
+            return '0 B'
+          }
+          if (val === 0) {
+            return '0 B'
+          }
+          let k = 1024
+          let sizes = ['B', 'KB', 'MB', 'GB', 'PB', 'TB', 'EB', 'ZB', 'YB']
+          let i = Math.floor(Math.log(val) / Math.log(k))
+			let result = val / Math.pow(k, i);
+			let kb = parseFloat(result.toPrecision(3));
+          return kb + '' + sizes[i]
+        }
+      },
+      async changes (file, fileList) {
+        // if (file.status !== 'ready') {
+        //   return
+        // }
+        if (!beforeAvatarUpload(file, fileList, this.maxValue)) {
+          this.$message.error('文件大小不能超过 ' + this.maxValue + ' MB!')
+          return
+        }
+        this.dataListNew = []
+        this.dataList.forEach((item) => {
+          this.dataListNew.push(item)
+        })
+        for (let item of fileList) {
+          item.createTime = moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
+          item.createBy = {
+            id: '',
+            name: ''
+          }
+          item.createBy.id = this.$store.state.user.id
+          item.createBy.name = this.$store.state.user.name
+          this.dataListNew.push(item)
+        }
+        for await (let item of this.dataListNew) {
+          if (item.raw !== undefined && item.raw !== null && item.raw !== {}) {
+            item.url = item.raw.url
+            if (item.raw.url !== undefined && item.raw.url !== null && item.raw.url !== {}) {
+              await this.ossService.getTemporaryUrl(item.raw.url).then((data) => {
+                item.lsUrl = data
+              })
+            }
+          }
+        }
+        this.tableKey = Math.random()
+        this.uploadKey = Math.random()
+      },
+      showFile (row) {
+      	console.log('row', row)
+        openWindowOnUrl(row)
+      },
+      onPreview (url) {
+        this.url = url
+        this.showViewer = true
+      },
+      // 关闭查看器
+      closeViewer () {
+        this.url = ''
+        this.showViewer = false
+      },
+      toHref (row) {
+        toHref(row)
+      },
+      async deleteById (row, index) {
+      	console.log('row', row)
+	  	// this.$refs.upload.handleRemove(this.dataListNew[index])
+        await this.dataListNew.splice(index, 1)
+		await this.dataList.splice(index, 1)
+		  if (this.commonJS.isNotEmpty(row.id)) {
+			  this.ossService.deleteMsgById(row.id)
+		  }
+		this.tableKey = Math.random()
+		this.uploadKey = Math.random()
+      },
+      /**
+       * 关闭dialog时使用  清除el-upload中上传的文件
+       */
+      clearUpload () {
+        this.$refs.upload.clearFiles()
+        this.dataList = []
+        this.dataListNew = []
+        this.createBy = ''
+      },
+      /**
+       * 获取当前文件列表中的文件数据
+       */
+      getDataList () {
+        return this.dataListNew
+      },
+      /**
+       * 判断进度条是否结束,附件是否加载完成
+       * @returns {boolean}
+       */
+      checkProgress () {
+        if (this.progressFlag === true) {
+          this.$message.warning('请等待附件上传完成再进行操作')
+          return true
+        }
+        if (this.fileLoading === false) {
+          this.$message.warning('请等待附件加载完成再进行操作')
+          if (this.dataListLength === this.dataListNew.length) {
+            this.fileLoading = true
+          }
+          return true
+        }
+        return false
+      },
+      ifName (row) {
+        if (this.commonJS.isEmpty(row.name)) {
+          row.name = '---'
+          return false
+        }
+        let suffix = row.name.substring(row.name.lastIndexOf('.') + 1)
+        if (suffix === 'jpg' || suffix === 'png' || suffix === 'gif' || suffix === 'bmp' || suffix === 'jpeg') {
+          return true
+        } else {
+          return false
+        }
+      },
+      fileLoadingFalse () {
+        this.fileLoading = false
+      },
+      // 开启/关闭页面的加载中状态
+      changeLoading (loading) {
+        if (this.commonJS.isNotEmpty(loading)) {
+          this.loading = loading
+        } else {
+          this.loading = false
+        }
+      }
+    }
+  }
+</script>
+<style>
+  .el-divider__text {
+    font-size: 16px;
+    font-weight: bold;
+  }
+</style>

+ 178 - 0
src/views/jy/project/FileForm.vue

@@ -0,0 +1,178 @@
+<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
+  <div>
+    <el-dialog
+      :title="title"
+      :close-on-click-modal="false"
+	  draggable
+      width="1200px"
+      @close="close(),closeXTable()"
+      @keyup.enter.native="doSubmit"
+	  v-model="visible">
+      <el-form size="large" :model="inputForm" ref="inputForm" :rules="rules" v-loading="loading" :class="method==='view'?'readonly':''"
+               label-width="150px">
+        <!--        附件-->
+        <UpLoadComponent ref="uploadComponent"></UpLoadComponent>
+      </el-form>
+		<template #footer>
+			<span class="dialog-footer">
+      <el-button  @click="close(),closeXTable()" icon="el-icon-circle-close">关闭</el-button>
+      <el-button  type="primary" v-if="method != 'view'" @click="doSubmit()" icon="el-icon-circle-check" v-noMoreClick >确定</el-button>
+			</span>
+		</template>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  import UpLoadComponent from '@/views/common/UpLoadComponent'
+  import OSSSerive from '@/api/sys/OSSService'
+  export default {
+    data () {
+      return {
+        visable: false,
+        gridData: [],
+		tableKey: '',
+        radio: 0,
+        tableData: [],
+        dataList: [],
+        dataListNew: [],
+        title: '',
+        method: '',
+        visible: false,
+        loading: false,
+        inputForm: {
+        },
+		  attachmentId: '',
+		  moduleType: '',
+        rogress: 0, // 动态显示进度条
+        progressFlag: false, // 关闭进度条
+      }
+    },
+    components: {
+      UpLoadComponent
+    },
+    ossService: null,
+    workClientService: null,
+    created () {
+      this.ossService = new OSSSerive()
+    },
+    mounted () {
+    },
+    methods: {
+      // 关闭查看器
+      closeViewer () {
+        this.url = ''
+        this.showViewer = false
+      },
+      async init (method, id,projectId) {
+      	this.attachmentId = id
+      	this.moduleType = projectId
+        this.dataList = []
+        this.dataListNew = []
+        await this.ossService.getFileListByAttachmentIdAndModuleType(id,projectId).then((data) => {
+			if(data){
+				data.forEach((item) => {
+					item.name = item.attachmentName
+					this.dataList.push(item)
+					this.dataListNew.push(item)
+				})
+			}
+        })
+        this.method = method
+        this.inputForm = {
+
+        }
+        this.inputForm.id = id
+		  this.title = '上传附件'
+        this.visible = true
+        this.loading = false
+		  this.$nextTick(() => {
+          // this.$refs.upload.clearFiles()
+          this.$refs.inputForm.resetFields()
+            this.$refs.uploadComponent.newUpload(method, [], 'workClient', 300)
+          this.loading = false
+        })
+      },
+      // 表单提交
+      doSubmit () {
+        if (this.$refs.uploadComponent.checkProgress()) {
+          this.loading = false
+          return
+        }
+        this.$refs['inputForm'].validate((valid) => {
+          if (valid) {
+            this.loading = true
+            this.inputForm.workAttachments = []
+            this.dataListNew = this.$refs.uploadComponent.getDataList()
+            this.dataListNew.forEach((item) => {
+              if (item.id === null || item.id === undefined || item.id === '') {
+                item.url = item.raw.url
+              }
+              item.attachmentFlag = 'workClient'
+              item.fileSize = item.size
+              item.attachmentName = item.name
+              item.createBy = null
+				item.attachmentId = this.attachmentId
+				item.moduleType = this.moduleType
+              this.inputForm.workAttachments.push(item)
+            })
+			console.log(this.inputForm)
+            this.ossService.save(this.inputForm.workAttachments).then((data) => {
+              this.close()
+              this.$message.success(data)
+              // this.$emit('refreshDataList')
+              this.loading = false
+            }).catch(() => {
+              this.loading = false
+            })
+          }
+        })
+      },
+      close () {
+        this.$refs.uploadComponent.clearUpload()
+        this.$refs.inputForm.resetFields()
+        this.visible = false
+        this.showVi = true
+      },
+      // 关闭窗口时调用
+      closeXTable () {
+        this.bankInfos = []
+        this.linkmanInfos = []
+        this.closePop()
+      },
+      closePop () {
+        this.visable = false
+      }
+    }
+  }
+</script>
+
+<style>
+  .tid_40 .vxe-body--column .vxe-cell{
+    padding: 1px;
+    text-align: center;
+  }
+  .tid_40 .vxe-header--row .col--last{
+    text-align: center;
+  }
+  .tid_45 .vxe-body--column .vxe-cell{
+    padding: 1px;
+    text-align: center;
+  }
+  .tid_45 .vxe-header--row .col--last{
+    text-align: center;
+  }
+</style>
+
+<style scoped>
+  .avatar{
+    height: 100px;
+  }
+  .el-divider__text {
+    font-weight: bold;
+    font-size: 16px;
+  }
+  .readonly-text input {
+	  color: red; /* 设置只读文本的字体颜色为红色 */
+  }
+</style>

+ 109 - 2
src/views/jy/project/OutInstanceForm.vue

@@ -106,8 +106,83 @@
 			</el-row>
 
 		</el-form>
+
+		<el-divider content-position="left"><i class="el-icon-document"></i>
+			<span>附件信息</span>
+		</el-divider>
+		<el-row  :gutter="15" >
+			<el-col :span="24">
+				<vxe-table
+					border
+					show-overflow
+					ref="clientTable"
+					class="vxe-table-element"
+					style="margin-left: 5em"
+
+					:row-config="{keyField: 'id'}"
+					:column-config="{resizable: true}"
+					:tree-config="{transform: true, expandAll: true}"
+					:data="tableData">
+					<vxe-column field="name" title="文件要求" width="260px" tree-node>
+						<template #default="scope">
+							<span style="font-weight: bold"
+								v-if="scope.row.parentId === '0'"
+							>{{ scope.row.name }}
+							</span>
+							<span
+								v-if="scope.row.parentId !== '0' && scope.row.mustFlag === 1"
+							><span style="color: red;font-weight: bold">* </span>{{ scope.row.name }}
+							</span>
+							<span
+								v-if="scope.row.parentId !== '0' && scope.row.mustFlag === 0"
+							>{{ scope.row.name }}
+							</span>
+						</template>
+					</vxe-column>
+					<vxe-column field="attachmentName" title="文件描述/文件名称" show-overflow="false">
+						<template #default="scope">
+							<span
+								v-if="scope.row.levelFlag === 2"
+							>
+								<span style="font-weight: bold">文件格式及大小:{{ scope.row.size }}</span>
+								<br>
+								<span>{{ scope.row.type }}</span>
+							</span>
+							<el-link v-if="scope.row.levelFlag === 3"  type="primary" :underline="false" @click="showFile(scope.row)">{{scope.row.attachmentName}}</el-link>
+						</template>
+					</vxe-column>
+					<vxe-column field="workAttachmentType" width="100px" title="文件类型"></vxe-column>
+					<vxe-column field="date" title="上传时间" width="100px"></vxe-column>
+					<vxe-column field="WorkAttachmentType" width="100px" title="文件大小(M)"></vxe-column>
+
+					<vxe-column
+						title="操作"
+						width="100px"
+						fixed="right"
+						align="center"
+					>
+						<template #default="scope">
+							<el-button
+								v-if="scope.row.levelFlag === 2"
+								type="primary"
+								size="small"
+								@click="openFileForm(scope.row.id,this.inputForm.projectId)"
+							>编辑</el-button>
+							<el-button
+								v-if="scope.row.levelFlag === 3"
+								type="info"
+								size="small"
+								@click="toHref(scope.row)" >下载</el-button>
+
+						</template>
+					</vxe-column>
+				</vxe-table>
+			</el-col>
+		</el-row>
+
 		<!--        附件-->
 		<UpLoadComponent ref="uploadComponent"></UpLoadComponent>
+		<FileForm ref="fileForm"></FileForm>
 
 
 	</div>
@@ -115,8 +190,17 @@
 
 <script>
 	import ProjectInfoService from "@/api/jy/ProjectInfoService";
+	import FileForm from './fileForm'
 	import UserSelectSignatory from '../workClientInfo/clientUserSelect'
 	import UpLoadComponent from '@/views/common/JyUpLoadComponent'
+	import OSSSerivce, {
+		// eslint-disable-next-line no-unused-vars
+		beforeAvatarUpload,
+		// eslint-disable-next-line no-unused-vars
+		openWindowOnUrl,
+		// eslint-disable-next-line no-unused-vars
+		toHref
+	} from '@/api/sys/OSSService'
 	export default {
 		props: {
 			businessId: {
@@ -157,8 +241,8 @@
 					remarks:''
 				},
 				keyWatch: '',
-				tabName:''
-
+				tabName:'',
+				tableData: []
 			}
 		},
 		ProjectInfoService:null,
@@ -203,6 +287,8 @@
 		components: {
 			UserSelectSignatory,
 			UpLoadComponent,
+			FileForm,
+			OSSSerivce,
 		},
 		methods: {
 			getKeyWatch (keyWatch) {
@@ -267,6 +353,12 @@
 							method = 'view'
 						}
 						console.log('method2',method)
+
+						this.projectInfoService.getAttachmentList(this.inputForm.projectId).then((data) => {
+							console.log("getAttachmentList",data)
+							this.tableData = data
+						})
+
 						this.$refs.uploadComponent.newUpload(method, this.inputForm.fileList, 'jyProjectOut', null, '附件', null, null, null)
 						// this.$refs.archiveFile.newUpload('view', [], 'cwWorkContract', null, null, null, null, false)
 						this.loading = false
@@ -295,6 +387,21 @@
 				this.$refs.inputForm.resetFields()
 				this.visible = false
 			},
+
+			//测试按钮
+			openFileForm(id,projectId){
+				this.$refs.fileForm.init("add", id,projectId)
+			},
+			showFile (row) {
+				console.log("showFile",row)
+				row.name = row.attachmentName
+				openWindowOnUrl(row)
+			},
+			toHref (row) {
+				console.log("toHref",row)
+				toHref(row)
+			},
+
 			reapplyForm (callback) {
 				this.loading = true
 				this.projectInfoService.findByIdOut(this.inputForm.id).then((data) => {

+ 4 - 0
src/views/jy/project/ProjectArchiveForm.vue

@@ -96,6 +96,7 @@
 
 			</el-row>
 			<el-row  :gutter="15">
+				<el-button  type="primary"  icon="el-icon-plus" @click="add()">新建</el-button>
 					<el-col :span="24">
 						<el-form-item label="备注" prop="remarks"
 									  :rules="[
@@ -116,6 +117,7 @@
 <script>
 	import ProjectInfoService from "@/api/jy/ProjectInfoService";
 	import UserSelectSignatory from '../workClientInfo/clientUserSelect'
+	import FileForm from './FileForm'
 	import UpLoadComponent from '@/views/common/JyArchiveUpLoadComponent'
 	export default {
 		props: {
@@ -162,8 +164,10 @@
 			}
 		},
 		ProjectInfoService:null,
+		FileForm:null,
 		created () {
 			this.projectInfoService=new ProjectInfoService()
+			this.fileForm=new FileForm()
 		},
 		computed: {
 			bus: {

+ 40 - 40
src/views/jy/workContractInfo/WorkContractForm.vue

@@ -58,12 +58,11 @@
 						<el-form-item label="合同类型" prop="contractTypes"
 									  :rules="[{required: true, message: '合同类型不能为空', trigger: 'blur'}
                  ]" >
-							<el-cascader :disabled="status === 'audit' || status === 'taskFormDetail'|| method==='view'" style="width: 100%" v-model="inputForm.contractTypes" :options="typeData" @change="handleChange"  clearable  :props="{
+							<el-cascader style="width: 100%" v-model="inputForm.contractTypes" :options="typeData" @change="handleChange"  clearable  :props="{
 			value: 'value',
 			label: 'label', // 显示名称
 			children: 'children', // 子级字段名
-			multiple: true,
-			emitPath: true
+			multiple: true
 		}"
 							/>
 
@@ -560,7 +559,8 @@
 							console.log('1',data.contractTypeList)
 							this.inputForm = this.recover(this.inputForm, data)
 							this.inputForm.contractNo=data.no
-							this.inputForm.contractTypes=data.contractTypes
+							this.inputForm.contractTypes=data.contractTypeList
+							this.inputForm.cwWorkClientContactDTOList=data.cwWorkClientContactDTOList
 							if(data.contractType){
 								this.showType(data.contractType)
 							}else {
@@ -891,42 +891,42 @@
 				})
 			},
 			//将合同类型进行绑定
-			// handleChange(value){
-			// 	if(value.length > 0 ){
-			// 		// 处理禁用状态
-			// 		this.$nextTick(() => {
-			// 			var options = []
-			// 			var optionKey = '';
-			// 			this.typeData.forEach(option => {
-			// 				if (value.find(array => array[0] === option.value)) {
-			// 					option.disabled = false
-			// 					optionKey = option.value
-			// 				} else {
-			// 					option.disabled = true
-			// 				}
-			// 				options.push(option)
-			// 			})
-			//
-			// 			this.typeData.forEach(option => {
-			// 				if (option.value === optionKey) {
-			// 					option.children.forEach(child => {
-			// 						child.disabled = false
-			// 					})
-			// 				} else {
-			// 					option.disabled = true
-			// 				}
-			// 				options.push(option)
-			// 			})
-			// 			// 重新进行赋值
-			// 			this.options = options
-			// 		})
-			// 	} else {
-			// 		this.typeData.forEach(option => {
-			// 			option.disabled = false
-			// 		})
-			// 	}
-			//
-			// },
+			handleChange(value){
+				if(value.length > 0 ){
+					// 处理禁用状态
+					this.$nextTick(() => {
+						var options = []
+						var optionKey = '';
+						this.typeData.forEach(option => {
+							if (value.find(array => array[0] === option.value)) {
+								option.disabled = false
+								optionKey = option.value
+							} else {
+								option.disabled = true
+							}
+							options.push(option)
+						})
+
+						this.typeData.forEach(option => {
+							if (option.value === optionKey) {
+								option.children.forEach(child => {
+									child.disabled = false
+								})
+							} else {
+								option.disabled = true
+							}
+							options.push(option)
+						})
+						// 重新进行赋值
+						this.options = options
+					})
+				} else {
+					this.typeData.forEach(option => {
+						option.disabled = false
+					})
+				}
+
+			},
 
 			/*修改或查询详情是合同类型展示处理*/
 			showType(typeList){

+ 2 - 1
src/views/program/configuration/typeFileDict/TypeFileDictForm.vue

@@ -140,7 +140,8 @@
       },
       getFileList (attachmentProjectType, attachmentProjectSort, fileId) {
         this.programTypeFileDictService.getFileList({'attachmentProjectType': attachmentProjectType, 'attachmentProjectSort': attachmentProjectSort, 'fileId': fileId}).then((data) => {
-          this.fileDictList = data
+          console.log('getFileList',data)
+        	this.fileDictList = data
         })
       }
     }

+ 6 - 5
src/views/program/configuration/typeFileDict/TypeFileDictList.vue

@@ -12,7 +12,7 @@
           </el-option>
         </el-select>
       </el-form-item>
-      <el-form-item prop="attachmentProjectSort">
+      <!--<el-form-item prop="attachmentProjectSort">
         <el-select v-model="searchForm.attachmentProjectSort" placeholder="请选择项目类型项目类别" style="width:100%;">
           <el-option
             v-if="searchForm.attachmentProjectType === '1'"
@@ -29,7 +29,7 @@
             :value="item.value">
           </el-option>
         </el-select>
-      </el-form-item>
+      </el-form-item>-->
       <el-form-item>
         <el-button type="primary" @click="refreshList()" icon="el-icon-search">查询</el-button>
         <el-button @click="resetSearch()" icon="el-icon-refresh-right">重置</el-button>
@@ -62,9 +62,9 @@
           :checkbox-config="{}">
           <vxe-column type="seq" width="60" title="序号"></vxe-column>
           <vxe-column type="checkbox" width="50" ></vxe-column>
-          <vxe-column width="180" title="附件名称" field="name" align="left" tree-node></vxe-column>
-          <vxe-column title="必填阶段" field="requiredStage">
-            <template slot-scope="scope">
+          <vxe-column title="附件名称" field="name" align="left" tree-node></vxe-column>
+          <vxe-column width="180" title="必填阶段" field="requiredStage">
+            <template #default="scope">
               {{$dictUtils.getDictLabel("program_required_stage", scope.row.requiredStage, "")}}
             </template>
           </vxe-column>
@@ -142,6 +142,7 @@
       },
       // 获取数据列表
       refreshList () {
+      	console.log('进入方法')
         this.loading = true
         this.programTypeFileDictService.list({
           'current': this.tablePage.currentPage,