|
@@ -11,10 +11,10 @@
|
|
|
<template v-if="tableData.length || tableCols.length">
|
|
|
<div style="height: calc(100% - 40px);">
|
|
|
<el-table v-el-table-infinite-scroll="load" :data="filteredTableData" :summary-method="getSummaries" :span-method="tableSpanMethod" stripe :show-summary="showSummary" border @cell-click="cellClick" :cell-class-name="cellClass" ref="table" :height="tableHeight ? tableHeight : minHeight - 8 + 'vh'" class="table infinite-list" style=" overflow: auto" :style="{width: tableWidth ? tableWidth : '100%'}" @select="selectHandler">
|
|
|
- <el-table-column v-for="(item, index) in tableColsCopy" :key="index" :prop="item.columnName" :label="item.columnLabel" :show-overflow-tooltip="showOverflowTooltip" :formatter="formatter">
|
|
|
+ <el-table-column v-for="(item, index) in tableColsCopy" :key="index" :prop="item.columncode" :label="item.columnname" :show-overflow-tooltip="showOverflowTooltip" :formatter="formatter">
|
|
|
<template #header>
|
|
|
- <el-tooltip :content="item.columnDescribe || item.columnLabel" placement="top">
|
|
|
- <TableHeaderCell :label="item.columnLabel" :filter-options="tableDataFilters[item.columnName]" :filter-values.sync="filterValues[item.columnName]" :sortable="item.needSort" :sort-rule.sync="tableDataSortRules[item.columnName]" />
|
|
|
+ <el-tooltip :content="item.columndescribe || item.columnLabel" placement="top">
|
|
|
+ <TableHeaderCell :label="item.columnname" :filter-options="tableDataFilters[item.columncode]" :filter-values.sync="filterValues[item.columncode]" :sortable="item.enablesort" :sort-rule.sync="tableDataSortRules[item.columncode]" />
|
|
|
</el-tooltip>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -31,7 +31,7 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<template v-else>
|
|
|
- <NoData image-width="auto" image-height="100%" />
|
|
|
+ <NoData image-width="auto" image-height="auto" />
|
|
|
</template>
|
|
|
</div>
|
|
|
<div class="data-table-dialog">
|
|
@@ -39,17 +39,17 @@
|
|
|
<Dialog :width="width" :isBody="isBody" :flag="flag">
|
|
|
<div class="dialog-content">
|
|
|
<div class="title">{{ tableTitle }}</div>
|
|
|
- <div style="max-height:580px;overflow-y: scroll;" class="contents">
|
|
|
+ <div class="contents">
|
|
|
<el-form ref="ruleForm" :model="tableForm" :label-width="labelWidth">
|
|
|
<el-row :gutter="20">
|
|
|
- <el-col v-for="(item, index) in tableColsCopy" :key="index" :span="rows">
|
|
|
- <el-form-item :label="item.columnLabel">
|
|
|
+ <el-col v-for="(item, index) in formItem" :key="index" :span="rows">
|
|
|
+ <el-form-item :label="item.columnname">
|
|
|
<template v-if="
|
|
|
- item.listqueryTemplateID ||
|
|
|
- item.listqueryTemplateID == 0
|
|
|
+ item.dropdownlist ||
|
|
|
+ item.dropdownlist == 0
|
|
|
">
|
|
|
- <el-select class="input-shadow" size="small" filterable default-first-option style="width: 100%" v-model="tableForm[item.columnName]" @change="changeSelect(item.columnName, item)" placeholder="请选择" clearable @clear="tableForm[item.columnName] = ''">
|
|
|
- <el-option v-for="item in tableOptions[item.columnName]" :key="item.v ? item.v : item.planDepartureApt" :label="item.k ? item.k : item.planDepartureApt" :value="
|
|
|
+ <el-select class="input-shadow" size="small" filterable default-first-option style="width: 100%" v-model="tableForm[item.columncode]" @change="changeSelect(item.columncode, item)" placeholder="请选择" clearable @clear="tableForm[item.columncode] = ''">
|
|
|
+ <el-option v-for="item in tableOptions[item.columncode]" :key="item.v ? item.v : item.planDepartureApt" :label="item.k ? item.k : item.planDepartureApt" :value="
|
|
|
item.setlabel === 'positionDescribe'
|
|
|
? item.v
|
|
|
: item.v != undefined
|
|
@@ -59,22 +59,22 @@
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</template>
|
|
|
- <template v-else-if="fromDataType(item.dataType) == 'text'">
|
|
|
- <el-input size="small" :rows="1" type="textarea" @change="inputChangeHandler(item.columnName)" v-model="tableForm[item.columnName]"></el-input>
|
|
|
+ <template v-else-if="fromDataType(item.dataType) == 'text'||fromDataType(item.dataType) == 'VARCHAR'">
|
|
|
+ <el-input size="small" :rows="1" type="textarea" @change="inputChangeHandler(item.columncode)" v-model="tableForm[item.columncode]"></el-input>
|
|
|
</template>
|
|
|
<template v-else-if="fromDataType(item.dataType) == 'date'">
|
|
|
- <el-date-picker class="datetimes" value-format="yyyy-MM-dd" v-model="tableForm[item.columnName]" type="date" placeholder="选择日期" @change="inputChangeHandler(item.columnName)">
|
|
|
+ <el-date-picker class="datetimes" value-format="yyyy-MM-dd" v-model="tableForm[item.columncode]" type="date" placeholder="选择日期" @change="inputChangeHandler(item.columncode)">
|
|
|
</el-date-picker>
|
|
|
</template>
|
|
|
<template v-else-if="fromDataType(item.dataType) == 'datetime'">
|
|
|
- <el-date-picker class="datetimes" value-format="yyyy-MM-dd HH:mm:ss" v-model="tableForm[item.columnName]" type="datetime" placeholder="选择日期时间" @change="inputChangeHandler(item.columnName)">
|
|
|
+ <el-date-picker class="datetimes" value-format="yyyy-MM-dd HH:mm:ss" v-model="tableForm[item.columncode]" type="datetime" placeholder="选择日期时间" @change="inputChangeHandler(item.columncode)">
|
|
|
</el-date-picker>
|
|
|
</template>
|
|
|
- <template v-else-if="fromDataType(item.dataType) == 'int' || fromDataType(item.dataType) == 'tinyint'">
|
|
|
- <el-input size="small" v-model.number="tableForm[item.columnName]" onkeyup="value=value.replace(/[^1-9]/g,'')" @change="inputChangeHandler(item.columnName)"></el-input>
|
|
|
+ <template v-else-if="fromDataType(item.dataType) == 'INT' || fromDataType(item.dataType) == 'tinyint'">
|
|
|
+ <el-input size="small" v-model.number="tableForm[item.columncode]" onkeyup="value=value.replace(/[^1-9]/g,'')" @change="inputChangeHandler(item.columncode)"></el-input>
|
|
|
</template>
|
|
|
<template v-else>
|
|
|
- <el-input size="small" v-model="tableForm[item.columnName]" @change="inputChangeHandler(item.columnName)"></el-input>
|
|
|
+ <el-input size="small" v-model="tableForm[item.columncode]" @change="inputChangeHandler(item.columncode)"></el-input>
|
|
|
</template>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
@@ -185,6 +185,7 @@ export default {
|
|
|
tableCols: [], //表头数据
|
|
|
tableData: [], //表格数据
|
|
|
tableColsCopy: [], //表头数据缓存
|
|
|
+ formItem: [], //表头数据缓存
|
|
|
tableDataFilters: {}, //表头-下拉数据
|
|
|
filterValues: {}, //表头-下拉-选中数据
|
|
|
tableDataCopy: [], //缓存table数据
|
|
@@ -290,36 +291,44 @@ export default {
|
|
|
const { query } = this.$route
|
|
|
const { title, auth_id } = this.$route.meta
|
|
|
const { arrs } = getAuthData(auth_id)
|
|
|
- const table = arrs.filter(item => item.auth_type == 4)
|
|
|
+ const table = arrs.filter(item => item.pagetype == 3)
|
|
|
+ const btnArr = arrs.filter(item => item.pagetype == 4)
|
|
|
+ if (btnArr && btnArr.length) {
|
|
|
+ btnArr.forEach(item => {
|
|
|
+ this.autoBtnObj(item)
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
this.urlParams = query
|
|
|
if (table && table.length) {
|
|
|
const obj = table[0]
|
|
|
- const { arrs } = getAuthData(obj.auth_id)
|
|
|
+ const { arrs } = getAuthData(obj.pageconfigurationid)
|
|
|
this.isAuto = true
|
|
|
this.tableOther = obj
|
|
|
- this.pageTitle = obj.auth_name;
|
|
|
- this.authId = obj.auth_id
|
|
|
- this.queryId = obj.queryTemplateID;
|
|
|
- this.authBtns = arrs.filter(item => Number(item.service_type) > 2 && Number(item.service_type) < 6)
|
|
|
- this.authBtnCol = arrs.filter(item => Number(item.service_type) == 6)
|
|
|
+ this.pageTitle = obj.pagename;
|
|
|
+ this.authId = obj.pageconfigurationid
|
|
|
+ this.queryId = obj.serviceid;
|
|
|
+ this.authBtns = arrs.filter(item =>item.superiorid == this.authId && item.pagetype==4)
|
|
|
+ this.authBtnCol = arrs.filter(item => Number(item.servicetype) == 6)
|
|
|
if (this.authBtnCol.length) {
|
|
|
this.authBtnCol.forEach(item => {
|
|
|
this.authBtnColName.push(item.relation_data)
|
|
|
})
|
|
|
}
|
|
|
- if (arrs && arrs.length) {
|
|
|
- arrs.forEach(item => {
|
|
|
+ if (this.authBtns && this.authBtns.length) {
|
|
|
+ this.authBtns.forEach(item => {
|
|
|
this.autoBtnObj(item)
|
|
|
})
|
|
|
}
|
|
|
- this.getColumnData(obj.auth_id);
|
|
|
+ this.getColumnData(obj.pagecode);
|
|
|
} else {
|
|
|
this.pageTitle = title;
|
|
|
- if (auth_id) {
|
|
|
- this.queryId = auth_id;
|
|
|
- this.authId = auth_id
|
|
|
- this.getColumnData(auth_id);
|
|
|
- }
|
|
|
+ // if (auth_id) {
|
|
|
+ // this.queryId = serviceid;
|
|
|
+ // this.authId = pageconfigurationid
|
|
|
+ // this.getColumnData(auth_id);
|
|
|
+ // }
|
|
|
}
|
|
|
},
|
|
|
updated () {
|
|
@@ -332,37 +341,35 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
//获取表头数据
|
|
|
- async getColumnData (id) {
|
|
|
+ async getColumnData (pagecode) {
|
|
|
try {
|
|
|
const { code, returnData } = await Query({
|
|
|
- serviceId: SERVICE_ID.sysUserAuthId,
|
|
|
- dataContent: [
|
|
|
- {
|
|
|
- auth_id: id,
|
|
|
- user_id: getToken('userid'),
|
|
|
- }
|
|
|
- ],
|
|
|
- page: 1,
|
|
|
- pageSize: 999,
|
|
|
- event: '0'
|
|
|
+ "serviceid": 3,
|
|
|
+ "datacontent": {
|
|
|
+ "filter": {
|
|
|
+ "pagecode": pagecode
|
|
|
+ }
|
|
|
+ },
|
|
|
+ "event": "0"
|
|
|
});
|
|
|
if (code == 0) {
|
|
|
if (returnData && returnData.length) {
|
|
|
const titleColumn = returnData.find(
|
|
|
- (item) => item.needShow == 1
|
|
|
+ (item) => item.isdisplay !=0
|
|
|
);
|
|
|
- const columnName = returnData.find(
|
|
|
- (item) => item.columnKey == 1
|
|
|
+ const columncode = returnData.find(
|
|
|
+ (item) => item.isprimarykey == 1
|
|
|
);
|
|
|
- if (columnName && Object.keys(columnName).length) {
|
|
|
- this.tableKey = columnName['columnName']
|
|
|
+ if (columncode && Object.keys(columncode).length) {
|
|
|
+ this.tableKey = columncode['columncode']
|
|
|
}
|
|
|
if (titleColumn) {
|
|
|
- this.rowTitle = titleColumn.columnName;
|
|
|
+ this.rowTitle = titleColumn.columnname;
|
|
|
}
|
|
|
this.$store.dispatch('auth/changeAuthMsg', returnData)
|
|
|
this.tableCols = returnData;
|
|
|
this.setTableCols();
|
|
|
+ this.initTableData();
|
|
|
if (Object.keys(this.urlParams).length) {
|
|
|
this.getQuery(this.queryId, this.urlParams);
|
|
|
} else {
|
|
@@ -377,18 +384,20 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
setTableCols () {
|
|
|
- this.tableCols.forEach(({ columnName, needFilters, needSort }) => {
|
|
|
- if (needFilters) {
|
|
|
- this.$set(this.tableDataFilters, columnName, [])
|
|
|
- this.$set(this.filterValues, columnName, [])
|
|
|
+ this.tableCols.forEach(({ columncode, enablefilter, enablesort }) => {
|
|
|
+ if (enablefilter) {
|
|
|
+ this.$set(this.tableDataFilters, columncode, [])
|
|
|
+ this.$set(this.filterValues, columncode, [])
|
|
|
}
|
|
|
- if (needSort) {
|
|
|
- this.$set(this.tableDataSortRules, columnName, '')
|
|
|
+ if (enablesort) {
|
|
|
+ this.$set(this.tableDataSortRules, columncode, '')
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
autoBtnObj (item) {
|
|
|
- switch (item.service_type) {
|
|
|
+ console.log(item)
|
|
|
+
|
|
|
+ switch (item.servicetype) {
|
|
|
case '1':
|
|
|
this.btnQueryObj = item
|
|
|
break;
|
|
@@ -396,7 +405,7 @@ export default {
|
|
|
this.btnAddObj = item
|
|
|
break;
|
|
|
case '3':
|
|
|
- if (item.open_method != "1") {
|
|
|
+ if (item.openmode != "1") {
|
|
|
this.btnEditObj = item
|
|
|
}
|
|
|
else {
|
|
@@ -423,10 +432,10 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
handleQuery () {
|
|
|
- const { open_method, route_info } = this.btnQueryObj
|
|
|
- if (open_method) {
|
|
|
- if (open_method != 3) {
|
|
|
- this.autoBtnClick(open_method, route_info)
|
|
|
+ const { openmode, pageroute } = this.btnQueryObj
|
|
|
+ if (openmode) {
|
|
|
+ if (openmode != 3) {
|
|
|
+ this.autoBtnClick(openmode, pageroute)
|
|
|
} else {
|
|
|
this.dialogFlag = true
|
|
|
}
|
|
@@ -530,19 +539,19 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
this.resetTable()
|
|
|
- this.dataContent = { filter: arr }
|
|
|
+ this.dataContent = { "filter": arr }
|
|
|
this.getQuery(this.queryId);
|
|
|
},
|
|
|
//获取表格数据
|
|
|
- async getQuery (id, dataContent = this.dataContent) {
|
|
|
+ async getQuery (id, datacontent = this.dataContent) {
|
|
|
+ datacontent = {"filter": {
|
|
|
+ 1: 1
|
|
|
+ }}
|
|
|
try {
|
|
|
this.loading = true;
|
|
|
const { code, returnData } = await Query({
|
|
|
- serviceId: id,
|
|
|
- page: ++this.page,
|
|
|
- pageSize: this.pageSize,
|
|
|
- dataContent,
|
|
|
- authId: this.authId,
|
|
|
+ serviceid: id,
|
|
|
+ datacontent,
|
|
|
event: '0'
|
|
|
});
|
|
|
if (code == 0) {
|
|
@@ -575,9 +584,9 @@ export default {
|
|
|
for (let i = 0; i < data.length; i++) {
|
|
|
let obj = {}
|
|
|
if (event == 1) {
|
|
|
- obj.Value = data[i]
|
|
|
+ obj.value = data[i]
|
|
|
} else if (event == 2) {
|
|
|
- obj.Value = data[i]
|
|
|
+ obj.value = data[i]
|
|
|
obj.filter = {}
|
|
|
if (Array.isArray(key)) {
|
|
|
const keys = []
|
|
@@ -588,22 +597,23 @@ export default {
|
|
|
keys.push(Object.keys(dep))
|
|
|
vals.push(Object.values(dep))
|
|
|
}
|
|
|
- const nobj = {
|
|
|
- "left": "(",
|
|
|
- "column": `${keys[i]}`,
|
|
|
- "comparator": "=",
|
|
|
- "value": `${vals[i]}`,
|
|
|
- "right": ")",
|
|
|
- "connector": "and"
|
|
|
- }
|
|
|
+ // const nobj = {
|
|
|
+ // "left": "(",
|
|
|
+ // "column": `${keys[i]}`,
|
|
|
+ // "comparator": "=",
|
|
|
+ // "value": `${vals[i]}`,
|
|
|
+ // "right": ")",
|
|
|
+ // "connector": "and"
|
|
|
+ // }
|
|
|
+
|
|
|
obj.filter.push(nobj)
|
|
|
- if (obj.Value.hasOwnProperty(keys[i])) {
|
|
|
- delete obj.Value[keys[i]]
|
|
|
+ if (obj.value.hasOwnProperty(keys[i])) {
|
|
|
+ delete obj.value[keys[i]]
|
|
|
}
|
|
|
} else {
|
|
|
obj.filter[key] = data[i][key]
|
|
|
- if (obj.Value[key]) {
|
|
|
- delete obj.Value[key]
|
|
|
+ if (obj.value[key]) {
|
|
|
+ delete obj.value[key]
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
@@ -613,20 +623,16 @@ export default {
|
|
|
}
|
|
|
} else {
|
|
|
let obj = {}
|
|
|
+ obj.filter = {}
|
|
|
if (event == 1) {
|
|
|
- obj.Value = data
|
|
|
+ obj.value = data
|
|
|
} else if (event == 2) {
|
|
|
- obj.Value = data
|
|
|
- obj.filter = [{
|
|
|
- "left": "(",
|
|
|
- "column": `${key}`,
|
|
|
- "comparator": "=",
|
|
|
- "value": `${data[key]}`,
|
|
|
- "right": ")",
|
|
|
- "connector": "and"
|
|
|
- }]
|
|
|
- if (obj.Value[key]) {
|
|
|
- delete obj.Value[key]
|
|
|
+ obj.value = data
|
|
|
+ console.log(obj.filter)
|
|
|
+ obj.filter[key]=obj.value[key]
|
|
|
+ console.log(obj.filter)
|
|
|
+ if (obj.value[key]) {
|
|
|
+ delete obj.value[key]
|
|
|
}
|
|
|
} else {
|
|
|
obj = data
|
|
@@ -639,8 +645,8 @@ export default {
|
|
|
async generalDataReception (event, data, key) {
|
|
|
try {
|
|
|
const params = {
|
|
|
- serviceId: this.serviceId,
|
|
|
- dataContent: this.formatChange(data, event, key),
|
|
|
+ serviceid: this.queryId,
|
|
|
+ datacontent: this.formatChange(data, event, key),
|
|
|
event: `${event}`,
|
|
|
};
|
|
|
const { code } =
|
|
@@ -685,36 +691,40 @@ export default {
|
|
|
},
|
|
|
//初始化表格
|
|
|
initTableData () {
|
|
|
- this.tableColsCopy = this.tableCols.filter((item) => item.needShow);
|
|
|
- this.tableColsCopy = _.orderBy(this.tableColsCopy, ['orderNumber'], ['asc']);
|
|
|
+ console.log(this.tableCols)
|
|
|
+ this.tableColsCopy = this.tableCols.filter((item) => item.isdisplay==2);
|
|
|
+ this.tableColsCopy = _.orderBy(this.tableColsCopy, ['displaynumber'], ['asc']);
|
|
|
+ this.formItem = this.tableCols.filter((item) => item.isdisplay==2 || item.isdisplay==3);
|
|
|
+ console.log(this.formItem)
|
|
|
+ this.formItem = _.orderBy(this.formItem, ['displaynumber'], ['asc']);
|
|
|
this.tableDataCopy = _.cloneDeep(this.tableData);
|
|
|
const datas = _.cloneDeep(this.tableColsCopy);
|
|
|
// const reqUts = [];
|
|
|
datas.forEach(async (item) => {
|
|
|
if (item.needGroup) {
|
|
|
- this.tableGroups.push(item.columnName);
|
|
|
+ this.tableGroups.push(item.columncode);
|
|
|
}
|
|
|
if (item.listqueryTemplateID || item.listqueryTemplateID == 0) {
|
|
|
- this.tableArrs.push(item.columnName);
|
|
|
+ this.tableArrs.push(item.columncode);
|
|
|
// const reqUt = this.getSelectData(item.listqueryTemplateID)
|
|
|
// reqUts.push(reqUt)
|
|
|
- if (!this.tableOptions[item.columnName]) {
|
|
|
+ if (!this.tableOptions[item.columncode]) {
|
|
|
//开始位置beginPosition 结束位置endPosition (区分开始结束位置必须传null)
|
|
|
if (
|
|
|
- item.columnName == "alarmSceneId"
|
|
|
+ item.columncode == "alarmSceneId"
|
|
|
) {
|
|
|
- this.tableOptions[item.columnName] = await this.getSelectData(
|
|
|
+ this.tableOptions[item.columncode] = await this.getSelectData(
|
|
|
item.listqueryTemplateID,
|
|
|
this.urlParams,
|
|
|
true
|
|
|
);
|
|
|
} else {
|
|
|
- this.tableOptions[item.columnName] = await this.getSelectData(
|
|
|
+ this.tableOptions[item.columncode] = await this.getSelectData(
|
|
|
item.listqueryTemplateID
|
|
|
);
|
|
|
}
|
|
|
- this.tabledatacopy[item.columnName] = _.cloneDeep(
|
|
|
- this.tableOptions[item.columnName]
|
|
|
+ this.tabledatacopy[item.columncode] = _.cloneDeep(
|
|
|
+ this.tableOptions[item.columncode]
|
|
|
);
|
|
|
}
|
|
|
}
|
|
@@ -883,10 +893,10 @@ export default {
|
|
|
tableLoad () { },
|
|
|
//表格-新增
|
|
|
handleAdd () {
|
|
|
- const { open_method, route_info } = this.btnAddObj
|
|
|
- if (open_method) {
|
|
|
- if (open_method != 3) {
|
|
|
- this.autoBtnClick(open_method, route_info)
|
|
|
+ const { openmode, pageroute } = this.btnAddObj
|
|
|
+ if (openmode) {
|
|
|
+ if (openmode != 2) {
|
|
|
+ this.autoBtnClick(openmode, pageroute)
|
|
|
} else {
|
|
|
this.flag = true;
|
|
|
this.tableType = "add";
|
|
@@ -897,11 +907,14 @@ export default {
|
|
|
},
|
|
|
//表格-编辑
|
|
|
async handleEdit (row) {
|
|
|
- const { open_method, route_info } = this.btnEditObj
|
|
|
- if (open_method) {
|
|
|
- if (open_method != 3) {
|
|
|
- this.autoBtnClick(open_method, route_info)
|
|
|
+ const { openmode, pageroute } = this.btnEditObj
|
|
|
+ console.log(this.btnEditObj)
|
|
|
+ if (openmode) {
|
|
|
+ if (openmode != 2) {
|
|
|
+ this.autoBtnClick(openmode, pageroute)
|
|
|
} else {
|
|
|
+ console.log(111)
|
|
|
+
|
|
|
this.flag = true;
|
|
|
this.tableType = "edit";
|
|
|
this.tableTitle = "编辑";
|
|
@@ -911,10 +924,10 @@ export default {
|
|
|
},
|
|
|
//表格-其他类型按钮操作
|
|
|
handleOther (row, auth) {
|
|
|
- const { open_method, route_info } = auth
|
|
|
- if (open_method) {
|
|
|
- if (open_method != 3) {
|
|
|
- this.autoBtnClick(open_method, route_info)
|
|
|
+ const { openmode, pageroute } = auth
|
|
|
+ if (openmode) {
|
|
|
+ if (openmode != 2) {
|
|
|
+ this.autoBtnClick(openmode, pageroute)
|
|
|
} else {
|
|
|
console.log(row)
|
|
|
}
|
|
@@ -922,7 +935,7 @@ export default {
|
|
|
},
|
|
|
//表格-数据恢复
|
|
|
async handleRecord (row) {
|
|
|
- const { open_method, route_info } = this.btnRecordObj
|
|
|
+ const { openmode, pageroute } = this.btnRecordObj
|
|
|
console.log(code)
|
|
|
|
|
|
const params = {
|
|
@@ -954,10 +967,10 @@ export default {
|
|
|
},
|
|
|
//表格-删除
|
|
|
handleRemove (row) {
|
|
|
- const { open_method, route_info } = this.btnDelObj
|
|
|
- if (open_method) {
|
|
|
- if (open_method != 3) {
|
|
|
- this.autoBtnClick(open_method, route_info)
|
|
|
+ const { openmode, pageroute } = this.btnDelObj
|
|
|
+ if (openmode) {
|
|
|
+ if (openmode != 2) {
|
|
|
+ this.autoBtnClick(openmode, pageroute)
|
|
|
} else {
|
|
|
this.rmFlag = true;
|
|
|
this.rmTitle = row[this.rowTitle];
|
|
@@ -988,8 +1001,8 @@ export default {
|
|
|
if (dataBtns && dataBtns.length) {
|
|
|
const clickBtn = dataBtns.filter(item => item.relation_data == column.property)[0]
|
|
|
if (clickBtn) {
|
|
|
- const { open_method, route_info, pass_parameters } = clickBtn
|
|
|
- if (open_method == 2) {
|
|
|
+ const { openmode, pageroute, pass_parameters } = clickBtn
|
|
|
+ if (openmode == 2) {
|
|
|
if (pass_parameters) {
|
|
|
const query = pass_parameters.split(',')
|
|
|
const obj = {}
|
|
@@ -997,11 +1010,11 @@ export default {
|
|
|
obj[item] = row[item]
|
|
|
})
|
|
|
this.$router.push({
|
|
|
- path: route_info,
|
|
|
+ path: pageroute,
|
|
|
query: obj
|
|
|
})
|
|
|
} else {
|
|
|
- this.autoBtnClick(open_method, route_info)
|
|
|
+ this.autoBtnClick(openmode, pageroute)
|
|
|
}
|
|
|
}
|
|
|
}
|