Browse Source

合并代码

feature
mk 2 years ago
parent
commit
5d644018e5
  1. 39
      src/views/modules/communityService/labelConfig/addForm.vue

39
src/views/modules/communityService/labelConfig/addForm.vue

@ -7,7 +7,7 @@
class="div_form"
:rules="rules"
>
<!-- v-if="formType == 'info'&& addFormLabel" -->
<!-- v-if="!formState&& addFormLabel" -->
<el-form-item
label="标签名称"
label-width="100px"
@ -22,6 +22,7 @@
@select="handleSelect"
></el-autocomplete>
</el-form-item>
<span style="position: relative;top: 10px;">您可以按关键词查找使用已有标签也可以新建标签</span>
<!-- <el-form-item label="标签名称(新增)" label-width="100px" prop="tagName" v-else>
<el-input
v-model="formData.tagName"
@ -31,14 +32,14 @@
></el-input>
</el-form-item> -->
</el-form>
<p style="margin-left: 15px"><b style="color: #f56c6c">*</b> 匹配数据</p>
<p style="margin-left: 15px"><b style="color: #f56c6c">*</b> 设置标签查询条件</p>
<el-table border :data="tableData" style="width: 100%" height="200">
<el-table-column label="选择数据源" align="center" width="120">
<template slot-scope="scope">
<el-select
v-model="scope.row.dataSource"
placeholder="请选择"
:disabled="formType == 'info'"
:disabled="!formState"
@change="handleChangeSource(scope.row, scope.$index)"
clearable
>
@ -58,7 +59,7 @@
<el-select
v-model="scope.row.itemGroupId"
placeholder="请选择"
:disabled="formType == 'info'"
:disabled="!formState"
clearable
@change="handleChangeFieldsType(scope.row, scope.$index)"
>
@ -76,7 +77,7 @@
<template slot-scope="scope">
<el-select
v-model="scope.row.itemId"
:disabled="formType == 'info'"
:disabled="!formState"
placeholder="请选择"
@change="handleChangeFieldsName(scope.row, scope.$index)"
@clear="handleClearItemId(scope.row, scope.$index)"
@ -99,7 +100,7 @@
<el-select
v-model="scope.row.queryType"
placeholder="请选择"
:disabled="formType == 'info'"
:disabled="!formState"
clearable
>
<el-option
@ -122,7 +123,7 @@
item.itemType == 'checkbox'
"
v-model="scope.row.colVal"
:disabled="formType == 'info'"
:disabled="!formState"
placeholder="请选择"
clearable
>
@ -139,7 +140,7 @@
item.itemType === 'input' || item.itemType === 'textarea'
"
v-model="scope.row.colVal"
:disabled="formType == 'info'"
:disabled="!formState"
placeholder="请输入"
clearable
>
@ -148,7 +149,7 @@
v-else-if="item.itemType === 'inputNum'"
class="item_width_2"
v-model="scope.row.colVal"
:disabled="formType == 'info'"
:disabled="!formState"
:min="0"
size="mini"
label="请输入"
@ -159,7 +160,7 @@
"
v-model="scope.row.colVal"
class="item_width_2"
:disabled="formType == 'info'"
:disabled="!formState"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
value="yyyy-MM-dd HH:mm:ss"
@ -170,7 +171,7 @@
v-else
class="item_width_2"
size="mini"
:disabled="formType == 'info'"
:disabled="!formState"
placeholder="请输入"
v-model="personItem.colVal"
>
@ -186,7 +187,7 @@
<el-select
v-model="scope.row.nextLogicalRel"
placeholder="请选择"
:disabled="formType == 'info'"
:disabled="!formState"
clearable
>
<el-option
@ -204,7 +205,7 @@
label="操作"
align="center"
width="120"
v-if="formType != 'info'"
v-if="formState"
>
<template slot-scope="scope">
<el-button
@ -283,7 +284,7 @@ export default {
{ label: "并且", value: "and" },
{ label: "或者", value: "or" },
],
addFormLabel:true
formState:true
};
},
created() {},
@ -314,9 +315,7 @@ export default {
? searchList.filter(this.createStateFilter(val))
: searchList;
if (results.length == 0) {
this.tableData = []
this.handleClickAddRow();
this.addFormLabel = false
// this.handleClickAddRow();
this.formType = "add";
} else {
this.formType = "info";
@ -329,8 +328,6 @@ export default {
handelChangeTagName(val){
if(this.formData.tagName.length == 0 ){
this.formType = 'info'
this.tableData = []
this.addFormLabel = true
}
},
createStateFilter(val) {
@ -340,6 +337,7 @@ export default {
},
async handleSelect(item) {
console.log(item);
this.formState = item.editable
await this.initForm(item.editable?'edit':'info', item);
},
async getLabelList() {
@ -364,7 +362,6 @@ export default {
let { data, code, msg } = await requestPost(url, params);
if (code == 0) {
this.$set(this.tableData[index], "itemGroupIdOpction", data);
console.log(this.tableData[index].itemGroupIdOpction);
} else {
this.$message.error(msg);
}
@ -455,7 +452,6 @@ export default {
},
//
async handleChangeFieldsName(row, index, type) {
console.log(row, "字段名称row");
var arr = [];
// colKeycolumnName
if (row.dataSource == "house" || row.dataSource == "stat") {
@ -504,7 +500,6 @@ export default {
this.$set(this.tableData[index], "correspondingOpction", arr);
}
console.log(this.tableData);
},
async getCompareList() {
const url = "/sys/dict/data/dictlist";

Loading…
Cancel
Save