feat: 搜索中心 es 高级检索
This commit is contained in:
@@ -27,10 +27,8 @@
|
|||||||
{{ $t("m.clearQuery") }}
|
{{ $t("m.clearQuery") }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
<el-button type="primary" @click="exportSearchResult" v-if="!kindtext" style="position: absolute;right:0px;width: 98px;background:#3391CE
|
<!-- <el-button type="primary" @click="exportSearchResult" v-if="!kindtext" style="position: absolute;right:0px;width: 98px;background:#3391CE;border-color:#3391CE;">{{ $t("m.export") }}-->
|
||||||
;border-color:#3391CE
|
<!-- </el-button>-->
|
||||||
;">{{ $t("m.export") }}
|
|
||||||
</el-button>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="search-condition showWidth" v-if="kindtext">
|
<div class="search-condition showWidth" v-if="kindtext">
|
||||||
<div class="search-content">
|
<div class="search-content">
|
||||||
@@ -932,65 +930,41 @@
|
|||||||
align="center"
|
align="center"
|
||||||
:label="$t('m.action')"
|
:label="$t('m.action')"
|
||||||
width="200">
|
width="200">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<div v-if="selectIndex !== 'DYNAMIC_INFORMATION' && selectIndex !== 'items'">
|
<div v-if="selectIndex !== 'DYNAMIC_INFORMATION' && selectIndex !== 'items'">
|
||||||
<div v-if="scope.row.collectId">
|
<div v-if="scope.row.collectId">
|
||||||
<el-button class="opera-btn" type="primary" size="mini"
|
<el-dropdown trigger="click" @command="handleCommand">
|
||||||
@click="judgeRolePermiOnSar(scope.row, 1)">{{ $t("m.see") }}
|
<i class="iconfont"></i>
|
||||||
</el-button>
|
<el-dropdown-menu slot="dropdown">
|
||||||
<el-dropdown trigger="click" @command="handleCommand">
|
<el-dropdown-item :command="beforeHandleCommand('l',scope.row)">查看</el-dropdown-item>
|
||||||
<el-button type="primary" class="opera-btn" style="margin-left: 10px" size="mini">
|
<el-dropdown-item :command="beforeHandleCommand('a',scope.row)">取消收藏</el-dropdown-item>
|
||||||
{{ $t("m.more") }}
|
<el-dropdown-item :command="beforeHandleCommand('b',scope.row)">分享</el-dropdown-item>
|
||||||
</el-button>
|
</el-dropdown-menu>
|
||||||
<el-dropdown-menu slot="dropdown">
|
</el-dropdown>
|
||||||
<el-dropdown-item :command="beforeHandleCommand('a',scope.row)"
|
|
||||||
v-btn-permission="'JEFQ4RPSKZ44WZW8EUSU'">{{ $t("m.cancelCollection") }}
|
</div>
|
||||||
</el-dropdown-item>
|
<div v-else>
|
||||||
<el-dropdown-item :command="beforeHandleCommand('b',scope.row)"
|
<el-dropdown trigger="click" @command="handleCommand">
|
||||||
v-btn-permission="'U43YC8BE2U5VHE9KJN87'">{{ $t("m.share") }}
|
<i class="iconfont"></i>
|
||||||
</el-dropdown-item>
|
<el-dropdown-menu slot="dropdown">
|
||||||
<!-- <el-dropdown-item :command="beforeHandleCommand('c',scope.row)">{{ $t('m.processes') }}</el-dropdown-item>-->
|
<el-dropdown-item :command="beforeHandleCommand('l',scope.row)">查看</el-dropdown-item>
|
||||||
</el-dropdown-menu>
|
<el-dropdown-item v-btn-permission="'FB3R3TVALD'" :command="beforeHandleCommand('d',scope.row)">收藏</el-dropdown-item>
|
||||||
</el-dropdown>
|
<!-- <el-dropdown-item :command="beforeHandleCommand('b',scope.row)">分享</el-dropdown-item>-->
|
||||||
</div>
|
</el-dropdown-menu>
|
||||||
<div v-else>
|
</el-dropdown>
|
||||||
<el-button class="opera-btn" type="primary" size="mini"
|
|
||||||
@click="judgeRolePermiOnSar(scope.row, 1)">{{ $t("m.see") }}
|
</div>
|
||||||
</el-button>
|
</div>
|
||||||
<el-dropdown trigger="click" @command="handleCommand">
|
<div v-else-if="selectIndex === 'items'">
|
||||||
<el-button type="primary" class="opera-btn" style="margin-left: 10px" size="mini">
|
<!-- <el-button size="mini" @click="judgeRolePermiOnSar(scope.row, 1)">查看</el-button>-->
|
||||||
{{ $t("m.more") }}
|
<el-button size="mini" @click="itemsDetails(scope.row)">查看</el-button>
|
||||||
</el-button>
|
</div>
|
||||||
<el-dropdown-menu slot="dropdown">
|
<div v-else>
|
||||||
<el-dropdown-item :command="beforeHandleCommand('d',scope.row)"
|
<el-button size="mini" type="primary" v-if="scope.row.collectId" @click="clickCollection(scope.row)">取消收藏</el-button>
|
||||||
v-btn-permission="'JEFQ4RPSKZ44WZW8EUSU'">{{ $t("m.collection") }}
|
<el-button size="mini" type="primary" v-else @click="clickCollection(scope.row)">收藏</el-button>
|
||||||
</el-dropdown-item>
|
<el-button sizi="mini" @click="clickShare(scope.row)">分享</el-button>
|
||||||
<el-dropdown-item :command="beforeHandleCommand('b',scope.row)"
|
</div>
|
||||||
v-btn-permission="'U43YC8BE2U5VHE9KJN87'">{{ $t("m.share") }}
|
</template>
|
||||||
</el-dropdown-item>
|
|
||||||
<!-- <el-dropdown-item :command="beforeHandleCommand('c',scope.row)">{{ $t('m.processes') }}</el-dropdown-item>-->
|
|
||||||
</el-dropdown-menu>
|
|
||||||
</el-dropdown>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div v-else-if="selectIndex === 'items'">
|
|
||||||
<!-- <el-button size="mini" @click="judgeRolePermiOnSar(scope.row, 1)">查看</el-button>-->
|
|
||||||
<el-button class="opera-btn" size="mini" @click="itemsDetails(scope.row)">{{ $t("m.see") }}
|
|
||||||
</el-button>
|
|
||||||
</div>
|
|
||||||
<div v-else class="celect-btn-box">
|
|
||||||
<el-button class="opera-btn" size="mini" type="primary" v-if="scope.row.collectId"
|
|
||||||
@click="clickCollection(scope.row)" v-btn-permission="'JEFQ4RPSKZ44WZW8EUSU'">
|
|
||||||
{{ $t("m.cancelCollection") }}
|
|
||||||
</el-button>
|
|
||||||
<el-button class="opera-btn" size="mini" type="primary" v-else @click="clickCollection(scope.row)"
|
|
||||||
v-btn-permission="'JEFQ4RPSKZ44WZW8EUSU'">{{ $t("m.collection") }}
|
|
||||||
</el-button>
|
|
||||||
<el-button class="opera-btn" sizi="mini" @click="clickShare(scope.row)"
|
|
||||||
v-btn-permission="'U43YC8BE2U5VHE9KJN87'">{{ $t("m.share") }}
|
|
||||||
</el-button>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
@@ -1315,10 +1289,29 @@ export default {
|
|||||||
dropdownItemsCollect: [{ "val": "取消收藏" }, { "val": "分享" }, { "val": "流程" }],
|
dropdownItemsCollect: [{ "val": "取消收藏" }, { "val": "分享" }, { "val": "流程" }],
|
||||||
judgeRoleFlag: false,
|
judgeRoleFlag: false,
|
||||||
judgeRoleMessage: "",
|
judgeRoleMessage: "",
|
||||||
exportSearchInfo: {}
|
exportSearchInfo: {},
|
||||||
|
twoOptions: [],
|
||||||
|
formFieldListStandData: []
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getAddFormFieldList (isEdit) {
|
||||||
|
this.$http.get('lawss/sarStandAttrDetails/list', {}, {
|
||||||
|
_this: this
|
||||||
|
},
|
||||||
|
res => {
|
||||||
|
if (res.ok) {
|
||||||
|
const { data = {} } = res
|
||||||
|
// 国内外标准
|
||||||
|
const inlandList = data['INLAND_STAND'] || []
|
||||||
|
const foreignList = data['FOREIGN_STAND'] || []
|
||||||
|
const foreignFilterList = foreignList.filter ( item => item.attrField === 'GXHBQ' || item.attrField === 'ZBJBD' || item.attrField === 'KWJ' || item.attrField === 'TXLB');
|
||||||
|
console.log(foreignFilterList)
|
||||||
|
this.formFieldListStandData = this.formFieldListStandData.concat(inlandList).concat(foreignFilterList);
|
||||||
|
console.log(this.formFieldListStandData,'-----------------------------------1')
|
||||||
|
}
|
||||||
|
}, e => {})
|
||||||
|
},
|
||||||
choiceZRR1 (type, title, id) {
|
choiceZRR1 (type, title, id) {
|
||||||
this.drawerTitle = title
|
this.drawerTitle = title
|
||||||
this.modalShowFlag1 = true
|
this.modalShowFlag1 = true
|
||||||
@@ -1497,22 +1490,22 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, // 点击收藏/取消收藏事件
|
}, // 点击收藏/取消收藏事件
|
||||||
handleCommand(command) {
|
handleCommand (command) {
|
||||||
switch (command.command) {
|
switch (command.command) {
|
||||||
case "d":
|
case 'd':
|
||||||
this.judgeRolePermiOnSar(command.item, 2); // 收藏
|
this.judgeRolePermiOnSar(command.item, 2) // 收藏
|
||||||
break;
|
break
|
||||||
case "a":
|
case 'a':
|
||||||
this.judgeRolePermiOnSar(command.item, 3); // 取消收藏
|
this.judgeRolePermiOnSar(command.item, 3) // 取消收藏
|
||||||
break;
|
break
|
||||||
case "b":
|
case 'b':
|
||||||
this.judgeRolePermiOnSar(command.item, 4); // 分享
|
this.judgeRolePermiOnSar(command.item, 4) // 分享
|
||||||
break;
|
break
|
||||||
case "c":
|
case 'l':
|
||||||
this.judgeRolePermiOnSar(command.item, 6); // 流程
|
this.judgeRolePermiOnSar(command.item, 1) // 查看
|
||||||
break;
|
break
|
||||||
}
|
}
|
||||||
}, // 下拉菜单点击事件
|
}, // 下拉菜单点击事件
|
||||||
beforeHandleCommand(command, item) {
|
beforeHandleCommand(command, item) {
|
||||||
return {
|
return {
|
||||||
"item": item,
|
"item": item,
|
||||||
@@ -1658,37 +1651,19 @@ export default {
|
|||||||
pagetype = "BUSINESS_STAND";
|
pagetype = "BUSINESS_STAND";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.$http.get("lawss/sarMenu/judgeSarMenuByRole", {
|
if (type === 1) {
|
||||||
sarId: item.id,
|
|
||||||
sarType: pagetype
|
|
||||||
}, {
|
|
||||||
_this: this
|
|
||||||
}, res => {
|
|
||||||
if (res.ok) {
|
|
||||||
this.judgeRoleFlag = true;
|
|
||||||
if (type === 1) {
|
|
||||||
this.detailsStandardLaws(item);
|
this.detailsStandardLaws(item);
|
||||||
} else if (type === 2) {
|
} else if (type === 2) {
|
||||||
this.collectStandard(item);
|
this.collectStandard(item);
|
||||||
} else if (type === 3) {
|
} else if (type === 3) {
|
||||||
this.cancelCollectStandard(item);
|
this.cancelCollectStandard(item);
|
||||||
} else if (type === 4) {
|
} else if (type === 4) {
|
||||||
this.shareSarInfo(item);
|
this.shareSarInfo(item);
|
||||||
} else if (type === 5) {
|
} else if (type === 5) {
|
||||||
this.showRecommendDetials(item);
|
this.showRecommendDetials(item);
|
||||||
} else if (type === 6) {
|
} else if (type === 6) {
|
||||||
this.goProcess(item);
|
this.goProcess(item);
|
||||||
}
|
|
||||||
} else {
|
|
||||||
this.judgeRoleFlag = false;
|
|
||||||
this.$message({
|
|
||||||
message: res.message,
|
|
||||||
type: "error"
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}, e => {
|
|
||||||
this.judgeRoleFlag = false;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
showDetailsByRole(item) {
|
showDetailsByRole(item) {
|
||||||
@@ -1722,64 +1697,20 @@ export default {
|
|||||||
this.standForm.page = this.page;
|
this.standForm.page = this.page;
|
||||||
this.standForm.pageSize = this.$store.getters.userInfo.configContent;
|
this.standForm.pageSize = this.$store.getters.userInfo.configContent;
|
||||||
let nowStandForm = JSON.parse(JSON.stringify(this.standForm));
|
let nowStandForm = JSON.parse(JSON.stringify(this.standForm));
|
||||||
if (this.standForm.issueTime != null && this.standForm.issueTime !== "") {
|
// 处理动态表单的时间和下拉框格式
|
||||||
nowStandForm.issueTime = this.$dateFormat(this.standForm.issueTime, "yyyy-MM-dd hh:mm:ss");
|
const formFieldList = this.formFieldListStandData
|
||||||
}
|
const sarStandAttrObj = {}
|
||||||
if (this.standForm.issueTimeSt != null && this.standForm.issueTimeSt !== "") {
|
formFieldList.forEach((item) => {
|
||||||
nowStandForm.issueTimeSt = this.$dateFormat(this.standForm.issueTimeSt, "yyyy-MM-dd hh:mm:ss");
|
const attrField = item.attrField.toLowerCase();
|
||||||
}
|
const value = nowStandForm[attrField]
|
||||||
if (this.standForm.issueTimeEd != null && this.standForm.issueTimeEd !== "") {
|
// 时间格式处理
|
||||||
nowStandForm.issueTimeEd = this.$dateFormat(this.standForm.issueTimeEd, "yyyy-MM-dd hh:mm:ss");
|
if (item.attrType === 'DATE_PICKER' && value) {
|
||||||
}
|
nowStandForm[item.attrField] = this.standForm[attrField]
|
||||||
if (this.standForm.putTime != null && this.standForm.putTime !== "") {
|
}
|
||||||
nowStandForm.putTime = this.$dateFormat(this.standForm.putTime, "yyyy-MM-dd hh:mm:ss");
|
sarStandAttrObj[item.attrField] = nowStandForm[attrField]
|
||||||
}
|
})
|
||||||
if (this.standForm.putTimeSt != null && this.standForm.putTimeSt !== "") {
|
nowStandForm['sarStandAttrEOStr'] = JSON.stringify(sarStandAttrObj).replace(/"/g, "'")
|
||||||
nowStandForm.putTimeSt = this.$dateFormat(this.standForm.putTimeSt, "yyyy-MM-dd hh:mm:ss");
|
|
||||||
}
|
|
||||||
if (this.standForm.putTimeEd != null && this.standForm.putTimeEd !== "") {
|
|
||||||
nowStandForm.putTimeEd = this.$dateFormat(this.standForm.putTimeEd, "yyyy-MM-dd hh:mm:ss");
|
|
||||||
}
|
|
||||||
if (this.standForm.newproductPutTime != null && this.standForm.newproductPutTime !== "") {
|
|
||||||
nowStandForm.newproductPutTime = this.$dateFormat(this.standForm.newproductPutTime, "yyyy-MM-dd hh:mm:ss");
|
|
||||||
}
|
|
||||||
if (this.standForm.registerPutTime != null && this.standForm.registerPutTime !== "") {
|
|
||||||
nowStandForm.registerPutTime = this.$dateFormat(this.standForm.registerPutTime, "yyyy-MM-dd hh:mm:ss");
|
|
||||||
}
|
|
||||||
if (this.standForm.productPutTime != null && this.standForm.productPutTime !== "") {
|
|
||||||
nowStandForm.productPutTime = this.$dateFormat(this.standForm.productPutTime, "yyyy-MM-dd hh:mm:ss");
|
|
||||||
}
|
|
||||||
if (this.standForm.productPutTimeSt != null && this.standForm.productPutTimeSt !== "") {
|
|
||||||
nowStandForm.productPutTimeSt = this.$dateFormat(this.standForm.productPutTimeSt, "yyyy-MM-dd hh:mm:ss");
|
|
||||||
} else {
|
|
||||||
nowStandForm.productPutTimeSt = "";
|
|
||||||
}
|
|
||||||
if (this.standForm.productPutTimeEd != null && this.standForm.productPutTimeEd !== "") {
|
|
||||||
nowStandForm.productPutTimeEd = this.$dateFormat(this.standForm.productPutTimeEd, "yyyy-MM-dd hh:mm:ss");
|
|
||||||
} else {
|
|
||||||
nowStandForm.productPutTimeEd = "";
|
|
||||||
}
|
|
||||||
if (this.standForm.newcarPutTime != null && this.standForm.newcarPutTime !== "") {
|
|
||||||
nowStandForm.newcarPutTime = this.$dateFormat(this.standForm.newcarPutTime, "yyyy-MM-dd hh:mm:ss");
|
|
||||||
}
|
|
||||||
if (this.standForm.newcarPutTimeSt != null && this.standForm.newcarPutTimeSt !== "") {
|
|
||||||
nowStandForm.newcarPutTimeSt = this.$dateFormat(this.standForm.newcarPutTimeSt, "yyyy-MM-dd hh:mm:ss");
|
|
||||||
} else {
|
|
||||||
nowStandForm.newcarPutTimeSt = "";
|
|
||||||
}
|
|
||||||
if (this.standForm.newcarPutTimeEd != null && this.standForm.newcarPutTimeEd !== "") {
|
|
||||||
nowStandForm.newcarPutTimeEd = this.$dateFormat(this.standForm.newcarPutTimeEd, "yyyy-MM-dd hh:mm:ss");
|
|
||||||
} else {
|
|
||||||
nowStandForm.newcarPutTimeEd = "";
|
|
||||||
}
|
|
||||||
if (this.standForm.firstPutTime != null && this.standForm.firstPutTime !== "") {
|
|
||||||
nowStandForm.firstPutTime = this.$dateFormat(this.standForm.firstPutTime, "yyyy-MM-dd hh:mm:ss");
|
|
||||||
}
|
|
||||||
if (this.standForm.putYear != null && this.standForm.putYear !== "") {
|
|
||||||
nowStandForm.putYear = this.$dateFormat(this.standForm.putYear, "yyyy");
|
|
||||||
}
|
|
||||||
this.exportSearchInfo = nowStandForm;
|
this.exportSearchInfo = nowStandForm;
|
||||||
nowStandForm['sarStandAttrEOStr'] = JSON.stringify(nowStandForm).replace(/"/g, "'")
|
|
||||||
this.$http.post("search/searchCenter/searchSarBykey", nowStandForm, {
|
this.$http.post("search/searchCenter/searchSarBykey", nowStandForm, {
|
||||||
_this: this,
|
_this: this,
|
||||||
loading: "resultLoading"
|
loading: "resultLoading"
|
||||||
@@ -1920,20 +1851,13 @@ export default {
|
|||||||
let routername = "";
|
let routername = "";
|
||||||
let pagetype = "";
|
let pagetype = "";
|
||||||
if (item.type === "stand") {
|
if (item.type === "stand") {
|
||||||
if (this.$hasPermission("CFEZ3VP7EA95CTRBH3JB") || this.$hasPermission("R5DNG6EZC66CNFC4RHPH")) {
|
if (item.standType === "INLAND") {
|
||||||
if (item.stand_type === "INLAND") {
|
routername = "OtherStandardDetails";
|
||||||
routername = "OtherStandardDetails";
|
pagetype = "INLAND_STAND";
|
||||||
pagetype = "INLAND_STAND";
|
|
||||||
} else {
|
} else {
|
||||||
routername = "OtherForeignDetails";
|
routername = "OtherForeignDetails";
|
||||||
pagetype = "FOREIGN_STAND";
|
pagetype = "FOREIGN_STAND";
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
this.$message({
|
|
||||||
message: "无权访问",
|
|
||||||
type: "warning"
|
|
||||||
});
|
|
||||||
}
|
|
||||||
} else if (item.type === "laws") {
|
} else if (item.type === "laws") {
|
||||||
if (this.$hasPermission("9P2UTSAHZ3AHKDGAEY6V")) {
|
if (this.$hasPermission("9P2UTSAHZ3AHKDGAEY6V")) {
|
||||||
routername = "OtherLawsDetails";
|
routername = "OtherLawsDetails";
|
||||||
@@ -2349,6 +2273,7 @@ export default {
|
|||||||
computed: {
|
computed: {
|
||||||
// 条件按钮提示
|
// 条件按钮提示
|
||||||
toggleConditionTips() {
|
toggleConditionTips() {
|
||||||
|
this.standForm.selectValue = ''
|
||||||
return this.kindtext ? "收起条件" : "展开条件";
|
return this.kindtext ? "收起条件" : "展开条件";
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -2408,6 +2333,7 @@ export default {
|
|||||||
// 加载表格
|
// 加载表格
|
||||||
this.searchSarBykey();
|
this.searchSarBykey();
|
||||||
this.showBuyRole();
|
this.showBuyRole();
|
||||||
|
this.getAddFormFieldList();
|
||||||
// 组织结构
|
// 组织结构
|
||||||
this.getOrgTreeSource();
|
this.getOrgTreeSource();
|
||||||
// this.selectBussRoleMsg();
|
// this.selectBussRoleMsg();
|
||||||
|
|||||||
Reference in New Issue
Block a user