拆分详情表格增加编辑
This commit is contained in:
@@ -4,9 +4,9 @@
|
|||||||
<a-table
|
<a-table
|
||||||
class="table"
|
class="table"
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
:row-selection="{ fixed: true, selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||||
:pagination="false"
|
:pagination="false"
|
||||||
:scroll="{x: 600}"
|
:scroll="{x: true}"
|
||||||
:data-source="dataSource"
|
:data-source="dataSource"
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
@@ -20,6 +20,7 @@
|
|||||||
<span class="content-show" href="javascript:;" @click="showContent">{{record.iterms_conditions&&record.iterms_conditions!=='null'?record.iterms_conditions.replace(/<.*?>/ig, ' ') : ''}}</span>
|
<span class="content-show" href="javascript:;" @click="showContent">{{record.iterms_conditions&&record.iterms_conditions!=='null'?record.iterms_conditions.replace(/<.*?>/ig, ' ') : ''}}</span>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<span slot="operation" slot-scope="record" class="operate">
|
<span slot="operation" slot-scope="record" class="operate">
|
||||||
<a v-for="(ol,index) in OperationList"
|
<a v-for="(ol,index) in OperationList"
|
||||||
@click="OperationClick(ol,record)">
|
@click="OperationClick(ol,record)">
|
||||||
@@ -28,6 +29,11 @@
|
|||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</span>
|
||||||
|
<span slot="urlClick" slot-scope="text,record">
|
||||||
|
<a class="text" :title="text" @click="urlClick(text)">
|
||||||
|
{{text && text.length > 18?text.slice(0,17)+'...':text}}
|
||||||
|
</a>
|
||||||
|
</span>
|
||||||
</a-table>
|
</a-table>
|
||||||
</div>
|
</div>
|
||||||
<div class="page" v-if="dataSource.length > 0">
|
<div class="page" v-if="dataSource.length > 0">
|
||||||
@@ -156,8 +162,13 @@
|
|||||||
customRender: 'showContent'
|
customRender: 'showContent'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (res.urlClick) {
|
||||||
|
this.columns[index].scopedSlots = {
|
||||||
|
customRender: 'urlClick'
|
||||||
|
}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
// console.log('columns',this.columns)
|
|
||||||
let width = 0
|
let width = 0
|
||||||
if (this.OperationList.length > 0) {
|
if (this.OperationList.length > 0) {
|
||||||
for (let i = 0; i < this.OperationList.length; i++) {
|
for (let i = 0; i < this.OperationList.length; i++) {
|
||||||
@@ -173,7 +184,7 @@
|
|||||||
scopedSlots: { customRender: 'operation' }
|
scopedSlots: { customRender: 'operation' }
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
console.log('columns',this.columns)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -183,7 +194,7 @@
|
|||||||
this.getTableList()
|
this.getTableList()
|
||||||
},
|
},
|
||||||
getTableList() {
|
getTableList() {
|
||||||
console.log('this.searchParmestable',this.searchParmes)
|
// console.log('this.searchParmestable',this.searchParmes)
|
||||||
let pageNo = JSON.parse(JSON.stringify(this.pageNo))
|
let pageNo = JSON.parse(JSON.stringify(this.pageNo))
|
||||||
let pageSize = JSON.parse(JSON.stringify(this.pageSize))
|
let pageSize = JSON.parse(JSON.stringify(this.pageSize))
|
||||||
let params = {
|
let params = {
|
||||||
@@ -235,6 +246,9 @@
|
|||||||
},
|
},
|
||||||
showContent(item, index) {
|
showContent(item, index) {
|
||||||
this.$emit('showContent', item)
|
this.$emit('showContent', item)
|
||||||
|
},
|
||||||
|
urlClick(item) {
|
||||||
|
window.open(item)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
:showUploadList="false"
|
:showUploadList="false"
|
||||||
@change="handleChange">
|
@change="handleChange">
|
||||||
<!-- <p><a-icon style="font-size: 67px;color: #c0c4cc;" type="cloud-upload" /></p>-->
|
<!-- <p><a-icon style="font-size: 67px;color: #c0c4cc;" type="cloud-upload" /></p>-->
|
||||||
<a-icon type="import" :rotate="-90" />{{ $t('import') }}
|
<a-icon type="import" :rotate="-90" class="import" />{{ $t('import') }}
|
||||||
<!-- <a-button type="primary" ghost class="ant-upload-text" style="font-size: 14px;line-height: 30px">{{$t('clickUpload')}}</a-button>-->
|
<!-- <a-button type="primary" ghost class="ant-upload-text" style="font-size: 14px;line-height: 30px">{{$t('clickUpload')}}</a-button>-->
|
||||||
</a-upload>
|
</a-upload>
|
||||||
<!-- </a-modal>-->
|
<!-- </a-modal>-->
|
||||||
@@ -96,12 +96,17 @@
|
|||||||
// console.log('rrr',this.myfileList)
|
// console.log('rrr',this.myfileList)
|
||||||
},
|
},
|
||||||
handleChange(info) {
|
handleChange(info) {
|
||||||
console.log('info',info)
|
// console.log('info',info)
|
||||||
let { file } = info;
|
let { file } = info;
|
||||||
const status = info.file.status;
|
const status = info.file.status;
|
||||||
info.fileList.forEach((val,index)=>{
|
info.fileList.forEach((val,index)=>{
|
||||||
if(val.response && !val.response.result){
|
if(val.response && !val.response.result){
|
||||||
this.$message.success(val.response.message);
|
if(val.response.success){
|
||||||
|
this.$message.success(val.response.message);
|
||||||
|
}else{
|
||||||
|
this.$message.error(val.response.message);
|
||||||
|
}
|
||||||
|
|
||||||
info.fileList.splice(index,1)
|
info.fileList.splice(index,1)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -44,7 +44,7 @@
|
|||||||
<span>{{item.db_field_txt}}</span>
|
<span>{{item.db_field_txt}}</span>
|
||||||
</div>
|
</div>
|
||||||
<a-range-picker class="box-input" v-model="queryParam[item.db_field_name]"
|
<a-range-picker class="box-input" v-model="queryParam[item.db_field_name]"
|
||||||
:placeholder="$t('PleaseSelect')+item.db_field_txt"
|
|
||||||
@change="onChange(item.db_field_name)"></a-range-picker>
|
@change="onChange(item.db_field_name)"></a-range-picker>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="box-title-text" v-else-if="item.field_show_type == '5'">-->
|
<!-- <div class="box-title-text" v-else-if="item.field_show_type == '5'">-->
|
||||||
@@ -104,13 +104,13 @@
|
|||||||
:placeholder="$t('PleaseSelect')+item.db_field_txt" :type="'select'"
|
:placeholder="$t('PleaseSelect')+item.db_field_txt" :type="'select'"
|
||||||
:triggerChange="false" :dictCode="item.dict_field"/>
|
:triggerChange="false" :dictCode="item.dict_field"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="box-title-text" v-else-if="item.field_show_type == '6' || item.field_show_type == '5'">
|
<!-- <div class="box-title-text" v-else-if="item.field_show_type == '6' || item.field_show_type == '5'">-->
|
||||||
<div class="title-text" :title="item.db_field_txt">
|
<!-- <div class="title-text" :title="item.db_field_txt">-->
|
||||||
<span>{{item.db_field_txt}}</span>
|
<!-- <span>{{item.db_field_txt}}</span>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
<a-range-picker class="box-input" v-model="queryParam[item.db_field_name]"
|
<!-- <a-range-picker class="box-input" v-model="queryParam[item.db_field_name]"-->
|
||||||
@change="onChange(item.db_field_name)"></a-range-picker>
|
<!-- @change="onChange(item.db_field_name)"></a-range-picker>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
<!-- <div class="box-title-text" v-else-if="item.field_show_type == '5'">-->
|
<!-- <div class="box-title-text" v-else-if="item.field_show_type == '5'">-->
|
||||||
<!-- <div class="title-text" :title="item.db_field_txt">-->
|
<!-- <div class="title-text" :title="item.db_field_txt">-->
|
||||||
<!-- <span>{{item.db_field_txt}}</span>-->
|
<!-- <span>{{item.db_field_txt}}</span>-->
|
||||||
@@ -137,7 +137,7 @@
|
|||||||
<a-button class="box-button" type="primary" @click="searchQuery">{{$t('query')}}</a-button>
|
<a-button class="box-button" type="primary" @click="searchQuery">{{$t('query')}}</a-button>
|
||||||
<a-button class="box-button" style="margin-left: 8px" @click="searchReset">{{$t('reset')}}</a-button>
|
<a-button class="box-button" style="margin-left: 8px" @click="searchReset">{{$t('reset')}}</a-button>
|
||||||
<a @click="handleToggleSearch" style="margin-left: 8px" v-if="searchList.length > 3">
|
<a @click="handleToggleSearch" style="margin-left: 8px" v-if="searchList.length > 3">
|
||||||
{{ !toggleSearchStatus ? $t('open') : $t('away') }}
|
<span class="icon-open">{{ !toggleSearchStatus ? $t('open') : $t('away') }}</span>
|
||||||
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
|
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
|
||||||
</a>
|
</a>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -238,7 +238,7 @@
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style lang="less" scoped>
|
||||||
.box-title-text {
|
.box-title-text {
|
||||||
line-height: 1.4;
|
line-height: 1.4;
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -272,4 +272,18 @@
|
|||||||
height: 38px;
|
height: 38px;
|
||||||
/*margin-top: 2px;*/
|
/*margin-top: 2px;*/
|
||||||
}
|
}
|
||||||
|
.table-page-search-submitButtons{
|
||||||
|
a{
|
||||||
|
display: flex;
|
||||||
|
justify-content: start;
|
||||||
|
line-height: 38px;
|
||||||
|
}
|
||||||
|
.icon-open{
|
||||||
|
display: inline-block;
|
||||||
|
min-width: 30px;
|
||||||
|
}
|
||||||
|
i{
|
||||||
|
line-height: 38px;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -187,7 +187,7 @@
|
|||||||
pageNo: pageNo + '',
|
pageNo: pageNo + '',
|
||||||
pageSize: pageSize + ''
|
pageSize: pageSize + ''
|
||||||
}
|
}
|
||||||
console.log('parmsss',params)
|
// console.log('parmsss',params)
|
||||||
this.loading = true
|
this.loading = true
|
||||||
getAction(this.url.tableList, params).then((res) => {
|
getAction(this.url.tableList, params).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
|
|||||||
@@ -133,14 +133,14 @@
|
|||||||
|
|
||||||
</a-col>
|
</a-col>
|
||||||
<span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
|
<span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
|
||||||
<a-col :md="6" :sm="24">
|
<a-col :md="6" :sm="24">
|
||||||
<a-button class="box-button" type="primary" @click="searchQuery">{{$t('query')}}</a-button>
|
<a-button class="box-button" type="primary" @click="searchQuery">{{$t('query')}}</a-button>
|
||||||
<a-button class="box-button" style="margin-left: 8px" @click="searchReset">{{$t('reset')}}</a-button>
|
<a-button class="box-button" style="margin-left: 8px" @click="searchReset">{{$t('reset')}}</a-button>
|
||||||
<a @click="handleToggleSearch" style="margin-left: 8px" v-if="searchList.length > 3">
|
<a @click="handleToggleSearch" style="margin-left: 8px" v-if="searchList.length > 3">
|
||||||
{{ !toggleSearchStatus ? $t('open') : $t('away') }}
|
{{ !toggleSearchStatus ? $t('open') : $t('away') }}
|
||||||
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
|
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
|
||||||
</a>
|
</a>
|
||||||
</a-col>
|
</a-col>
|
||||||
</span>
|
</span>
|
||||||
</a-row>
|
</a-row>
|
||||||
</a-form>
|
</a-form>
|
||||||
|
|||||||
@@ -315,7 +315,10 @@
|
|||||||
detailClick(val){
|
detailClick(val){
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path:'/docManage/splitting/splitDetail',
|
path:'/docManage/splitting/splitDetail',
|
||||||
query: { infoId:val.id }
|
query: {
|
||||||
|
infoId:val.id,
|
||||||
|
infoNumber:val.serialNumber
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -93,7 +93,6 @@
|
|||||||
</div>
|
</div>
|
||||||
<a-form-model-item class="itemModel" :prop="item.db_field_name">
|
<a-form-model-item class="itemModel" :prop="item.db_field_name">
|
||||||
<a-date-picker class="box-input"
|
<a-date-picker class="box-input"
|
||||||
:placeholder="$t('PleaseSelect')+item.db_field_txt"
|
|
||||||
@change="dateChange(item)"
|
@change="dateChange(item)"
|
||||||
format="YYYY-MM-DD"
|
format="YYYY-MM-DD"
|
||||||
v-model="formInline[item.db_field_name]"
|
v-model="formInline[item.db_field_name]"
|
||||||
@@ -251,12 +250,13 @@
|
|||||||
<a-row :gutter="24" class="split-content" id="split-content" v-for="(item, index) in contentList" :key="index">
|
<a-row :gutter="24" class="split-content" id="split-content" v-for="(item, index) in contentList" :key="index">
|
||||||
<div class="split-row">
|
<div class="split-row">
|
||||||
<div class="row-left">
|
<div class="row-left">
|
||||||
<a-textarea v-if="item.type==='TEXT'" v-model="item.itemContent" :placeholder="$t('pleaseEnter')+$t('content')" auto-size />
|
<a-textarea v-if="item.type==='TEXT'" v-model="item.itemContent" :placeholder="$t('pleaseEnter')+$t('content')" />
|
||||||
<img v-if="item.type==='IMG'" :src="item.thumbUrl?item.thumbUrl:item.itemContent" alt="" @click="preImg(item)">
|
<img v-if="item.type==='IMG'" :src="item.thumbUrl?item.thumbUrl:item.itemContent" alt="" @click="preImg(item)">
|
||||||
<div v-if="item.type==='TABLE'" v-html="item.itemContent" class="item-table"></div>
|
<div v-if="item.type==='TABLE'" v-html="item.itemContent" class="item-table"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row-right">
|
<div class="row-right">
|
||||||
<a-button class="row-btn-add" @click="splitAdd(index)">{{$t('Add')}}</a-button>
|
<a-button class="row-btn-add" @click="splitAdd(index)">{{$t('Add')}}</a-button>
|
||||||
|
<a-button class="row-btn-edit" @click="splitEdit(index,item)" v-if="item.type=='TABLE'">{{$t('edit')}}</a-button>
|
||||||
<a-button @click="splitDelete(item,index)">{{$t('delete')}}</a-button>
|
<a-button @click="splitDelete(item,index)">{{$t('delete')}}</a-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -541,6 +541,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
numberFlag:false,
|
numberFlag:false,
|
||||||
|
itemVal:{}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
props:{
|
props:{
|
||||||
@@ -572,10 +573,10 @@
|
|||||||
type:String,
|
type:String,
|
||||||
default:''
|
default:''
|
||||||
},
|
},
|
||||||
itemVal:{
|
// itemVal:{
|
||||||
type:Object,
|
// type:Object,
|
||||||
default:{}
|
// default:{}
|
||||||
}
|
// }
|
||||||
},
|
},
|
||||||
watch:{
|
watch:{
|
||||||
selected(val){
|
selected(val){
|
||||||
@@ -635,6 +636,14 @@
|
|||||||
this.addIndex=val
|
this.addIndex=val
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
//编辑按钮
|
||||||
|
splitEdit(index,item){
|
||||||
|
this.tableVisible=true
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.ueditor.setContent(item.itemContent)
|
||||||
|
})
|
||||||
|
console.log('ineciem',index,item)
|
||||||
|
},
|
||||||
//删除按钮
|
//删除按钮
|
||||||
splitDelete(item,index){
|
splitDelete(item,index){
|
||||||
// console.log('itme',item,this.contentList)
|
// console.log('itme',item,this.contentList)
|
||||||
@@ -663,6 +672,7 @@
|
|||||||
} else {
|
} else {
|
||||||
url = this.url.addInfo
|
url = this.url.addInfo
|
||||||
}
|
}
|
||||||
|
|
||||||
let params = JSON.parse(JSON.stringify(this.formInline))
|
let params = JSON.parse(JSON.stringify(this.formInline))
|
||||||
|
|
||||||
Object.keys(params).forEach(res => {
|
Object.keys(params).forEach(res => {
|
||||||
@@ -671,12 +681,19 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
if(JSON.stringify(this.itemVal)=="{}"){
|
|
||||||
params.info_id=this.infoId
|
params.info_id=this.infoId
|
||||||
params.menu_id=this.menuId
|
params.menu_id=this.menuId
|
||||||
}
|
|
||||||
// params.menuId=this.menuId
|
let contentList=JSON.parse(JSON.stringify(this.contentList))
|
||||||
params.itemValEOList=this.contentList
|
contentList.forEach((item,index)=>{
|
||||||
|
if(item.type==='IMG'){
|
||||||
|
// console.log('img',item)
|
||||||
|
this.$delete(item,'thumbUrl')
|
||||||
|
// contentList[index]= { ...item }
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// console.log('contentList',contentList)
|
||||||
|
params.itemValEOList=contentList
|
||||||
// console.log('paramsformInline',params)
|
// console.log('paramsformInline',params)
|
||||||
params.delItemIds=this.deleteIds.join(',')
|
params.delItemIds=this.deleteIds.join(',')
|
||||||
axios({
|
axios({
|
||||||
@@ -767,7 +784,7 @@
|
|||||||
},
|
},
|
||||||
//上传文件
|
//上传文件
|
||||||
uploadSuccess1(data,imgs) {
|
uploadSuccess1(data,imgs) {
|
||||||
console.log('dataimg',data,imgs)
|
// console.log('dataimg',data,imgs)
|
||||||
let lengthImg=imgs.length
|
let lengthImg=imgs.length
|
||||||
for(let i = this.contentList.length;i>this.addIndex;i--){
|
for(let i = this.contentList.length;i>this.addIndex;i--){
|
||||||
this.contentList[i+lengthImg-1]=this.contentList[i-1]
|
this.contentList[i+lengthImg-1]=this.contentList[i-1]
|
||||||
@@ -803,6 +820,8 @@
|
|||||||
type:'TABLE',
|
type:'TABLE',
|
||||||
itemContent:this.ueContent
|
itemContent:this.ueContent
|
||||||
}
|
}
|
||||||
|
// this.uEditorChange()
|
||||||
|
// console.log('this.contentList',this.contentList)
|
||||||
},
|
},
|
||||||
//表格取消按钮
|
//表格取消按钮
|
||||||
handleCancelTable(){
|
handleCancelTable(){
|
||||||
@@ -816,6 +835,7 @@
|
|||||||
type:'TABLE',
|
type:'TABLE',
|
||||||
itemContent:val
|
itemContent:val
|
||||||
}
|
}
|
||||||
|
this.ueContent=val
|
||||||
|
|
||||||
},
|
},
|
||||||
//取消行数列数按钮
|
//取消行数列数按钮
|
||||||
@@ -989,6 +1009,7 @@
|
|||||||
edit(item) {
|
edit(item) {
|
||||||
this.visible=true
|
this.visible=true
|
||||||
this.type = 'edit'
|
this.type = 'edit'
|
||||||
|
this.itemVal=item
|
||||||
// this.getForm(() => {
|
// this.getForm(() => {
|
||||||
// this.formInline=item
|
// this.formInline=item
|
||||||
// })
|
// })
|
||||||
@@ -996,7 +1017,7 @@
|
|||||||
getAction(this.url.getDocumentInfo, { id: item.id }).then((res) => {
|
getAction(this.url.getDocumentInfo, { id: item.id }).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.formInline = res.result
|
this.formInline = res.result
|
||||||
console.log('form11111',this.formInline)
|
// console.log('form11111',this.formInline)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -1006,6 +1027,7 @@
|
|||||||
this.getForm()
|
this.getForm()
|
||||||
this.visible=true
|
this.visible=true
|
||||||
this.formInline = {}
|
this.formInline = {}
|
||||||
|
this.contentList=[]
|
||||||
this.type = 'add'
|
this.type = 'add'
|
||||||
|
|
||||||
},
|
},
|
||||||
@@ -1104,7 +1126,7 @@
|
|||||||
.row-right{
|
.row-right{
|
||||||
min-width: 150px;
|
min-width: 150px;
|
||||||
margin-left: 20px;
|
margin-left: 20px;
|
||||||
.row-btn-add{
|
.row-btn-add, .row-btn-edit{
|
||||||
margin-right: 20px;
|
margin-right: 20px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1182,7 +1204,10 @@
|
|||||||
table.word-table {
|
table.word-table {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
.wordImg{
|
||||||
|
width:40px;
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
<a-tree
|
<a-tree
|
||||||
v-if="gData.length>0"
|
v-if="gData.length>0"
|
||||||
:selected-keys="selectedKeys"
|
:selected-keys="selectedKeys"
|
||||||
:expanded-keys="expandedKeys"
|
:expanded-keys.sync="expandedKeys"
|
||||||
:auto-expand-parent="autoExpandParent"
|
:auto-expand-parent="autoExpandParent"
|
||||||
:defaultExpandAll="true"
|
:defaultExpandAll="true"
|
||||||
:tree-data="gData"
|
:tree-data="gData"
|
||||||
@@ -16,24 +16,42 @@
|
|||||||
@rightClick="rightClick"
|
@rightClick="rightClick"
|
||||||
@select="onSelect"
|
@select="onSelect"
|
||||||
>
|
>
|
||||||
<template slot="title" slot-scope="{ title }">
|
<!-- @rightClick="rightClick"-->
|
||||||
<span v-if="title.indexOf(searchValue) > -1" :title="title">
|
<template #title="{ key: treeKey, title, record }">
|
||||||
|
<a-dropdown :trigger="['contextmenu']">
|
||||||
|
<!-- <span>{{ title }}</span>-->
|
||||||
|
<span v-if="title.indexOf(searchValue) > -1" :title="title">
|
||||||
{{ title.substr(0, title.indexOf(searchValue)) }}<span style="color: #f50">{{ searchValue }}</span>{{ title.substr(title.indexOf(searchValue) + searchValue.length) }}
|
{{ title.substr(0, title.indexOf(searchValue)) }}<span style="color: #f50">{{ searchValue }}</span>{{ title.substr(title.indexOf(searchValue) + searchValue.length) }}
|
||||||
</span>
|
</span>
|
||||||
<span v-else :title="title">{{ title }}</span>
|
<span v-else :title="title">{{ title }}</span>
|
||||||
|
<template #overlay>
|
||||||
|
<a-menu @click="({ key: menuKey }) => onContextMenuClick(treeKey, menuKey, record)">
|
||||||
|
<a-menu-item key="1" @click="orgAdd">{{$t('newNode')}}</a-menu-item>
|
||||||
|
<a-menu-item key="2" @click="orgEdit">{{$t('modifyNode')}}</a-menu-item>
|
||||||
|
<a-menu-item key="3" @click="orgDelete" v-if="deleteNode" >{{$t('deleteNode')}}</a-menu-item>
|
||||||
|
</a-menu>
|
||||||
|
</template>
|
||||||
|
</a-dropdown>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<!-- <template slot="title" slot-scope="{ title }">-->
|
||||||
|
<!-- <span v-if="title.indexOf(searchValue) > -1" :title="title">-->
|
||||||
|
<!-- {{ title.substr(0, title.indexOf(searchValue)) }}<span style="color: #f50">{{ searchValue }}</span>{{ title.substr(title.indexOf(searchValue) + searchValue.length) }}-->
|
||||||
|
<!-- </span>-->
|
||||||
|
<!-- <span v-else :title="title">{{ title }}</span>-->
|
||||||
|
<!-- </template>-->
|
||||||
</a-tree>
|
</a-tree>
|
||||||
<div v-if="NodeTreeItem" :style="tmpStyle" >
|
<!-- <div v-if="NodeTreeItem" :style="tmpStyle" >-->
|
||||||
<div class="menu-item" @click="orgAdd">
|
<!-- <div class="menu-item" @click="orgAdd">-->
|
||||||
{{$t('newNode')}}
|
<!-- {{$t('newNode')}}-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
<div class="menu-item" @click="orgEdit">
|
<!-- <div class="menu-item" @click="orgEdit">-->
|
||||||
{{$t('modifyNode')}}
|
<!-- {{$t('modifyNode')}}-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
<div class="menu-item menu-bottom" @click="orgDelete" v-if="NodeTreeItem">
|
<!-- <div class="menu-item menu-bottom" @click="orgDelete" v-if="NodeTreeItem">-->
|
||||||
{{$t('deleteNode')}}
|
<!-- {{$t('deleteNode')}}-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="split-detail-right">
|
<div class="split-detail-right">
|
||||||
@@ -86,7 +104,7 @@
|
|||||||
:OperationList="OperationList"
|
:OperationList="OperationList"
|
||||||
:infoId="$route.query.infoId"
|
:infoId="$route.query.infoId"
|
||||||
:menuId="menuId"
|
:menuId="menuId"
|
||||||
showAction
|
:showAction="true"
|
||||||
@onSelectChange="onSelectChange"
|
@onSelectChange="onSelectChange"
|
||||||
@deleteClick="deleteClick"
|
@deleteClick="deleteClick"
|
||||||
@editClick="editClick"
|
@editClick="editClick"
|
||||||
@@ -154,7 +172,7 @@
|
|||||||
:ids="ids">
|
:ids="ids">
|
||||||
</split-bat-form>
|
</split-bat-form>
|
||||||
</a-modal>
|
</a-modal>
|
||||||
<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>
|
<split-add-form ref="splitForm" v-if="addVisible" :addVisible="addVisible" :formTitle="formTitle" :flag="'4'" :url="url" :infoId="infoId" :menuId="menuId" :itemId="itemId" @closeVisible="closeVisible" @sumber="sumber"></split-add-form>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</a-card>
|
</a-card>
|
||||||
@@ -171,6 +189,7 @@
|
|||||||
import upload from '@/components/SplitImport/index'
|
import upload from '@/components/SplitImport/index'
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
||||||
|
import moment from 'moment'
|
||||||
import eventBUs from '@/common/event'
|
import eventBUs from '@/common/event'
|
||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
export default {
|
export default {
|
||||||
@@ -265,7 +284,14 @@
|
|||||||
token:Vue.ls.get(ACCESS_TOKEN),
|
token:Vue.ls.get(ACCESS_TOKEN),
|
||||||
// upAccept:'.zip', //导入文件类型
|
// upAccept:'.zip', //导入文件类型
|
||||||
uploadMenuId:'',
|
uploadMenuId:'',
|
||||||
selectedKeys:[]
|
selectedKeys:[],
|
||||||
|
deleteNode:false,
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch:{
|
||||||
|
deleteNode(){
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@@ -375,7 +401,9 @@
|
|||||||
},
|
},
|
||||||
//鼠标右键
|
//鼠标右键
|
||||||
rightClick({event,node}){
|
rightClick({event,node}){
|
||||||
console.log('eee',event,node)
|
|
||||||
|
this.deleteNode=node._props.dataRef.pid?true:false
|
||||||
|
// console.log('eee',event,node)
|
||||||
// this.NodeTreeItemVisible=true
|
// this.NodeTreeItemVisible=true
|
||||||
const x =
|
const x =
|
||||||
event.currentTarget.offsetLeft + event.currentTarget.clientWidth;
|
event.currentTarget.offsetLeft + event.currentTarget.clientWidth;
|
||||||
@@ -467,6 +495,9 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
onContextMenuClick(treeKey, menuKey,) {
|
||||||
|
// console.log(`treeKey: ${treeKey}, menuKey: ${menuKey}`);
|
||||||
|
},
|
||||||
//清空按钮
|
//清空按钮
|
||||||
resetSearch(){
|
resetSearch(){
|
||||||
this.menuId=''
|
this.menuId=''
|
||||||
@@ -489,9 +520,10 @@
|
|||||||
}
|
}
|
||||||
this.$refs.ruleForm.validate(valid=>{
|
this.$refs.ruleForm.validate(valid=>{
|
||||||
if(valid){
|
if(valid){
|
||||||
this.flag=true
|
|
||||||
// console.log('parms',this.params)
|
// console.log('parms',this.params)
|
||||||
if(this.flag){
|
if(!this.flag){
|
||||||
|
this.flag=true
|
||||||
postAction(`split/sarFileSplitMenu/addMenu`,params).then(res=>{
|
postAction(`split/sarFileSplitMenu/addMenu`,params).then(res=>{
|
||||||
if(res.success){
|
if(res.success){
|
||||||
this.menuRightVisible=false
|
this.menuRightVisible=false
|
||||||
@@ -521,6 +553,7 @@
|
|||||||
info_id: this.infoId,
|
info_id: this.infoId,
|
||||||
...this.form,
|
...this.form,
|
||||||
}
|
}
|
||||||
|
if(!this.flag){
|
||||||
this.flag=true
|
this.flag=true
|
||||||
// console.log('parms',params)
|
// console.log('parms',params)
|
||||||
putAction(`split/sarFileSplitMenu/updateMenu`,params).then(res=>{
|
putAction(`split/sarFileSplitMenu/updateMenu`,params).then(res=>{
|
||||||
@@ -536,6 +569,7 @@
|
|||||||
this.flag=false
|
this.flag=false
|
||||||
this.menuRightVisible=false
|
this.menuRightVisible=false
|
||||||
})
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//获取列表数据
|
//获取列表数据
|
||||||
@@ -653,7 +687,7 @@
|
|||||||
},
|
},
|
||||||
//上传成功
|
//上传成功
|
||||||
uploadSuccess(data,status){
|
uploadSuccess(data,status){
|
||||||
console.log('data111',data)
|
// console.log('data111',data)
|
||||||
if(status==='success'){
|
if(status==='success'){
|
||||||
let queryParam={
|
let queryParam={
|
||||||
menu_id:this.menuId,
|
menu_id:this.menuId,
|
||||||
@@ -676,10 +710,11 @@
|
|||||||
},
|
},
|
||||||
//导出
|
//导出
|
||||||
handleExportManage(){
|
handleExportManage(){
|
||||||
let name = this.$t('DocumentSplitting')+'.zip'
|
let dateName = moment(new Date()).format('YYYY-MM-DD HH-mm-ss')
|
||||||
|
let name = this.$route.query.infoNumber +' '+ dateName+'.zip'
|
||||||
let query = {
|
let query = {
|
||||||
infoId:this.infoId,
|
infoId:this.infoId,
|
||||||
exportName:'',
|
exportName:name,
|
||||||
idList:this.selectedRowKeys.join(',')
|
idList:this.selectedRowKeys.join(',')
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1037,6 +1072,9 @@
|
|||||||
width: 260px;
|
width: 260px;
|
||||||
padding-right: 20px;
|
padding-right: 20px;
|
||||||
border-right: 1px solid #666666;
|
border-right: 1px solid #666666;
|
||||||
|
.split-detail-left-tree{
|
||||||
|
width: 240px;
|
||||||
|
}
|
||||||
.menu-item{
|
.menu-item{
|
||||||
padding: 2px 8px;
|
padding: 2px 8px;
|
||||||
border: 1px solid #000000;
|
border: 1px solid #000000;
|
||||||
@@ -1119,6 +1157,10 @@
|
|||||||
.upload-split{
|
.upload-split{
|
||||||
.ant-upload{
|
.ant-upload{
|
||||||
color:#040B29;
|
color:#040B29;
|
||||||
|
i.import{
|
||||||
|
display: inline-block;
|
||||||
|
margin-right: 4px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1143,4 +1185,10 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.item-content-show{
|
||||||
|
.wordImg{
|
||||||
|
width: 40px;
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -298,7 +298,7 @@
|
|||||||
//删除按钮
|
//删除按钮
|
||||||
deleteArea(val){
|
deleteArea(val){
|
||||||
this.$confirm({
|
this.$confirm({
|
||||||
title: this.$t('labelAreaDeleted'),
|
title: this.$t('confirmDeletion'),
|
||||||
content: '',
|
content: '',
|
||||||
onOk:
|
onOk:
|
||||||
async () => {
|
async () => {
|
||||||
|
|||||||
@@ -326,7 +326,7 @@
|
|||||||
this.showFlowData();
|
this.showFlowData();
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
console.log('disableEdit',this.disableEdit)
|
// console.log('disableEdit',this.disableEdit)
|
||||||
this.loadContent()
|
this.loadContent()
|
||||||
this.loadShowArea()
|
this.loadShowArea()
|
||||||
// console.log('edit',this.submitEdit)
|
// console.log('edit',this.submitEdit)
|
||||||
|
|||||||
Reference in New Issue
Block a user