|
@@ -5,12 +5,28 @@
|
|
<el-form-item label="条目名称:">
|
|
<el-form-item label="条目名称:">
|
|
<el-input size="mini" v-model.trim="filter.itemName" placeholder="条目名称" clearable></el-input>
|
|
<el-input size="mini" v-model.trim="filter.itemName" placeholder="条目名称" clearable></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
+ <el-form-item label="条目类型:">
|
|
|
|
+ <!-- <el-input size="mini" v-model.trim="filter.module" placeholder="所属模块" clearable></el-input> -->
|
|
|
|
+ <el-select v-model="filter.ruleType"
|
|
|
|
+ clearable
|
|
|
|
+ filterable
|
|
|
|
+ placeholder="请选择条目类型"
|
|
|
|
+ size="mini"
|
|
|
|
+ class="long-item">
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in ruleTypeList"
|
|
|
|
+ :key="item.val"
|
|
|
|
+ :label="item.name"
|
|
|
|
+ :value="item.val">
|
|
|
|
+ </el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
<el-form-item label="所属模块:">
|
|
<el-form-item label="所属模块:">
|
|
<!-- <el-input size="mini" v-model.trim="filter.module" placeholder="所属模块" clearable></el-input> -->
|
|
<!-- <el-input size="mini" v-model.trim="filter.module" placeholder="所属模块" clearable></el-input> -->
|
|
- <el-select v-model="filter.module"
|
|
|
|
- clearable
|
|
|
|
- filterable
|
|
|
|
- placeholder="请选择模块"
|
|
|
|
|
|
+ <el-select v-model="filter.module"
|
|
|
|
+ clearable
|
|
|
|
+ filterable
|
|
|
|
+ placeholder="请选择模块"
|
|
size="mini">
|
|
size="mini">
|
|
<el-option
|
|
<el-option
|
|
v-for="item in caseLIst"
|
|
v-for="item in caseLIst"
|
|
@@ -50,6 +66,13 @@
|
|
label="条目名称"
|
|
label="条目名称"
|
|
>
|
|
>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
+ <el-table-column
|
|
|
|
+ :resizable = "false"
|
|
|
|
+ prop="ruleType"
|
|
|
|
+ label="条目类型"
|
|
|
|
+ :formatter="typeFormatter"
|
|
|
|
+ >
|
|
|
|
+ </el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
:resizable = "false"
|
|
:resizable = "false"
|
|
prop="casesName"
|
|
prop="casesName"
|
|
@@ -114,8 +137,10 @@
|
|
list: [],
|
|
list: [],
|
|
searched: false,
|
|
searched: false,
|
|
caseLIst:[],
|
|
caseLIst:[],
|
|
|
|
+ ruleTypeList:[],
|
|
filter:{
|
|
filter:{
|
|
itemName:'',
|
|
itemName:'',
|
|
|
|
+ ruleType:'',
|
|
module:'',
|
|
module:'',
|
|
level:'',
|
|
level:'',
|
|
itemCode:''
|
|
itemCode:''
|
|
@@ -129,6 +154,7 @@
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
const that = this;
|
|
const that = this;
|
|
|
|
+ this.getRuleTypeModule();
|
|
//返回时避免参数未赋值就获取列表
|
|
//返回时避免参数未赋值就获取列表
|
|
setTimeout(function(){
|
|
setTimeout(function(){
|
|
that.getDataList();
|
|
that.getDataList();
|
|
@@ -151,6 +177,10 @@
|
|
})
|
|
})
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ typeFormatter(row, column, cellValue){
|
|
|
|
+ const li = this.ruleTypeList.filter((it)=>it.val===""+cellValue);
|
|
|
|
+ return li[0]?li[0].name:"";
|
|
|
|
+ },
|
|
handleSizeChange(val){
|
|
handleSizeChange(val){
|
|
this.pageSize = val;
|
|
this.pageSize = val;
|
|
this.currentPage = utils.getCurrentPage(this.currentPage, this.total, this.pageSize);
|
|
this.currentPage = utils.getCurrentPage(this.currentPage, this.total, this.pageSize);
|
|
@@ -162,7 +192,9 @@
|
|
AddRecordItem(){
|
|
AddRecordItem(){
|
|
const pam = this.searched?{currentPage:this.currentPage,
|
|
const pam = this.searched?{currentPage:this.currentPage,
|
|
pageSize:this.pageSize,
|
|
pageSize:this.pageSize,
|
|
|
|
+ ruleTypeList:this.ruleTypeList,
|
|
filter:this.filter}:{currentPage:this.currentPage,
|
|
filter:this.filter}:{currentPage:this.currentPage,
|
|
|
|
+ ruleTypeList:this.ruleTypeList,
|
|
pageSize:this.pageSize};
|
|
pageSize:this.pageSize};
|
|
this.$router.push({
|
|
this.$router.push({
|
|
name:'AddRecordItem',
|
|
name:'AddRecordItem',
|
|
@@ -193,6 +225,20 @@
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ getRuleTypeModule(){
|
|
|
|
+ return api.getRuleTypes({}).then((res)=>{
|
|
|
|
+ const result = res.data;
|
|
|
|
+ if(result.code==0){
|
|
|
|
+ this.ruleTypeList = result.data[14];
|
|
|
|
+ }else{
|
|
|
|
+ this.$message({
|
|
|
|
+ message:result.msg,
|
|
|
|
+ type:'warning',
|
|
|
|
+ showClose: true
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
getDataList(isTurnPage) {
|
|
getDataList(isTurnPage) {
|
|
const param = this.getFilterItems(isTurnPage);
|
|
const param = this.getFilterItems(isTurnPage);
|
|
this.searched = true;
|
|
this.searched = true;
|
|
@@ -232,9 +278,11 @@
|
|
const pam = this.searched ? {
|
|
const pam = this.searched ? {
|
|
currentPage: this.currentPage,
|
|
currentPage: this.currentPage,
|
|
pageSize:this.pageSize,
|
|
pageSize:this.pageSize,
|
|
|
|
+ ruleTypeList:this.ruleTypeList,
|
|
filter: this.filter,
|
|
filter: this.filter,
|
|
} : {
|
|
} : {
|
|
currentPage: this.currentPage,
|
|
currentPage: this.currentPage,
|
|
|
|
+ ruleTypeList:this.ruleTypeList,
|
|
pageSize:this.pageSize};
|
|
pageSize:this.pageSize};
|
|
this.$router.push({
|
|
this.$router.push({
|
|
name:'AddRecordItem',
|
|
name:'AddRecordItem',
|
|
@@ -255,6 +303,7 @@
|
|
};
|
|
};
|
|
const param = {
|
|
const param = {
|
|
casesId:this.filter.module,
|
|
casesId:this.filter.module,
|
|
|
|
+ ruleType:this.filter.ruleType,
|
|
code: this.filter.itemCode.trim(),
|
|
code: this.filter.itemCode.trim(),
|
|
levelNo:this.filter.level.trim(),
|
|
levelNo:this.filter.level.trim(),
|
|
name: this.filter.itemName.trim(),
|
|
name: this.filter.itemName.trim(),
|
|
@@ -304,7 +353,9 @@
|
|
|
|
|
|
<style lang="less">
|
|
<style lang="less">
|
|
@import "../../less/admin.less";
|
|
@import "../../less/admin.less";
|
|
-
|
|
|
|
|
|
+ .demo-form-inline .long-item .el-input--mini .el-input__inner{
|
|
|
|
+ width: 124px;
|
|
|
|
+ }
|
|
.delete{
|
|
.delete{
|
|
color: red;
|
|
color: red;
|
|
}
|
|
}
|