|
|
|
@ -39,7 +39,6 @@ |
|
|
|
<el-select |
|
|
|
v-model="scope.row.dataSource" |
|
|
|
placeholder="请选择" |
|
|
|
:disabled="!formState" |
|
|
|
@change="handleChangeSource(scope.row, scope.$index)" |
|
|
|
clearable |
|
|
|
> |
|
|
|
@ -59,7 +58,6 @@ |
|
|
|
<el-select |
|
|
|
v-model="scope.row.itemGroupId" |
|
|
|
placeholder="请选择" |
|
|
|
:disabled="!formState" |
|
|
|
clearable |
|
|
|
@change="handleChangeFieldsType(scope.row, scope.$index)" |
|
|
|
> |
|
|
|
@ -77,7 +75,6 @@ |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-select |
|
|
|
v-model="scope.row.itemId" |
|
|
|
:disabled="!formState" |
|
|
|
placeholder="请选择" |
|
|
|
@change="handleChangeFieldsName(scope.row, scope.$index)" |
|
|
|
@clear="handleClearItemId(scope.row, scope.$index)" |
|
|
|
@ -100,8 +97,8 @@ |
|
|
|
<el-select |
|
|
|
v-model="scope.row.queryType" |
|
|
|
placeholder="请选择" |
|
|
|
:disabled="!formState" |
|
|
|
clearable |
|
|
|
@change="changeFormState = true" |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="item in queryTypeOpction" |
|
|
|
@ -123,7 +120,8 @@ |
|
|
|
item.itemType == 'checkbox' |
|
|
|
" |
|
|
|
v-model="scope.row.colVal" |
|
|
|
:disabled="!formState" |
|
|
|
@change="changeFormState = true" |
|
|
|
|
|
|
|
placeholder="请选择" |
|
|
|
clearable |
|
|
|
> |
|
|
|
@ -140,7 +138,8 @@ |
|
|
|
item.itemType === 'input' || item.itemType === 'textarea' |
|
|
|
" |
|
|
|
v-model="scope.row.colVal" |
|
|
|
:disabled="!formState" |
|
|
|
@change="changeFormState = true" |
|
|
|
|
|
|
|
placeholder="请输入" |
|
|
|
clearable |
|
|
|
> |
|
|
|
@ -149,7 +148,8 @@ |
|
|
|
v-else-if="item.itemType === 'inputNum'" |
|
|
|
class="item_width_2" |
|
|
|
v-model="scope.row.colVal" |
|
|
|
:disabled="!formState" |
|
|
|
@change="changeFormState = true" |
|
|
|
|
|
|
|
:min="0" |
|
|
|
size="mini" |
|
|
|
label="请输入" |
|
|
|
@ -158,9 +158,10 @@ |
|
|
|
v-else-if=" |
|
|
|
item.itemType === 'datepicker' || item.itemType === 'date' |
|
|
|
" |
|
|
|
@change="changeFormState = true" |
|
|
|
|
|
|
|
v-model="scope.row.colVal" |
|
|
|
class="item_width_2" |
|
|
|
:disabled="!formState" |
|
|
|
type="datetime" |
|
|
|
value-format="yyyy-MM-dd HH:mm:ss" |
|
|
|
value="yyyy-MM-dd HH:mm:ss" |
|
|
|
@ -171,9 +172,10 @@ |
|
|
|
v-else |
|
|
|
class="item_width_2" |
|
|
|
size="mini" |
|
|
|
:disabled="!formState" |
|
|
|
placeholder="请输入" |
|
|
|
v-model="personItem.colVal" |
|
|
|
v-model="scope.row.colVal" |
|
|
|
@change="changeFormState = true" |
|
|
|
|
|
|
|
> |
|
|
|
</el-input> |
|
|
|
</template> |
|
|
|
@ -187,7 +189,8 @@ |
|
|
|
<el-select |
|
|
|
v-model="scope.row.nextLogicalRel" |
|
|
|
placeholder="请选择" |
|
|
|
:disabled="!formState" |
|
|
|
@change="changeFormState = true" |
|
|
|
|
|
|
|
clearable |
|
|
|
> |
|
|
|
<el-option |
|
|
|
@ -205,7 +208,6 @@ |
|
|
|
label="操作" |
|
|
|
align="center" |
|
|
|
width="120" |
|
|
|
v-if="formState" |
|
|
|
> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-button |
|
|
|
@ -232,6 +234,7 @@ |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
<p v-if="changeFormState && !formState">您已变更了“{{this.formData.tagName}}”标签的查询条件,请按新条件修改原标签名称,便于以后再次查找使用。</p> |
|
|
|
<div class="div_btn"> |
|
|
|
<el-button size="small" @click="handleCancle">取 消</el-button> |
|
|
|
<el-button size="small" type="primary" @click="handleComfirm" |
|
|
|
@ -284,7 +287,8 @@ export default { |
|
|
|
{ label: "并且", value: "and" }, |
|
|
|
{ label: "或者", value: "or" }, |
|
|
|
], |
|
|
|
formState:true |
|
|
|
formState:true, |
|
|
|
changeFormState:false |
|
|
|
}; |
|
|
|
}, |
|
|
|
created() {}, |
|
|
|
@ -304,9 +308,9 @@ export default { |
|
|
|
this.tagId = row.tagId; |
|
|
|
this.tagObj = row; |
|
|
|
for (let i in this.tableData) { |
|
|
|
await this.handleChangeSource(this.tableData[i], [i], type); |
|
|
|
await this.handleChangeFieldsType(this.tableData[i], [i], type); |
|
|
|
await this.handleChangeFieldsName(this.tableData[i], [i], type); |
|
|
|
await this.handleChangeSource(this.tableData[i], [i], type,true); |
|
|
|
await this.handleChangeFieldsType(this.tableData[i], [i], type,true); |
|
|
|
await this.handleChangeFieldsName(this.tableData[i], [i], type,true); |
|
|
|
} |
|
|
|
}, |
|
|
|
querySearchAsync(val, cb) { |
|
|
|
@ -336,9 +340,8 @@ export default { |
|
|
|
}; |
|
|
|
}, |
|
|
|
async handleSelect(item) { |
|
|
|
console.log(item); |
|
|
|
this.formState = item.editable |
|
|
|
await this.initForm(item.editable?'edit':'info', item); |
|
|
|
await this.initForm('edit', item); |
|
|
|
}, |
|
|
|
async getLabelList() { |
|
|
|
const url = "/governance/resiSearchTag/listResiSearchTags"; |
|
|
|
@ -353,7 +356,10 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
// 选择数据源 |
|
|
|
async handleChangeSource(row, index, type) { |
|
|
|
async handleChangeSource(row, index, type,state) { |
|
|
|
if(!state){ |
|
|
|
this.changeFormState = true |
|
|
|
} |
|
|
|
if (row.dataSource == "resi") { |
|
|
|
let url = "/oper/customize/icformitemgroup/list"; |
|
|
|
let params = { |
|
|
|
@ -426,8 +432,11 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
// 字段类别修改 |
|
|
|
async handleChangeFieldsType(row, index, type) { |
|
|
|
console.log(row, index, "字段类别row"); |
|
|
|
async handleChangeFieldsType(row, index, type,state) { |
|
|
|
if(!state){ |
|
|
|
this.changeFormState = true |
|
|
|
} |
|
|
|
// console.log(row, index, "字段类别row"); |
|
|
|
if (row.dataSource != "resi") return; |
|
|
|
const url = "/oper/customize/icformitem/getItemListV2"; |
|
|
|
let params = { |
|
|
|
@ -451,7 +460,10 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
// 字段名称修改 |
|
|
|
async handleChangeFieldsName(row, index, type) { |
|
|
|
async handleChangeFieldsName(row, index, type,state) { |
|
|
|
if(!state){ |
|
|
|
this.changeFormState = true |
|
|
|
} |
|
|
|
var arr = []; |
|
|
|
// 人的信息中colKey的字段是columnName要做一下判断 |
|
|
|
if (row.dataSource == "house" || row.dataSource == "stat") { |
|
|
|
@ -536,14 +548,14 @@ export default { |
|
|
|
const url = `/governance/resiSearchTag/listResiSearchRulesByTagId?tagId=${id}`; |
|
|
|
let { code, msg, data } = await requestGet(url); |
|
|
|
if (code == 0) { |
|
|
|
console.log(data, "获取到的详情信息"); |
|
|
|
// console.log(data, "获取到的详情信息"); |
|
|
|
this.tableData = data; |
|
|
|
} else if (code >= 8000) { |
|
|
|
this.$message.error(msg); |
|
|
|
} |
|
|
|
}, |
|
|
|
async handleComfirm() { |
|
|
|
if (this.formType != "info") { |
|
|
|
if (this.changeFormState) { |
|
|
|
this.$refs.label_form.validate((flag) => { |
|
|
|
if (flag) { |
|
|
|
let messageObj = {}; |
|
|
|
@ -575,14 +587,14 @@ export default { |
|
|
|
async addSubmit() { |
|
|
|
var url = ""; |
|
|
|
var params = {}; |
|
|
|
if (this.formType == "edit") { |
|
|
|
if ( this.changeFormState && this.formState) { |
|
|
|
url = "/governance/resiSearchTag/updateResiSearchTag"; |
|
|
|
params = { |
|
|
|
tagName: this.formData.tagName, |
|
|
|
rules: this.tableData, |
|
|
|
tagId: this.tagId, |
|
|
|
}; |
|
|
|
} else if (this.formType == "add") { |
|
|
|
} else { |
|
|
|
url = "/governance/resiSearchTag/addResiSearchTag"; |
|
|
|
params = { |
|
|
|
tagName: this.formData.tagName, |
|
|
|
@ -668,6 +680,7 @@ export default { |
|
|
|
}, |
|
|
|
// 删除一行 |
|
|
|
handleClickDelete(index) { |
|
|
|
this.changeFormState = true |
|
|
|
this.tableData.splice(index, 1); |
|
|
|
}, |
|
|
|
handleClearItemId(row, index) { |
|
|
|
|