市场认证清单-维护清单-交付物模板
This commit is contained in:
@@ -145,6 +145,25 @@
|
|||||||
</div>
|
</div>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col :span="12">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<span class="title-text-text"
|
||||||
|
:title="$t('deliverableTemplate')">{{$t('deliverableTemplate')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel" prop="deliverableTemplate">
|
||||||
|
<a-button type="primary" class="button-text"
|
||||||
|
@click="clickButtonToUpload('deliverableTemplate',index,true)">
|
||||||
|
{{ (item.deliverableTemplate === 'null' || item.deliverableTemplate === ''
|
||||||
|
||
|
||||||
|
item.deliverableTemplate == null) ? $t('clickUpload') : $t('viewUploadedFiles')
|
||||||
|
}}
|
||||||
|
</a-button>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
</div>
|
</div>
|
||||||
</a-form-model>
|
</a-form-model>
|
||||||
</a-spin>
|
</a-spin>
|
||||||
@@ -154,12 +173,14 @@
|
|||||||
</div>
|
</div>
|
||||||
</a-drawer>
|
</a-drawer>
|
||||||
<codeNumber ref="codeNumber" @regulation="regulation" />
|
<codeNumber ref="codeNumber" @regulation="regulation" />
|
||||||
|
<uploadFile ref="uploadFile" @uploadSuccess="uploadSuccess"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import codeNumber from './codeNumber'
|
import codeNumber from './codeNumber'
|
||||||
|
import uploadFile from '@/components/uploadFile/file'
|
||||||
import { getAction, postAction } from '@/api/manage'
|
import { getAction, postAction } from '@/api/manage'
|
||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
|
|
||||||
@@ -167,7 +188,8 @@ export default {
|
|||||||
name:"addModel",
|
name:"addModel",
|
||||||
props: ['url'],
|
props: ['url'],
|
||||||
components:{
|
components:{
|
||||||
codeNumber
|
codeNumber,
|
||||||
|
uploadFile
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -299,7 +321,45 @@ export default {
|
|||||||
this.formInline = {... this.formInline}
|
this.formInline = {... this.formInline}
|
||||||
this.$refs.ruleForm.validateField(['serialNumber'])
|
this.$refs.ruleForm.validateField(['serialNumber'])
|
||||||
})
|
})
|
||||||
}
|
},
|
||||||
|
//交付物模板上传
|
||||||
|
clickButtonToUpload(item, index,isTrue) {
|
||||||
|
this.numIndex = index
|
||||||
|
this.$refs.uploadFile.perentHandleFunc()
|
||||||
|
this.$refs.uploadFile.visible = true
|
||||||
|
this.uploadName = item
|
||||||
|
let ids = ''
|
||||||
|
console.log(index)
|
||||||
|
if (isTrue){
|
||||||
|
ids = this.formInline.dataList[index][item]
|
||||||
|
}else{
|
||||||
|
ids = this.formInline[item]
|
||||||
|
}
|
||||||
|
console.log(this.formInline,1111)
|
||||||
|
getAction('sys/common/getFileInfos', { id: ids }).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.$refs.uploadFile.perentHandleFunc(res.result)
|
||||||
|
} else {
|
||||||
|
this.$refs.uploadFile.perentHandleFunc()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/** 上传文件的回调 */
|
||||||
|
uploadSuccess(data) {
|
||||||
|
let attIdList = []
|
||||||
|
if (data && data.length > 0) {
|
||||||
|
data.map(item => {
|
||||||
|
attIdList.push(item.id || data.name)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
/** 赋值给当前对应的表单文件 */
|
||||||
|
if (this.formInline.id) {
|
||||||
|
this.formInline[this.uploadName] = attIdList.join(',')
|
||||||
|
} else {
|
||||||
|
this.formInline.dataList[this.numIndex][this.uploadName] = attIdList.join(',')
|
||||||
|
}
|
||||||
|
this.formInline = { ...this.formInline }
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -366,4 +426,13 @@ export default {
|
|||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
margin-right: 4px;
|
margin-right: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.button-text {
|
||||||
|
height: 38px;
|
||||||
|
width: calc(100% - 100px);
|
||||||
|
line-height: 38px;
|
||||||
|
background: #fff;
|
||||||
|
border: 1px #00B3BE solid;
|
||||||
|
color: #00B3BE;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -127,6 +127,25 @@
|
|||||||
</div>
|
</div>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col :span="12">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<span class="title-text-text"
|
||||||
|
:title="$t('deliverableTemplate')">{{$t('deliverableTemplate')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel" prop="deliverableTemplate">
|
||||||
|
<a-button type="primary" class="button-text"
|
||||||
|
@click="clickButtonToUpload('deliverableTemplate')">
|
||||||
|
{{ (formInline.deliverableTemplate === 'null' || formInline.deliverableTemplate === ''
|
||||||
|
||
|
||||||
|
formInline.deliverableTemplate == null) ? $t('clickUpload') : $t('viewUploadedFiles')
|
||||||
|
}}
|
||||||
|
</a-button>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
</a-form-model>
|
</a-form-model>
|
||||||
</a-spin>
|
</a-spin>
|
||||||
<div class="drawer-bootom-button">
|
<div class="drawer-bootom-button">
|
||||||
@@ -135,18 +154,21 @@
|
|||||||
</div>
|
</div>
|
||||||
</a-drawer>
|
</a-drawer>
|
||||||
<codeNumber ref="codeNumber" @regulation="regulation" />
|
<codeNumber ref="codeNumber" @regulation="regulation" />
|
||||||
|
<uploadFile ref="uploadFile" @uploadSuccess="uploadSuccess"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getAction, postAction, downloadFile, deleteAction } from '@/api/manage'
|
import { getAction, postAction, downloadFile, deleteAction } from '@/api/manage'
|
||||||
import codeNumber from './codeNumber'
|
import codeNumber from './codeNumber'
|
||||||
|
import uploadFile from '@/components/uploadFile/file'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name:'editModel',
|
name:'editModel',
|
||||||
props: ['url'],
|
props: ['url'],
|
||||||
components:{
|
components:{
|
||||||
codeNumber
|
codeNumber,
|
||||||
|
uploadFile
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -276,7 +298,44 @@ export default {
|
|||||||
this.formInline = {... this.formInline}
|
this.formInline = {... this.formInline}
|
||||||
this.$refs.ruleForm.validateField(['serialNumber'])
|
this.$refs.ruleForm.validateField(['serialNumber'])
|
||||||
})
|
})
|
||||||
}
|
},
|
||||||
|
//交付物模板
|
||||||
|
clickButtonToUpload(item, index,isTrue) {
|
||||||
|
this.numIndex = index
|
||||||
|
this.$refs.uploadFile.perentHandleFunc()
|
||||||
|
this.$refs.uploadFile.visible = true
|
||||||
|
this.uploadName = item
|
||||||
|
let ids = ''
|
||||||
|
console.log(index)
|
||||||
|
if (isTrue){
|
||||||
|
ids = this.formInline.dataList[index][item]
|
||||||
|
}else{
|
||||||
|
ids = this.formInline[item]
|
||||||
|
}
|
||||||
|
getAction('sys/common/getFileInfos', { id: ids }).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.$refs.uploadFile.perentHandleFunc(res.result)
|
||||||
|
} else {
|
||||||
|
this.$refs.uploadFile.perentHandleFunc()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/** 上传文件的回调 */
|
||||||
|
uploadSuccess(data) {
|
||||||
|
let attIdList = []
|
||||||
|
if (data && data.length > 0) {
|
||||||
|
data.map(item => {
|
||||||
|
attIdList.push(item.id || data.name)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
/** 赋值给当前对应的表单文件 */
|
||||||
|
if (this.formInline.id) {
|
||||||
|
this.formInline[this.uploadName] = attIdList.join(',')
|
||||||
|
} else {
|
||||||
|
this.formInline.dataList[this.numIndex][this.uploadName] = attIdList.join(',')
|
||||||
|
}
|
||||||
|
this.formInline = { ...this.formInline }
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -333,4 +392,13 @@ export default {
|
|||||||
background: #fff;
|
background: #fff;
|
||||||
border-radius: 0 0 2px 2px;
|
border-radius: 0 0 2px 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.button-text {
|
||||||
|
height: 38px;
|
||||||
|
width: calc(100% - 100px);
|
||||||
|
line-height: 38px;
|
||||||
|
background: #fff;
|
||||||
|
border: 1px #00B3BE solid;
|
||||||
|
color: #00B3BE;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
+26
-3
@@ -206,9 +206,17 @@
|
|||||||
@change="tableOnChange"
|
@change="tableOnChange"
|
||||||
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||||
:columns="columns">
|
:columns="columns">
|
||||||
<span slot="item" slot-scope="text,record">
|
<span slot="deliverableTemplate" slot-scope="text,result">
|
||||||
<a @click="itemClick(record)">{{text}}</a>
|
<span class="viewFile"
|
||||||
|
@click="viewFileClick(result.deliverableTemplate)"
|
||||||
|
v-if="result.deliverableTemplate">
|
||||||
|
{{$t('viewFile')}}
|
||||||
|
</span>
|
||||||
|
<span v-else>--</span>
|
||||||
</span>
|
</span>
|
||||||
|
<!-- <span slot="item" slot-scope="text,record">-->
|
||||||
|
<!-- <a @click="itemClick(record)">{{text}}</a>-->
|
||||||
|
<!-- </span>-->
|
||||||
<span slot="operation" slot-scope="text,record">
|
<span slot="operation" slot-scope="text,record">
|
||||||
<a v-if="isTrue"
|
<a v-if="isTrue"
|
||||||
class="text-operation"
|
class="text-operation"
|
||||||
@@ -236,6 +244,7 @@
|
|||||||
<addModel :url="url" ref="addModelRef" @addModelList="addModelList"/>
|
<addModel :url="url" ref="addModelRef" @addModelList="addModelList"/>
|
||||||
<edit-model :url="url" ref="editModelRef" @editModelList="editModelList"></edit-model>
|
<edit-model :url="url" ref="editModelRef" @editModelList="editModelList"></edit-model>
|
||||||
<bat-setting :url="url" ref="batSettingRef" @batSettingList="batSettingList"></bat-setting>
|
<bat-setting :url="url" ref="batSettingRef" @batSettingList="batSettingList"></bat-setting>
|
||||||
|
<viewFileModel ref="viewFileModelRef"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -250,6 +259,7 @@
|
|||||||
import addModel from '../components/addModel'
|
import addModel from '../components/addModel'
|
||||||
import editModel from '../components/editModel'
|
import editModel from '../components/editModel'
|
||||||
import batSetting from '../components/batSetting'
|
import batSetting from '../components/batSetting'
|
||||||
|
import viewFileModel from '@/components/viewFileModel/index'
|
||||||
import { ResizeHeader, ResizeColumnProvide } from '@/mixins/header'
|
import { ResizeHeader, ResizeColumnProvide } from '@/mixins/header'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -261,7 +271,8 @@
|
|||||||
transferList,
|
transferList,
|
||||||
addModel,
|
addModel,
|
||||||
editModel,
|
editModel,
|
||||||
batSetting
|
batSetting,
|
||||||
|
viewFileModel
|
||||||
},
|
},
|
||||||
mixins: [ResizeHeader, ResizeColumnProvide],
|
mixins: [ResizeHeader, ResizeColumnProvide],
|
||||||
data() {
|
data() {
|
||||||
@@ -340,6 +351,14 @@
|
|||||||
width: 330,
|
width: 330,
|
||||||
ellipsis: true
|
ellipsis: true
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: this.$t('deliverableTemplate'),
|
||||||
|
align: 'left',
|
||||||
|
dataIndex: 'deliverableTemplate',
|
||||||
|
width: 330,
|
||||||
|
ellipsis: true,
|
||||||
|
scopedSlots: { customRender: 'deliverableTemplate' }
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('operation'),
|
title: this.$t('operation'),
|
||||||
align: 'left',
|
align: 'left',
|
||||||
@@ -536,6 +555,10 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
// 交付物模板
|
||||||
|
viewFileClick(item) {
|
||||||
|
this.$refs.viewFileModelRef.clickButtonToUpload(item)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user