拆分详情增加
This commit is contained in:
@@ -49,9 +49,12 @@
|
||||
<a-icon type="plus" />
|
||||
{{ $t('add') }}
|
||||
</div>
|
||||
<div class="operator-text" @click="handleImportManage">
|
||||
<a-icon type="import" :rotate="-90" />
|
||||
{{ $t('import') }}
|
||||
<div class="operator-text upload-split" @click="handleImportManage">
|
||||
<a-icon type="import" :rotate="-90" v-if="!uploadMenuId" />
|
||||
{{ uploadMenuId===''? $t('import'):'' }}
|
||||
<upload v-if="menuId" ref="uploadSplit":infoId="infoId" :menuId="uploadMenuId" @uploadSuccess="uploadSuccess"></upload>
|
||||
<!-- <ImportFile :url="url"/>-->
|
||||
|
||||
</div>
|
||||
<div class="operator-text" @click="handleExportManage">
|
||||
<a-icon type="export" :rotate="-90"/>
|
||||
@@ -149,8 +152,8 @@
|
||||
:ids="ids">
|
||||
</split-bat-form>
|
||||
</a-modal>
|
||||
<split-add-form ref="splitForm" v-if="addVisible" :addVisible="addVisible" :formTitle="formTitle" :flag="'4'" :url="url" :infoId="infoId" :menuId="menuId" :itemId="itemId" :item="item" @closeVisible="closeVisible"></split-add-form>
|
||||
<upload ref="uploadSplit" @uploadSuccess="uploadSuccess"></upload>
|
||||
<split-add-form ref="splitForm" v-if="addVisible" :addVisible="addVisible" :formTitle="formTitle" :flag="'4'" :url="url" :infoId="infoId" :menuId="menuId" :itemId="itemId" :itemVal="itemVal" @closeVisible="closeVisible" @sumber="sumber"></split-add-form>
|
||||
|
||||
</div>
|
||||
</a-card>
|
||||
</div>
|
||||
@@ -160,9 +163,10 @@
|
||||
import { getAction, postAction, deleteAction, putAction, downloadFile } from '@/api/manage'
|
||||
import search from '@/components/search/index'
|
||||
import TableData from '@/components/SplitDetailTable/index'
|
||||
import upload from '@/components/uploadFile/file.vue'
|
||||
// import upload from '@/components/uploadFile/file.vue'
|
||||
import SplitBatForm from '@/components/SplitBatForm/index'
|
||||
import SplitAddForm from './SplitAddForm'
|
||||
import upload from '@/components/SplitImport/index'
|
||||
import axios from 'axios'
|
||||
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
||||
import eventBUs from '@/common/event'
|
||||
@@ -174,7 +178,8 @@
|
||||
TableData,
|
||||
SplitBatForm,
|
||||
SplitAddForm,
|
||||
upload
|
||||
upload,
|
||||
// ImportFile
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -193,52 +198,11 @@
|
||||
searchValue: '',
|
||||
autoExpandParent: true,
|
||||
dataList: [],
|
||||
contentValue:'12. 附加光反射器,可以是贴纸,具有以下规格: a) 正面左右两侧呈白色或淡黄色; b) 背面左右两侧呈红色; c) 防护板下面是白色;和 d) 高至少400(四百)毫米和宽至少100(一百)毫米; 附加光反射器,可以是贴纸,具有以下规格: a) 正面左右两侧呈白色或淡黄色; b) 背面左右两侧呈红色; c) 防护板下面是白色;和 d) 高至少400(四百)毫米和宽至少100(一百)毫米;',
|
||||
contentValue:'',
|
||||
gData: [],
|
||||
selecIds:[],
|
||||
loading:false,
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('clauseNo'),
|
||||
dataIndex: 'serialNumber',
|
||||
key: 'serialNumber',
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: this.$t('clauseName'),
|
||||
dataIndex: 'serialName',
|
||||
key: 'serialName',
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: this.$t('clauseContent'),
|
||||
dataIndex: 'serialContent',
|
||||
key: 'serialContent',
|
||||
align: "center",
|
||||
width: '50%',
|
||||
scopedSlots: {customRender: 'clauseContent'},
|
||||
|
||||
},
|
||||
{
|
||||
title: this.$t('functionalAreas'),
|
||||
dataIndex: 'functionArea',
|
||||
key: 'functionArea',
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: this.$t('technicalField'),
|
||||
dataIndex: 'tecArea',
|
||||
key: 'tecArea',
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: this.$t('operation'),
|
||||
dataIndex: 'action',
|
||||
scopedSlots: {customRender: 'action'},
|
||||
align: "center",
|
||||
width: 120
|
||||
}
|
||||
],
|
||||
columns: [],
|
||||
addVisible:false,
|
||||
attId:'',
|
||||
data:[],
|
||||
@@ -266,7 +230,7 @@
|
||||
infoId:'',
|
||||
menuId:'',
|
||||
itemId:'',
|
||||
item:{},
|
||||
itemVal:{},
|
||||
// NodeTreeItemVisible:false,
|
||||
flag:false, //提交按钮标识
|
||||
isEdit:false,
|
||||
@@ -287,6 +251,8 @@
|
||||
getAddForm: 'language/switch/getForm', // 表单的字段
|
||||
addInfo: '/jero-boot/split/sarFileSplitItems/addSplitItems', //新增
|
||||
updateInfo:'/jero-boot/split/sarFileSplitItems/updateSplitItems', //编辑
|
||||
getDocumentInfo:'split/sarFileSplitInfo/queryById',
|
||||
importZipUrl: '/split/sarFileSplitItems/importSplitItems',//导入
|
||||
},
|
||||
urlBatSet:{
|
||||
getAddForm:'split/sarFileSplitItems/getBatchSetForm',
|
||||
@@ -295,6 +261,8 @@
|
||||
batSetVisible:false, //批量设置弹框显示
|
||||
ids:'',
|
||||
token:Vue.ls.get(ACCESS_TOKEN),
|
||||
// upAccept:'.zip', //导入文件类型
|
||||
uploadMenuId:''
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -307,7 +275,7 @@
|
||||
methods: {
|
||||
//显示条款内容弹框
|
||||
showContent(){
|
||||
this.contentVisible=true
|
||||
// this.contentVisible=true
|
||||
},
|
||||
//关闭条款内容弹框
|
||||
handleCancel(){
|
||||
@@ -441,7 +409,8 @@
|
||||
//选择树节点
|
||||
onSelect(selectedKeys){
|
||||
this.menuId=selectedKeys[0]
|
||||
eventBUs.$emit('searchReset')
|
||||
this.uploadMenuId=selectedKeys[0]
|
||||
// eventBUs.$emit('searchReset')
|
||||
// console.log('sele',selectedKeys)
|
||||
},
|
||||
//树形新增
|
||||
@@ -624,7 +593,7 @@
|
||||
this.$refs.splitForm.add()
|
||||
})
|
||||
}else{
|
||||
this.$message.warning('请选择要添加条款的目录位置')
|
||||
this.$message.warning(this.$t('selectDirectoryTerms'))
|
||||
}
|
||||
},
|
||||
closeVisible(val){
|
||||
@@ -632,7 +601,10 @@
|
||||
},
|
||||
//导入
|
||||
handleImportManage(){
|
||||
this.$refs.uploadSplit.visible=true
|
||||
if(!this.menuId){
|
||||
this.$message.warning(this.$t('selectDirectoryTerms'))
|
||||
}
|
||||
|
||||
},
|
||||
//上传成功
|
||||
uploadSuccess(data){
|
||||
@@ -646,7 +618,14 @@
|
||||
},
|
||||
//导出
|
||||
handleExportManage(){
|
||||
let name = this.$t('DocumentSplitting')+'.zip'
|
||||
let query = {
|
||||
infoId:this.infoId,
|
||||
exportName:name,
|
||||
idList:this.selectedRowKeys.join(',')
|
||||
}
|
||||
|
||||
downloadFile('split/sarFileSplitItems/exportSplitInfoZip', name, query)
|
||||
},
|
||||
//模板下载
|
||||
handleDownManage(){
|
||||
@@ -789,15 +768,18 @@
|
||||
},
|
||||
//编辑
|
||||
editClick(val){
|
||||
// console.log('val',val)
|
||||
this.formTitle=this.$t('edit')
|
||||
this.item=val
|
||||
this.itemVal=val
|
||||
this.itemId=val.id
|
||||
this.addVisible=true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.splitForm.edit(val)
|
||||
})
|
||||
},
|
||||
//保存成功
|
||||
sumber(){
|
||||
this.loadMenuData()
|
||||
},
|
||||
//删除
|
||||
deleteClick(val){
|
||||
let params={
|
||||
@@ -1076,6 +1058,11 @@
|
||||
min-width: 300px;
|
||||
}
|
||||
}
|
||||
.upload-split{
|
||||
.ant-upload{
|
||||
color:#040B29;
|
||||
}
|
||||
}
|
||||
}
|
||||
.show-setting{
|
||||
.ant-modal{
|
||||
|
||||
Reference in New Issue
Block a user