|
|
|
@ -4,8 +4,7 @@
|
|
|
|
|
<div
|
|
|
|
|
class="table-page-search-wrapper"
|
|
|
|
|
v-if="hasPerm('BookingTemplate:page')"
|
|
|
|
|
:class="advanced ? 'Open' : 'Close'"
|
|
|
|
|
>
|
|
|
|
|
:class="advanced ? 'Open' : 'Close'">
|
|
|
|
|
<a-form layout="inline">
|
|
|
|
|
<a-row :gutter="48">
|
|
|
|
|
<a-col :md="19">
|
|
|
|
@ -22,8 +21,7 @@
|
|
|
|
|
:show-arrow="false"
|
|
|
|
|
:filter-option="false"
|
|
|
|
|
allowClear
|
|
|
|
|
:not-found-content="null"
|
|
|
|
|
>
|
|
|
|
|
:not-found-content="null">
|
|
|
|
|
<a-select-option v-for="item in SysTenantData" :key="item.id" :value="item.name">
|
|
|
|
|
123
|
|
|
|
|
</a-select-option>
|
|
|
|
@ -32,8 +30,7 @@
|
|
|
|
|
v-else
|
|
|
|
|
v-model="queryParam[item.dataIndex]"
|
|
|
|
|
allow-clear
|
|
|
|
|
:placeholder="`请输入${item.title}`"
|
|
|
|
|
/>
|
|
|
|
|
:placeholder="`请输入${item.title}`" />
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :md="6" :sm="24">
|
|
|
|
@ -111,8 +108,7 @@
|
|
|
|
|
round
|
|
|
|
|
:loading="loading"
|
|
|
|
|
empty-text="没有更多数据了!"
|
|
|
|
|
v-if="!TableType"
|
|
|
|
|
>
|
|
|
|
|
v-if="!TableType">
|
|
|
|
|
<vxe-column type="seq" width="40" fixed="left"></vxe-column>
|
|
|
|
|
<vxe-column title="显示名称" width="200" align="center">
|
|
|
|
|
<template #default="{ row }">
|
|
|
|
@ -126,8 +122,7 @@
|
|
|
|
|
:min-width="item.width"
|
|
|
|
|
:title="item.title"
|
|
|
|
|
:align="item.align"
|
|
|
|
|
v-if="item.checked"
|
|
|
|
|
>
|
|
|
|
|
v-if="item.checked">
|
|
|
|
|
<template #default="{ row }" v-if="item.title == '文件名称'">
|
|
|
|
|
<a @click="FnDFile(row)">{{ row.fileName }}</a>
|
|
|
|
|
</template>
|
|
|
|
@ -156,8 +151,7 @@
|
|
|
|
|
e => {
|
|
|
|
|
confirm(e, row)
|
|
|
|
|
}
|
|
|
|
|
"
|
|
|
|
|
>
|
|
|
|
|
">
|
|
|
|
|
<vxe-button type="text">
|
|
|
|
|
<a-icon type="delete" :style="{ color: '#13c2c2' }" />
|
|
|
|
|
</vxe-button>
|
|
|
|
@ -171,8 +165,7 @@
|
|
|
|
|
:page-size="queryParam.pageSize"
|
|
|
|
|
:total="queryParam.totalResult"
|
|
|
|
|
:layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
|
|
|
|
|
@page-change="handlePageChange"
|
|
|
|
|
>
|
|
|
|
|
@page-change="handlePageChange">
|
|
|
|
|
</vxe-pager>
|
|
|
|
|
<add-form ref="addForm" @ok="handleOk" />
|
|
|
|
|
<edit-form ref="editForm" @ok="handleOk" />
|
|
|
|
@ -180,7 +173,7 @@
|
|
|
|
|
<a-modal v-model="ExcelVisible" width="1100px" title="详细设置">
|
|
|
|
|
<vxe-toolbar>
|
|
|
|
|
<template #buttons>
|
|
|
|
|
<vxe-button @click="insertEvent(-1)">添加一行</vxe-button>
|
|
|
|
|
<vxe-button @click="insertEvent()">添加一行</vxe-button>
|
|
|
|
|
<vxe-button @click="handleDelete">删除选中</vxe-button>
|
|
|
|
|
<vxe-button icon="vxe-icon-save" @click="saveEvent">保存</vxe-button>
|
|
|
|
|
</template>
|
|
|
|
@ -193,18 +186,21 @@
|
|
|
|
|
ref="xTable"
|
|
|
|
|
height="600"
|
|
|
|
|
:data="tableData"
|
|
|
|
|
:edit-config="{ trigger: 'click', mode: 'row', icon: 'vxe-icon-edit', showStatus: true }"
|
|
|
|
|
>
|
|
|
|
|
:loading="loadingTable"
|
|
|
|
|
:edit-config="{ trigger: 'click', mode: 'row', icon: 'vxe-icon-edit', showStatus: true }">
|
|
|
|
|
<vxe-column type="checkbox" width="60"></vxe-column>
|
|
|
|
|
<vxe-column field="Ffield" title="对象名" :edit-render="{}">
|
|
|
|
|
<vxe-column field="Ffield" width="100" title="对象名" :edit-render="{}">
|
|
|
|
|
<template #edit="{ row }">
|
|
|
|
|
<vxe-select @change="roleChangeEvent($event, row)" v-model="row.Ffield" style="width: 100%" placeholder="请选择对象名">
|
|
|
|
|
<vxe-select
|
|
|
|
|
@change="roleChangeEvent($event, row)"
|
|
|
|
|
v-model="row.Ffield"
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
placeholder="请选择对象名">
|
|
|
|
|
<vxe-option
|
|
|
|
|
v-for="(item, index) in fieldList"
|
|
|
|
|
:key="index"
|
|
|
|
|
:value="item.name"
|
|
|
|
|
:label="item.name"
|
|
|
|
|
></vxe-option>
|
|
|
|
|
:label="item.name"></vxe-option>
|
|
|
|
|
</vxe-select>
|
|
|
|
|
</template>
|
|
|
|
|
</vxe-column>
|
|
|
|
@ -217,8 +213,7 @@
|
|
|
|
|
placeholder="请选择字段名称"
|
|
|
|
|
:disabled="!row.Ffield"
|
|
|
|
|
@focus="focusEvent1(row)"
|
|
|
|
|
@keyup="keyupEvent1(row)"
|
|
|
|
|
></vxe-input>
|
|
|
|
|
@keyup="keyupEvent1(row)"></vxe-input>
|
|
|
|
|
</template>
|
|
|
|
|
<template #dropdown>
|
|
|
|
|
<div class="my-dropdown1">
|
|
|
|
@ -226,8 +221,7 @@
|
|
|
|
|
class="list-item1"
|
|
|
|
|
v-for="(item, index) in fieldData"
|
|
|
|
|
:key="index"
|
|
|
|
|
@click="selectEvent1(item, row)"
|
|
|
|
|
>
|
|
|
|
|
@click="selectEvent1(item, row)">
|
|
|
|
|
<span>{{ item.name }}</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
@ -250,6 +244,12 @@
|
|
|
|
|
<vxe-input v-model="row.describe" type="text"></vxe-input>
|
|
|
|
|
</template>
|
|
|
|
|
</vxe-column>
|
|
|
|
|
<vxe-column field="active" title="操作" width="140" :edit-render="{}">
|
|
|
|
|
<template #default="{ row,rowIndex }">
|
|
|
|
|
<a-button type="primary" size="small" @click.stop="moveUp(rowIndex)">上移</a-button>
|
|
|
|
|
<a-button type="primary" size="small" @click.stop="moveDown(rowIndex)">下移</a-button>
|
|
|
|
|
</template>
|
|
|
|
|
</vxe-column>
|
|
|
|
|
</vxe-table>
|
|
|
|
|
<template slot="footer"> <span></span> </template>
|
|
|
|
|
</a-modal>
|
|
|
|
@ -301,6 +301,7 @@ export default {
|
|
|
|
|
loading: false,
|
|
|
|
|
setVisible: false,
|
|
|
|
|
setVisible1: false,
|
|
|
|
|
loadingTable:false,
|
|
|
|
|
queryParam: {
|
|
|
|
|
currentPage: 1,
|
|
|
|
|
pageSize: 10,
|
|
|
|
@ -382,6 +383,7 @@ export default {
|
|
|
|
|
const tableData = []
|
|
|
|
|
const arr = []
|
|
|
|
|
this.tableData.forEach(item => {
|
|
|
|
|
if (item.id && !item.field.includes('.')) {
|
|
|
|
|
this.fieldList.forEach(item2 => {
|
|
|
|
|
if (item.Ffield == item2.name) {
|
|
|
|
|
tableData.push({
|
|
|
|
@ -390,6 +392,11 @@ export default {
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
tableData.push({
|
|
|
|
|
...item
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
if (!item.fieldName) {
|
|
|
|
|
arr.push(1)
|
|
|
|
|
}
|
|
|
|
@ -399,40 +406,47 @@ export default {
|
|
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
const children = [...tableData, ...insertRecords]
|
|
|
|
|
if (removeRecords.length) {
|
|
|
|
|
children.forEach((item, index) => {
|
|
|
|
|
removeRecords.forEach(ele => {
|
|
|
|
|
if (item.id == ele.id) {
|
|
|
|
|
children.splice(index, 1)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
if (updateRecords.length) {
|
|
|
|
|
children.forEach((item, index) => {
|
|
|
|
|
updateRecords.forEach(ele => {
|
|
|
|
|
if (item.id == ele.id) {
|
|
|
|
|
children[index] = ele
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
// if (removeRecords.length) {
|
|
|
|
|
// children.forEach((item, index) => {
|
|
|
|
|
// removeRecords.forEach(ele => {
|
|
|
|
|
// if (item.id == ele.id) {
|
|
|
|
|
// children.splice(index, 1)
|
|
|
|
|
// }
|
|
|
|
|
// })
|
|
|
|
|
// })
|
|
|
|
|
// }
|
|
|
|
|
// if (updateRecords.length) {
|
|
|
|
|
// children.forEach((item, index) => {
|
|
|
|
|
// updateRecords.forEach(ele => {
|
|
|
|
|
// if (item.id == ele.id) {
|
|
|
|
|
// children[index] = ele
|
|
|
|
|
// }
|
|
|
|
|
// })
|
|
|
|
|
// })
|
|
|
|
|
// }
|
|
|
|
|
console.log(children, this.fieldList)
|
|
|
|
|
BookingTemplateAddOrUpdateExcelTemplate({
|
|
|
|
|
pid: this.ExcelPid,
|
|
|
|
|
children
|
|
|
|
|
}).then(res => {
|
|
|
|
|
this.$message.success('保存成功')
|
|
|
|
|
this.getDetail()
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
async insertEvent(row) {
|
|
|
|
|
const $table = this.$refs.xTable
|
|
|
|
|
const { row: newRow } = await $table.insertAt({}, row)
|
|
|
|
|
await $table.setActiveCell(newRow, 'name')
|
|
|
|
|
// console.log(this.tableData.length)
|
|
|
|
|
// const $table = this.$refs.xTable
|
|
|
|
|
// const { row: newRow } = await $table.insertAt({}, row)
|
|
|
|
|
// await $table.setActiveCell(newRow, 'name')
|
|
|
|
|
this.tableData.push({})
|
|
|
|
|
},
|
|
|
|
|
FnExcel(data) {
|
|
|
|
|
this.ExcelPid = data.id
|
|
|
|
|
this.getDetail()
|
|
|
|
|
},
|
|
|
|
|
getDetail() {
|
|
|
|
|
this.tableData = []
|
|
|
|
|
this.loadingTable = true
|
|
|
|
|
BookingTemplateBookingExcelTemplateList({ id: this.ExcelPid }).then(res => {
|
|
|
|
|
res.data.forEach(item => {
|
|
|
|
|
this.fieldList.forEach(item2 => {
|
|
|
|
@ -468,6 +482,8 @@ export default {
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
this.tableData = res.data
|
|
|
|
|
this.loadingTable = false
|
|
|
|
|
console.log(this.tableData)
|
|
|
|
|
})
|
|
|
|
|
this.ExcelVisible = true
|
|
|
|
|
},
|
|
|
|
@ -514,6 +530,24 @@ export default {
|
|
|
|
|
console.log(row, row1)
|
|
|
|
|
row1.fieldName = ''
|
|
|
|
|
},
|
|
|
|
|
moveUp(index) {
|
|
|
|
|
console.log(index)
|
|
|
|
|
console.log(this.tableData)
|
|
|
|
|
if (index > 0) {
|
|
|
|
|
this.swapItems(index, index - 1);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
moveDown(index) {
|
|
|
|
|
console.log(this.tableData)
|
|
|
|
|
if (index < this.tableData.length - 1) {
|
|
|
|
|
this.swapItems(index, index + 1);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
swapItems(index1, index2) {
|
|
|
|
|
const temp = this.tableData[index1];
|
|
|
|
|
this.tableData.splice(index1, 1, this.tableData[index2]);
|
|
|
|
|
this.tableData.splice(index2, 1, temp);
|
|
|
|
|
},
|
|
|
|
|
columnChange1(data) {
|
|
|
|
|
this.TableType = true
|
|
|
|
|
this.TableColumns = data
|
|
|
|
@ -692,17 +726,20 @@ export default {
|
|
|
|
|
button {
|
|
|
|
|
margin-right: 8px;
|
|
|
|
|
}
|
|
|
|
|
.Open {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.Open {}
|
|
|
|
|
|
|
|
|
|
.Close {
|
|
|
|
|
max-height: 50px;
|
|
|
|
|
padding-bottom: 8px;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.SetFlex {
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: flex-end;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.my-dropdown1 {
|
|
|
|
|
height: 200px;
|
|
|
|
|
overflow: auto;
|
|
|
|
@ -710,15 +747,19 @@ button {
|
|
|
|
|
border: 1px solid #dcdfe6;
|
|
|
|
|
background-color: #fff;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.list-item1:hover {
|
|
|
|
|
background-color: #f5f7fa;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.vxe-table--render-default .vxe-body--row.row--stripe {
|
|
|
|
|
background: #f5f9fe;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.ant-card-body {
|
|
|
|
|
padding-top: 10px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.nav-box {
|
|
|
|
|
padding: 0 10px;
|
|
|
|
|
|
|
|
|
@ -744,6 +785,7 @@ button {
|
|
|
|
|
.iconfont {
|
|
|
|
|
color: #1d8aff;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
|
background: #fff;
|
|
|
|
|
box-shadow: 0 0 10px #eee;
|
|
|
|
@ -754,6 +796,7 @@ button {
|
|
|
|
|
.iconfont {
|
|
|
|
|
color: #865ef8;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
|
background: #fff;
|
|
|
|
|
box-shadow: 0 0 10px #eee;
|
|
|
|
@ -764,6 +807,7 @@ button {
|
|
|
|
|
.iconfont {
|
|
|
|
|
color: #ff9702;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
|
background: #fff;
|
|
|
|
|
box-shadow: 0 0 10px #eee;
|
|
|
|
@ -774,6 +818,7 @@ button {
|
|
|
|
|
.iconfont {
|
|
|
|
|
color: #1d8aff;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
|
background: #fff;
|
|
|
|
|
box-shadow: 0 0 10px #eee;
|
|
|
|
@ -784,6 +829,7 @@ button {
|
|
|
|
|
.iconfont {
|
|
|
|
|
color: #ff1062;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
|
background: #fff;
|
|
|
|
|
box-shadow: 0 0 10px #eee;
|
|
|
|
@ -794,6 +840,7 @@ button {
|
|
|
|
|
.iconfont {
|
|
|
|
|
color: #1ebeca;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
|
background: #fff;
|
|
|
|
|
box-shadow: 0 0 10px #eee;
|
|
|
|
@ -804,6 +851,7 @@ button {
|
|
|
|
|
.iconfont {
|
|
|
|
|
color: #82c93d;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
|
background: #fff;
|
|
|
|
|
box-shadow: 0 0 10px #eee;
|
|
|
|
@ -814,6 +862,7 @@ button {
|
|
|
|
|
.iconfont {
|
|
|
|
|
color: #1d8aff;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
|
background: #fff;
|
|
|
|
|
box-shadow: 0 0 10px #eee;
|
|
|
|
|