|
@@ -20,21 +20,23 @@
|
|
}
|
|
}
|
|
|
|
|
|
.left_header {
|
|
.left_header {
|
|
|
|
+ height: 40px;
|
|
display: flex;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
justify-content: space-between;
|
|
.tips {
|
|
.tips {
|
|
margin-top: 15px;
|
|
margin-top: 15px;
|
|
}
|
|
}
|
|
.inp {
|
|
.inp {
|
|
- width: 280px;
|
|
|
|
-
|
|
|
|
|
|
+ width: 150px;
|
|
/deep/.el-input__inner {
|
|
/deep/.el-input__inner {
|
|
height: 30px;
|
|
height: 30px;
|
|
margin-top: 10px;
|
|
margin-top: 10px;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ .right_header {
|
|
|
|
+ display: flex;
|
|
|
|
+ }
|
|
.table_form {
|
|
.table_form {
|
|
width: 100%;
|
|
width: 100%;
|
|
box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
@@ -63,9 +65,8 @@
|
|
height: calc(100vh - 410px);
|
|
height: calc(100vh - 410px);
|
|
}
|
|
}
|
|
.tabs {
|
|
.tabs {
|
|
- float: left;
|
|
|
|
- max-width: 49%;
|
|
|
|
- min-width: 49%;
|
|
|
|
|
|
+ max-width: 100%;
|
|
|
|
+ min-width: 100%;
|
|
}
|
|
}
|
|
.form_btn {
|
|
.form_btn {
|
|
display: flex;
|
|
display: flex;
|
|
@@ -73,8 +74,33 @@
|
|
}
|
|
}
|
|
}
|
|
}
|
|
.table_right {
|
|
.table_right {
|
|
- width: 300px;
|
|
|
|
|
|
+ flex: 1;
|
|
background: #ffffff;
|
|
background: #ffffff;
|
|
|
|
+ padding: 0 50px;
|
|
|
|
+ .right_box {
|
|
|
|
+ margin: 30px 0;
|
|
|
|
+ overflow: hidden;
|
|
|
|
+ overflow-y: auto;
|
|
|
|
+ height: calc(100vh - 410px);
|
|
|
|
+ }
|
|
|
|
+ .tabs {
|
|
|
|
+ max-width: 100%;
|
|
|
|
+ min-width: 100%;
|
|
|
|
+ }
|
|
|
|
+ .inp {
|
|
|
|
+ width: 100px;
|
|
|
|
+ /deep/.el-input__inner {
|
|
|
|
+ height: 30px;
|
|
|
|
+ margin-top: 10px;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ .inps {
|
|
|
|
+ margin-right: 10px;
|
|
|
|
+ }
|
|
|
|
+ .form_btn {
|
|
|
|
+ display: flex;
|
|
|
|
+ justify-content: space-between;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
/deep/.el-select-dropdown__item.hover,
|
|
/deep/.el-select-dropdown__item.hover,
|
|
@@ -100,55 +126,20 @@
|
|
/deep/ .el-form-item.is-success .el-textarea__inner {
|
|
/deep/ .el-form-item.is-success .el-textarea__inner {
|
|
border-color: #c9c9c9 !important;
|
|
border-color: #c9c9c9 !important;
|
|
}
|
|
}
|
|
- .conceptSearch {
|
|
|
|
- width: 100%;
|
|
|
|
- text-align: center;
|
|
|
|
- z-index: 2;
|
|
|
|
- padding: 30px;
|
|
|
|
- box-sizing: border-box;
|
|
|
|
- .conceptTitle {
|
|
|
|
- width: 100%;
|
|
|
|
- text-align: center;
|
|
|
|
- padding: 20px 0;
|
|
|
|
- }
|
|
|
|
- .searchText {
|
|
|
|
- padding: 0 35px 0 15px;
|
|
|
|
- width: 100%;
|
|
|
|
- height: 34px;
|
|
|
|
- border: 1px solid #c9c9c9;
|
|
|
|
- box-sizing: border-box;
|
|
|
|
- }
|
|
|
|
- .conceptList {
|
|
|
|
- min-height: 200px;
|
|
|
|
- max-height: 300px;
|
|
|
|
- margin: -2px auto 0;
|
|
|
|
- border: 1px solid #e1dfdf;
|
|
|
|
- overflow: hidden;
|
|
|
|
- overflow-y: auto;
|
|
|
|
- }
|
|
|
|
- .conceptItem {
|
|
|
|
- height: 34px;
|
|
|
|
- line-height: 34px;
|
|
|
|
- text-align: left;
|
|
|
|
- padding: 0 15px;
|
|
|
|
- cursor: pointer;
|
|
|
|
- }
|
|
|
|
- .conceptItem:hover {
|
|
|
|
- background: #f5f7fa;
|
|
|
|
- }
|
|
|
|
- .searchWrap {
|
|
|
|
- position: relative;
|
|
|
|
- .search {
|
|
|
|
- position: absolute;
|
|
|
|
- right: 7px;
|
|
|
|
- top: 8px;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- .noresult {
|
|
|
|
- padding: 20px 0;
|
|
|
|
- color: #ccc;
|
|
|
|
- }
|
|
|
|
|
|
+}
|
|
|
|
+.test_box {
|
|
|
|
+ min-height: 300px;
|
|
|
|
+ max-height: 300px;
|
|
|
|
+ outline: 0;
|
|
|
|
+ border: 1px solid #dcdfe6;
|
|
|
|
+ font-size: 14px;
|
|
|
|
+ line-height: 1.5;
|
|
|
|
+ word-wrap: break-word;
|
|
|
|
+ overflow-x: hidden;
|
|
|
|
+ overflow-y: auto;
|
|
|
|
+ border-radius: 4px;
|
|
|
|
+ margin-top: 6px;
|
|
|
|
+ padding: 10px 15px;
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|
|
<template>
|
|
<template>
|
|
@@ -208,13 +199,17 @@
|
|
<div class="table_left">
|
|
<div class="table_left">
|
|
<div class="left_header">
|
|
<div class="left_header">
|
|
<h4 class="tips">关联的术语({{form.concepts.length}})</h4>
|
|
<h4 class="tips">关联的术语({{form.concepts.length}})</h4>
|
|
- <el-input v-model="searchtext" @input="searchList" placeholder="请搜索" class="inp"></el-input>
|
|
|
|
|
|
+ <div style="display:flex">
|
|
|
|
+ <el-input v-model="searchtext" @input="searchList" placeholder="标准术语关键词" class="inp"></el-input>
|
|
|
|
+ <span style="display:flex;align-items: center;margin:0 5px">-</span>
|
|
|
|
+ <el-input v-model="searchtext2" @input="searchList" placeholder="标准术语关键词" class="inp"></el-input>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="left_box">
|
|
<div class="left_box">
|
|
<el-table
|
|
<el-table
|
|
- v-if="firstList.length>0"
|
|
|
|
- :data="firstList"
|
|
|
|
|
|
+ v-if="leftList.length>0"
|
|
|
|
+ :data="leftList"
|
|
border
|
|
border
|
|
class="tabs"
|
|
class="tabs"
|
|
:header-row-style="{height:'40px'}"
|
|
:header-row-style="{height:'40px'}"
|
|
@@ -232,60 +227,84 @@
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <div class="form_btn">
|
|
|
|
+ <el-button type="primary" size="medium " @click="saveSet">确定</el-button>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="table_right">
|
|
|
|
+ <div class="right_header">
|
|
|
|
+ <el-select
|
|
|
|
+ v-model="formInline.logicalOperator"
|
|
|
|
+ class="inp inps"
|
|
|
|
+ @change="searchConcept"
|
|
|
|
+ >
|
|
|
|
+ <el-option label="and" value="0"></el-option>
|
|
|
|
+ <el-option label="or" value="1"></el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="formInline.name1"
|
|
|
|
+ @input="searchConcept"
|
|
|
|
+ placeholder="标准术语关键字"
|
|
|
|
+ class="inp"
|
|
|
|
+ ></el-input>
|
|
|
|
+ <span style="display:flex;align-items: center;margin:0 5px">-</span>
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="formInline.name2"
|
|
|
|
+ @input="searchConcept"
|
|
|
|
+ placeholder="标准术语关键字"
|
|
|
|
+ class="inp"
|
|
|
|
+ ></el-input>
|
|
|
|
+ <span style="display:flex;align-items: center;margin:0 5px">-</span>
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="formInline.name3"
|
|
|
|
+ @input="searchConcept"
|
|
|
|
+ placeholder="标准术语关键字"
|
|
|
|
+ class="inp"
|
|
|
|
+ ></el-input>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <div class="right_box">
|
|
<el-table
|
|
<el-table
|
|
- v-if="lastList.length>0"
|
|
|
|
- :data="lastList"
|
|
|
|
|
|
+ v-if="conceptList.length>0"
|
|
|
|
+ :data="conceptList"
|
|
border
|
|
border
|
|
class="tabs"
|
|
class="tabs"
|
|
|
|
+ @row-click="btn"
|
|
:header-row-style="{height:'40px'}"
|
|
:header-row-style="{height:'40px'}"
|
|
:header-cell-style="{height:'40px',padding:'0',background:'#f7f7f7'}"
|
|
:header-cell-style="{height:'40px',padding:'0',background:'#f7f7f7'}"
|
|
|
|
+ @selection-change="handleSelectionChange"
|
|
>
|
|
>
|
|
- <el-table-column prop="conceptLibName" :show-overflow-tooltip="true" label="术语名称"></el-table-column>
|
|
|
|
- <el-table-column label="操作" fixed="right">
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
- <el-button
|
|
|
|
- type="text"
|
|
|
|
- size="small"
|
|
|
|
- class="delete"
|
|
|
|
- @click="showDelDialog(scope.row)"
|
|
|
|
- >移除</el-button>
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
|
|
+ <el-table-column type="selection"></el-table-column>
|
|
|
|
+ <el-table-column prop="conceptName" :show-overflow-tooltip="true" label="术语名称"></el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
</div>
|
|
</div>
|
|
-
|
|
|
|
<div class="form_btn">
|
|
<div class="form_btn">
|
|
- <el-button type="primary" size="medium " @click="saveSet">确定</el-button>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- <div class="table_right">
|
|
|
|
- <div class="conceptSearch" ref="conceptSearch">
|
|
|
|
- <h4 class="conceptTitle">添加关联术语</h4>
|
|
|
|
- <p class="searchWrap">
|
|
|
|
- <img class="search" src="../../images/search.png" alt="搜索" />
|
|
|
|
- <input
|
|
|
|
- v-model.trim="conceptText"
|
|
|
|
- @input="searchConcept"
|
|
|
|
- type="text"
|
|
|
|
- ref="conceptInput"
|
|
|
|
- class="searchText"
|
|
|
|
- placeholder="请输入关键词搜索"
|
|
|
|
- />
|
|
|
|
- </p>
|
|
|
|
- <ul class="conceptList" ref="conceptList">
|
|
|
|
- <li
|
|
|
|
- v-for="item in conceptList"
|
|
|
|
- class="conceptItem ellipsis"
|
|
|
|
- :title="item.conceptName"
|
|
|
|
- @click="selectConcept(item)"
|
|
|
|
- :key="item.conceptId"
|
|
|
|
- >{{item.conceptName}}</li>
|
|
|
|
- <li class="noresult" v-if="conceptList.length==0">暂无结果~</li>
|
|
|
|
- </ul>
|
|
|
|
|
|
+ <el-button type="primary" size="medium " @click="add">添加</el-button>
|
|
|
|
+ <el-button type="primary" size="medium " @click="dialogVisible = true">文本批量添加</el-button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
+ <el-dialog
|
|
|
|
+ title="请输入要添加到关联的标准术语(每行一个)"
|
|
|
|
+ :visible.sync="dialogVisible"
|
|
|
|
+ width="30%"
|
|
|
|
+ @close="cancel"
|
|
|
|
+ >
|
|
|
|
+ <div
|
|
|
|
+ class="test_box"
|
|
|
|
+ contenteditable="true"
|
|
|
|
+ ref="msg"
|
|
|
|
+ style="white-space: pre-wrap"
|
|
|
|
+ @input="handleInput"
|
|
|
|
+ ></div>
|
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
|
+ <el-button @click="cancel">取 消</el-button>
|
|
|
|
+ <el-button type="primary" @click="collectionMatch">确 定</el-button>
|
|
|
|
+ </span>
|
|
|
|
+ </el-dialog>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<script type="text/javascript">
|
|
<script type="text/javascript">
|
|
@@ -297,17 +316,26 @@ export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
title: '术语集合内容维护-添加',
|
|
title: '术语集合内容维护-添加',
|
|
|
|
+ formInline: {
|
|
|
|
+ logicalOperator: '0',
|
|
|
|
+ name1: '',
|
|
|
|
+ name2: '',
|
|
|
|
+ name3: ''
|
|
|
|
+ },
|
|
|
|
+ innerText: '',
|
|
ruleTypeList: [],
|
|
ruleTypeList: [],
|
|
ruleTermTypeList: [],
|
|
ruleTermTypeList: [],
|
|
conceptList: [],
|
|
conceptList: [],
|
|
conceptText: '',
|
|
conceptText: '',
|
|
excludedConceptIds: [],
|
|
excludedConceptIds: [],
|
|
type: [],
|
|
type: [],
|
|
- firstList: [],
|
|
|
|
- lastList: [],
|
|
|
|
|
|
+ leftList: [],
|
|
|
|
+ multipleSelection: [],
|
|
sign: 1,
|
|
sign: 1,
|
|
|
|
+ len: 0,
|
|
searchtext: '',
|
|
searchtext: '',
|
|
- len: null,
|
|
|
|
|
|
+ searchtext2: '',
|
|
|
|
+ dialogVisible: false,
|
|
form: {
|
|
form: {
|
|
collectionLibType: '',
|
|
collectionLibType: '',
|
|
collectionLibName: '',
|
|
collectionLibName: '',
|
|
@@ -343,9 +371,9 @@ export default {
|
|
this.form.conceptLibType = info.concepts[0].conceptLibType;
|
|
this.form.conceptLibType = info.concepts[0].conceptLibType;
|
|
this.form.collectionId = info.collectionId;
|
|
this.form.collectionId = info.collectionId;
|
|
this.form.collectionRemark = info.collectionRemark;
|
|
this.form.collectionRemark = info.collectionRemark;
|
|
|
|
+ this.leftList = info.concepts;
|
|
this.sign = 2;
|
|
this.sign = 2;
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
- this.getList(this.form.concepts);
|
|
|
|
this.getIds(this.form.concepts);
|
|
this.getIds(this.form.concepts);
|
|
this.getTreeSearchList();
|
|
this.getTreeSearchList();
|
|
});
|
|
});
|
|
@@ -355,6 +383,15 @@ export default {
|
|
}, 500);
|
|
}, 500);
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ handleInput(event) {
|
|
|
|
+ let text = event.target.innerText;
|
|
|
|
+ this.innerText = text;
|
|
|
|
+ },
|
|
|
|
+ cancel() {
|
|
|
|
+ this.$refs.msg.innerHTML = '';
|
|
|
|
+ this.innerText = '';
|
|
|
|
+ this.dialogVisible = false;
|
|
|
|
+ },
|
|
cancelRequest() {
|
|
cancelRequest() {
|
|
if (typeof this.source === 'function') {
|
|
if (typeof this.source === 'function') {
|
|
this.source('终止请求');
|
|
this.source('终止请求');
|
|
@@ -398,8 +435,21 @@ export default {
|
|
console.log(error);
|
|
console.log(error);
|
|
});
|
|
});
|
|
},
|
|
},
|
|
- searchList(val) {
|
|
|
|
- let concepts = JSON.parse(JSON.stringify(this.form.concepts));
|
|
|
|
|
|
+ searchList() {
|
|
|
|
+ let concepts, val;
|
|
|
|
+ if (
|
|
|
|
+ (this.searchtext != '' && this.searchtext2 == '') ||
|
|
|
|
+ (this.searchtext == '' && this.searchtext2 != '')
|
|
|
|
+ ) {
|
|
|
|
+ concepts = JSON.parse(JSON.stringify(this.form.concepts));
|
|
|
|
+ val = this.searchtext != '' ? this.searchtext : this.searchtext2;
|
|
|
|
+ } else if (this.searchtext != '' && this.searchtext2 != '') {
|
|
|
|
+ concepts = JSON.parse(JSON.stringify(this.leftList));
|
|
|
|
+ val = this.searchtext2;
|
|
|
|
+ } else if (this.searchtext == '' && this.searchtext2 == '') {
|
|
|
|
+ this.leftList = JSON.parse(JSON.stringify(this.form.concepts));
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
let str = '.*' + val + '.*';
|
|
let str = '.*' + val + '.*';
|
|
let reg = new RegExp(str);
|
|
let reg = new RegExp(str);
|
|
let arr = [];
|
|
let arr = [];
|
|
@@ -409,7 +459,7 @@ export default {
|
|
arr.push(concepts[i]);
|
|
arr.push(concepts[i]);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- this.getList(arr);
|
|
|
|
|
|
+ this.leftList = arr;
|
|
},
|
|
},
|
|
getCollectionLib(newValue) {
|
|
getCollectionLib(newValue) {
|
|
this.ruleTermTypeList.forEach(item => {
|
|
this.ruleTermTypeList.forEach(item => {
|
|
@@ -422,41 +472,66 @@ export default {
|
|
},
|
|
},
|
|
// 基础术语
|
|
// 基础术语
|
|
searchConcept(e) {
|
|
searchConcept(e) {
|
|
- this.conceptText = e.target.value
|
|
|
|
if (this.timeout) {
|
|
if (this.timeout) {
|
|
clearTimeout(this.timeout);
|
|
clearTimeout(this.timeout);
|
|
}
|
|
}
|
|
this.timeout = setTimeout(() => {
|
|
this.timeout = setTimeout(() => {
|
|
- this.getTreeSearchList()
|
|
|
|
|
|
+ this.getTreeSearchList();
|
|
}, 800);
|
|
}, 800);
|
|
},
|
|
},
|
|
- async getTreeSearchList(){
|
|
|
|
|
|
+ async getTreeSearchList() {
|
|
this.whether = true;
|
|
this.whether = true;
|
|
const params = {
|
|
const params = {
|
|
- typeId: this.form.conceptLibType,
|
|
|
|
- name: this.conceptText,
|
|
|
|
- excludedConceptIds: this.excludedConceptIds
|
|
|
|
|
|
+ libType: this.form.conceptLibType,
|
|
|
|
+ names: [
|
|
|
|
+ this.formInline.name1,
|
|
|
|
+ this.formInline.name2,
|
|
|
|
+ this.formInline.name3
|
|
|
|
+ ],
|
|
|
|
+ excludedConceptIds: this.excludedConceptIds,
|
|
|
|
+ logicalOperator: this.formInline.logicalOperator
|
|
};
|
|
};
|
|
- const data = await api.getTreeSearchList(params)
|
|
|
|
|
|
+ const data = await api.searchCollectionConceptVO(params);
|
|
if (data.data.code == '0') {
|
|
if (data.data.code == '0') {
|
|
this.conceptList = data.data.data;
|
|
this.conceptList = data.data.data;
|
|
this.whether = false;
|
|
this.whether = false;
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- // 选择基础术语
|
|
|
|
- selectConcept(item) {
|
|
|
|
|
|
+ btn(row) {
|
|
if (this.whether) {
|
|
if (this.whether) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
let concepts = {
|
|
let concepts = {
|
|
- conceptId: item.conceptId,
|
|
|
|
- conceptLibType: item.conceptNameType,
|
|
|
|
- conceptLibName: item.conceptName
|
|
|
|
|
|
+ conceptId: row.conceptId,
|
|
|
|
+ conceptLibType: row.libType,
|
|
|
|
+ conceptLibName: row.conceptName
|
|
};
|
|
};
|
|
- this.excludedConceptIds.push(item.conceptId);
|
|
|
|
- this.form.concepts.push(concepts);
|
|
|
|
- this.getList(this.form.concepts);
|
|
|
|
- this.conceptList = []
|
|
|
|
|
|
+ this.excludedConceptIds.push(row.conceptId);
|
|
|
|
+ this.leftList.push(concepts);
|
|
|
|
+ this.conceptList = [];
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ this.getTreeSearchList();
|
|
|
|
+ }, 150);
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ handleSelectionChange(val) {
|
|
|
|
+ this.multipleSelection = val;
|
|
|
|
+ },
|
|
|
|
+ add() {
|
|
|
|
+ if (this.whether) {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ this.multipleSelection.forEach(it => {
|
|
|
|
+ let concepts = {
|
|
|
|
+ conceptId: it.conceptId,
|
|
|
|
+ conceptLibType: it.libType,
|
|
|
|
+ conceptLibName: it.conceptName
|
|
|
|
+ };
|
|
|
|
+ this.excludedConceptIds.push(it.conceptId);
|
|
|
|
+ this.leftList.push(concepts);
|
|
|
|
+ });
|
|
|
|
+ this.conceptList = [];
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
this.getTreeSearchList();
|
|
this.getTreeSearchList();
|
|
@@ -479,29 +554,14 @@ export default {
|
|
if (item.conceptId == row.conceptId) {
|
|
if (item.conceptId == row.conceptId) {
|
|
this.form.concepts.splice(index, 1);
|
|
this.form.concepts.splice(index, 1);
|
|
this.excludedConceptIds.splice(index, 1);
|
|
this.excludedConceptIds.splice(index, 1);
|
|
|
|
+ this.leftList.splice(index, 1);
|
|
}
|
|
}
|
|
});
|
|
});
|
|
this.getTreeSearchList();
|
|
this.getTreeSearchList();
|
|
- if (this.searchtext != '') {
|
|
|
|
- this.searchList(this.searchtext);
|
|
|
|
- } else {
|
|
|
|
- this.getList(this.form.concepts);
|
|
|
|
- }
|
|
|
|
},
|
|
},
|
|
getchk(num) {
|
|
getchk(num) {
|
|
return num % 2 == 0 ? '偶数' : '奇数'; //判断是否能整除2
|
|
return num % 2 == 0 ? '偶数' : '奇数'; //判断是否能整除2
|
|
},
|
|
},
|
|
- getList(arr) {
|
|
|
|
- this.firstList = [];
|
|
|
|
- this.lastList = [];
|
|
|
|
- arr.forEach((item, index) => {
|
|
|
|
- if (this.getchk(index) == '偶数') {
|
|
|
|
- this.firstList.push(item);
|
|
|
|
- } else {
|
|
|
|
- this.lastList.push(item);
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
saveSet() {
|
|
saveSet() {
|
|
let params = {
|
|
let params = {
|
|
...this.form,
|
|
...this.form,
|
|
@@ -526,15 +586,50 @@ export default {
|
|
}
|
|
}
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
+ collectionMatch() {
|
|
|
|
+ let params = {
|
|
|
|
+ conceptLibNames: this.innerText,
|
|
|
|
+ conceptLibType: this.form.conceptLibType
|
|
|
|
+ };
|
|
|
|
+ api
|
|
|
|
+ .collectionMatch(params)
|
|
|
|
+ .then(res => {
|
|
|
|
+ if (res.data.code == '0') {
|
|
|
|
+ const data = res.data.data;
|
|
|
|
+ let text = '';
|
|
|
|
+ if (data.unMatchList.length > 0) {
|
|
|
|
+ data.unMatchList.forEach(it => {
|
|
|
|
+ text += it.conceptLibName + '\n';
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ this.$refs.msg.innerHTML = text;
|
|
|
|
+ this.innerText = text;
|
|
|
|
+ } else {
|
|
|
|
+ this.dialogVisible = true;
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ .catch(error => {
|
|
|
|
+ console.log(error);
|
|
|
|
+ });
|
|
|
|
+ },
|
|
clearData() {
|
|
clearData() {
|
|
this.form.collectionLibName = '';
|
|
this.form.collectionLibName = '';
|
|
this.conceptText = '';
|
|
this.conceptText = '';
|
|
this.ruleTermTypeList = [];
|
|
this.ruleTermTypeList = [];
|
|
this.form.concepts = [];
|
|
this.form.concepts = [];
|
|
- this.getList(this.form.concepts);
|
|
|
|
this.getTreeSearchList();
|
|
this.getTreeSearchList();
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ computed: {
|
|
|
|
+ conceptCollectionVO() {
|
|
|
|
+ let conceptCollectionVO = [];
|
|
|
|
+ this.innerText.forEach(it => {
|
|
|
|
+ console.log(123);
|
|
|
|
+ conceptCollectionVO.push(it);
|
|
|
|
+ });
|
|
|
|
+ return conceptCollectionVO;
|
|
|
|
+ }
|
|
|
|
+ },
|
|
watch: {
|
|
watch: {
|
|
form: {
|
|
form: {
|
|
handler(newName, oldName) {
|
|
handler(newName, oldName) {
|