|
@@ -15,6 +15,38 @@
|
|
|
<hr>
|
|
|
</div>
|
|
|
<div class="body">
|
|
|
+ <p class="file_title">技术交底书</p>
|
|
|
+ <div class="upload_file customize_file">
|
|
|
+ <div v-if="inputs.tec_file.guid" class="file_show">
|
|
|
+ <myTooltip :content="inputs.tec_file.name ? inputs.tec_file.name : inputs.tec_file.originalName">
|
|
|
+ <div class="noWrap file_name">
|
|
|
+ <i class="el-icon-document" style="margin-right: 10px"></i>
|
|
|
+ <span class="name">{{inputs.tec_file.name ? inputs.tec_file.name : inputs.tec_file.originalName}}</span>
|
|
|
+ </div>
|
|
|
+ </myTooltip>
|
|
|
+ <div class="type">{{ inputs.tec_file.guid ? "已上传" : "待上传" }}</div>
|
|
|
+ <div class="icon" @click="inputs.tec_file = {}">
|
|
|
+ <i class="el-icon-close"></i>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <el-upload
|
|
|
+ v-else
|
|
|
+ ref="upload_file"
|
|
|
+ class="upload-demo"
|
|
|
+ drag
|
|
|
+ action="#"
|
|
|
+ :auto-upload="false"
|
|
|
+ :limit="1"
|
|
|
+ :on-change="(file)=>onChange(file,'inputs.tec_file')"
|
|
|
+ style="width: 100%"
|
|
|
+ >
|
|
|
+ <i class="el-icon-upload"></i>
|
|
|
+ <div class="el-upload__text">
|
|
|
+ <div><em>点击上传</em></div>
|
|
|
+ <div>或将文件拖到此处上传</div>
|
|
|
+ </div>
|
|
|
+ </el-upload>
|
|
|
+ </div>
|
|
|
<p>权利要求内容:</p>
|
|
|
<div>
|
|
|
<el-input type="textarea" style="width:100%" :autosize="{ minRows: 4, maxRows: 20 }" v-model="inputs.claim" placeholder="请输入权利要求"></el-input>
|
|
@@ -101,7 +133,8 @@ import { downLoad2 } from '@/utils'
|
|
|
import { scrollToBottom } from '../components/mixins/scrollToBottom'
|
|
|
const default_input = {
|
|
|
claim:'',
|
|
|
- background:''
|
|
|
+ background:'',
|
|
|
+ tec_file:{},
|
|
|
}
|
|
|
export default {
|
|
|
components: {
|
|
@@ -159,6 +192,46 @@ export default {
|
|
|
},
|
|
|
mounted() {},
|
|
|
methods: {
|
|
|
+ setData(row,field,value){
|
|
|
+ var fieldArray = field.split('.')
|
|
|
+ let current = row || this;
|
|
|
+ // 遍历路径中的每一部分,直到最后一个属性的父对象
|
|
|
+ for (let i = 0; i < fieldArray.length - 1; i++) {
|
|
|
+ // 确保当前对象有下一个属性,否则创建一个空对象(或你需要的任何默认值)
|
|
|
+ if (!current.hasOwnProperty(fieldArray[i])) {
|
|
|
+ current[fieldArray[i]] = {};
|
|
|
+ }
|
|
|
+ current = current[fieldArray[i]];
|
|
|
+ }
|
|
|
+
|
|
|
+ // 给最后一个属性赋值
|
|
|
+ current[fieldArray[fieldArray.length - 1]] = value;
|
|
|
+ },
|
|
|
+ //上传文件
|
|
|
+ onChange(file,field,row){
|
|
|
+ let formData = new FormData()
|
|
|
+ formData.append('sourceId',this.$constants.sourceId)
|
|
|
+ formData.append('files',file.raw)
|
|
|
+
|
|
|
+ var notice_file = {
|
|
|
+ name:file.raw.name
|
|
|
+ }
|
|
|
+ var message = this.$message({
|
|
|
+ message: '文件上传中...',
|
|
|
+ type: 'warning',
|
|
|
+ duration:0
|
|
|
+ });
|
|
|
+ this.$api.uploadFile(formData).then(response=>{
|
|
|
+ if(response.code == 200){
|
|
|
+ let guid = response.data[0]
|
|
|
+ notice_file.guid = guid
|
|
|
+ // this.$set(this,field,notice_file)
|
|
|
+ this.setData(row,field,notice_file)
|
|
|
+ message.close()
|
|
|
+ this.$message.success('文件上传成功')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
changeShowLeft(){
|
|
|
this.$set(this,'showLeft',!this.showLeft)
|
|
|
},
|
|
@@ -205,6 +278,7 @@ export default {
|
|
|
}
|
|
|
this.currentConversation = obj
|
|
|
this.chat_id = obj.conversationId
|
|
|
+ this.$set(this.inputs,'tec_file',obj.systemFile)
|
|
|
this.confession = obj.assoSystemFile || {}
|
|
|
this.getOption()
|
|
|
let content = obj.content
|
|
@@ -260,7 +334,61 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ .assistWritingInstruction{
|
|
|
+ .file_show{
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: space-between;
|
|
|
+ line-height: 100px;
|
|
|
+ .file_name{
|
|
|
+ width: calc(100% - 90px);
|
|
|
+ }
|
|
|
+ .type {
|
|
|
+ min-width:75px;
|
|
|
+ display: block;
|
|
|
+ color: #57a5f7;
|
|
|
+ }
|
|
|
+ .icon {
|
|
|
+ display: none;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .file_show:hover {
|
|
|
+ background: #f4f4f4;
|
|
|
+ .name {
|
|
|
+ color: #57a5f7;
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
+ .type {
|
|
|
+ min-width:75px;
|
|
|
+ display: none;
|
|
|
+ }
|
|
|
+ .icon {
|
|
|
+ display: block;
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .customize_file{
|
|
|
+ .upload-demo{
|
|
|
+ .el-upload{
|
|
|
+ width: 100% !important;
|
|
|
+ }
|
|
|
+
|
|
|
+ .el-upload-dragger {
|
|
|
+ width: 100% !important;
|
|
|
+ height:100px !important;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ .el-icon-upload{
|
|
|
+ font-size: 40px !important;
|
|
|
+ margin: 0 25px !important;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
</style>
|
|
|
+
|
|
|
<style lang="scss" scoped>
|
|
|
.assistWritingInstruction{
|
|
|
position: relative;
|