拆分详情表格增加编辑
This commit is contained in:
@@ -4,9 +4,9 @@
|
||||
<a-table
|
||||
class="table"
|
||||
rowKey="id"
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||
:row-selection="{ fixed: true, selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||
:pagination="false"
|
||||
:scroll="{x: 600}"
|
||||
:scroll="{x: true}"
|
||||
:data-source="dataSource"
|
||||
:loading="loading"
|
||||
: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>
|
||||
</a-tooltip>
|
||||
</span>
|
||||
|
||||
<span slot="operation" slot-scope="record" class="operate">
|
||||
<a v-for="(ol,index) in OperationList"
|
||||
@click="OperationClick(ol,record)">
|
||||
@@ -28,6 +29,11 @@
|
||||
</span>
|
||||
</a>
|
||||
</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>
|
||||
</div>
|
||||
<div class="page" v-if="dataSource.length > 0">
|
||||
@@ -156,8 +162,13 @@
|
||||
customRender: 'showContent'
|
||||
}
|
||||
}
|
||||
if (res.urlClick) {
|
||||
this.columns[index].scopedSlots = {
|
||||
customRender: 'urlClick'
|
||||
}
|
||||
}
|
||||
})
|
||||
// console.log('columns',this.columns)
|
||||
|
||||
let width = 0
|
||||
if (this.OperationList.length > 0) {
|
||||
for (let i = 0; i < this.OperationList.length; i++) {
|
||||
@@ -173,7 +184,7 @@
|
||||
scopedSlots: { customRender: 'operation' }
|
||||
})
|
||||
}
|
||||
|
||||
console.log('columns',this.columns)
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -183,7 +194,7 @@
|
||||
this.getTableList()
|
||||
},
|
||||
getTableList() {
|
||||
console.log('this.searchParmestable',this.searchParmes)
|
||||
// console.log('this.searchParmestable',this.searchParmes)
|
||||
let pageNo = JSON.parse(JSON.stringify(this.pageNo))
|
||||
let pageSize = JSON.parse(JSON.stringify(this.pageSize))
|
||||
let params = {
|
||||
@@ -235,6 +246,9 @@
|
||||
},
|
||||
showContent(item, index) {
|
||||
this.$emit('showContent', item)
|
||||
},
|
||||
urlClick(item) {
|
||||
window.open(item)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
:showUploadList="false"
|
||||
@change="handleChange">
|
||||
<!-- <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-upload>
|
||||
<!-- </a-modal>-->
|
||||
@@ -96,12 +96,17 @@
|
||||
// console.log('rrr',this.myfileList)
|
||||
},
|
||||
handleChange(info) {
|
||||
console.log('info',info)
|
||||
// console.log('info',info)
|
||||
let { file } = info;
|
||||
const status = info.file.status;
|
||||
info.fileList.forEach((val,index)=>{
|
||||
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)
|
||||
}
|
||||
})
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
<span>{{item.db_field_txt}}</span>
|
||||
</div>
|
||||
<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>
|
||||
</div>
|
||||
<!-- <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'"
|
||||
:triggerChange="false" :dictCode="item.dict_field"/>
|
||||
</div>
|
||||
<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">
|
||||
<span>{{item.db_field_txt}}</span>
|
||||
</div>
|
||||
<a-range-picker class="box-input" v-model="queryParam[item.db_field_name]"
|
||||
@change="onChange(item.db_field_name)"></a-range-picker>
|
||||
</div>
|
||||
<!-- <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">-->
|
||||
<!-- <span>{{item.db_field_txt}}</span>-->
|
||||
<!-- </div>-->
|
||||
<!-- <a-range-picker class="box-input" v-model="queryParam[item.db_field_name]"-->
|
||||
<!-- @change="onChange(item.db_field_name)"></a-range-picker>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="box-title-text" v-else-if="item.field_show_type == '5'">-->
|
||||
<!-- <div class="title-text" :title="item.db_field_txt">-->
|
||||
<!-- <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" style="margin-left: 8px" @click="searchReset">{{$t('reset')}}</a-button>
|
||||
<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>
|
||||
</a-col>
|
||||
@@ -238,7 +238,7 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
<style lang="less" scoped>
|
||||
.box-title-text {
|
||||
line-height: 1.4;
|
||||
display: flex;
|
||||
@@ -272,4 +272,18 @@
|
||||
height: 38px;
|
||||
/*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>
|
||||
@@ -187,7 +187,7 @@
|
||||
pageNo: pageNo + '',
|
||||
pageSize: pageSize + ''
|
||||
}
|
||||
console.log('parmsss',params)
|
||||
// console.log('parmsss',params)
|
||||
this.loading = true
|
||||
getAction(this.url.tableList, params).then((res) => {
|
||||
if (res.success) {
|
||||
|
||||
@@ -133,14 +133,14 @@
|
||||
|
||||
</a-col>
|
||||
<span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
|
||||
<a-col :md="6" :sm="24">
|
||||
<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 @click="handleToggleSearch" style="margin-left: 8px" v-if="searchList.length > 3">
|
||||
{{ !toggleSearchStatus ? $t('open') : $t('away') }}
|
||||
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
|
||||
</a>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="24">
|
||||
<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 @click="handleToggleSearch" style="margin-left: 8px" v-if="searchList.length > 3">
|
||||
{{ !toggleSearchStatus ? $t('open') : $t('away') }}
|
||||
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
|
||||
</a>
|
||||
</a-col>
|
||||
</span>
|
||||
</a-row>
|
||||
</a-form>
|
||||
|
||||
Reference in New Issue
Block a user