Commit b26e3dd0 by 薛文刚

案件编号查询

parent 12b0f350
This source diff could not be displayed because it is too large. You can view the blob instead.
<template>
<div id="ryxxkcSearch" class="ryxxkcSearch">
<div class="top-title">人员信息核查</div>
<div style="margin-top: 15px;">
<el-input :placeholder="seletListValue[selectType]==undefined?'':'请输入'+seletListValue[selectType]" v-model="searchValue" class="input-with-select">
<el-select v-model="selectType" slot="prepend" placeholder="请选择">
<el-option :label="item.name" :value="item.value" v-for="(item,index) in seletList" :key="index"></el-option>
</el-select>
<el-button slot="append" icon="el-icon-search" @click="search">搜索</el-button>
</el-input>
</div>
<div class="history">
<ul>
<li v-for="(item,index) in historyList" :key="index" class="historyItem" @click="setValue(item)">{{item.value}}</li>
</ul>
</div>
<div id="ryxxkcSearch"
class="ryxxkcSearch">
<div class="top-title">人员信息核查</div>
<div style="margin-top: 15px;">
<el-input :placeholder="seletListValue[selectType]==undefined?'':'请输入'+seletListValue[selectType]"
v-model="searchValue"
class="input-with-select">
<el-select v-model="selectType"
slot="prepend"
placeholder="请选择">
<el-option :label="item.name"
:value="item.value"
v-for="(item,index) in seletList"
:key="index"></el-option>
</el-select>
<el-button slot="append"
icon="el-icon-search"
@click="search">搜索</el-button>
</el-input>
</div>
<div class="history">
<ul>
<li v-for="(item,index) in historyList"
:key="index"
class="historyItem"
@click="setValue(item)">{{item.value}}</li>
</ul>
</div>
</div>
</template>
<script>
import {
ryxxhcSelectList,ryxxhcSelectListValue
} from "@/utils/params";
export default {
name: "ryxxkcSearch",
data(){
return {
searchValue:'',
selectType:'zjhm',
seletList:ryxxhcSelectList,
seletListValue:ryxxhcSelectListValue,
historyList:[]
}
},
methods:{
setValue(item){
this.selectType=item.type;
this.searchValue=item.value;
},
search(){
let self=this;
if(self.searchValue!=""){
let history=[];
let json={};
json.type=self.selectType;
json.value=self.searchValue;
if(sessionStorage.getItem("searchHistory")){
let i=0;
JSON.parse(sessionStorage.getItem("searchHistory")).forEach(item=>{
debugger
i++;
if(item.value==self.searchValue&&item.type==self.selectType){
history=JSON.parse(sessionStorage.getItem("searchHistory"));
return;
}
if(i==JSON.parse(sessionStorage.getItem("searchHistory")).length){
history=JSON.parse(sessionStorage.getItem("searchHistory"));
history.push(json);
}
})
}else{
history.push(json);
}
sessionStorage.setItem("searchHistory",JSON.stringify(history));
self.historyList=history;
let routeData = self.$router.resolve({
path: "/ryxxhcDetailIndex",
query: {type:self.selectType,value:self.searchValue}
});
window.open(routeData.href, "_blank");
}else{
self.$message({
type: "error",
message: "请输入"+self.seletListValue[self.selectType]
});
}
import {
ryxxhcSelectList, ryxxhcSelectListValue
} from "@/utils/params";
export default {
name: "ryxxkcSearch",
data () {
return {
searchValue: '',
selectType: 'zjhm',
seletList: ryxxhcSelectList,
seletListValue: ryxxhcSelectListValue,
historyList: []
}
},
methods: {
setValue (item) {
debugger
this.selectType = item.type;
this.searchValue = item.value;
},
search () {
let self = this;
if (self.searchValue != "") {
let history = [];
let json = {};
json.type = self.selectType;
json.value = self.searchValue;
if (sessionStorage.getItem("searchHistory")) {
let i = 0;
JSON.parse(sessionStorage.getItem("searchHistory")).forEach(item => {
debugger
i++;
if (item.value == self.searchValue && item.type == self.selectType) {
history = JSON.parse(sessionStorage.getItem("searchHistory"));
return;
}
},
mounted() {
let self=this;
if(sessionStorage.getItem("searchHistory")){
self.historyList=JSON.parse(sessionStorage.getItem("searchHistory"));
if (i == JSON.parse(sessionStorage.getItem("searchHistory")).length) {
history = JSON.parse(sessionStorage.getItem("searchHistory"));
history.push(json);
}
})
} else {
history.push(json);
}
sessionStorage.setItem("searchHistory", JSON.stringify(history));
self.historyList = history;
let routeData = self.$router.resolve({
path: "/ryxxhcDetailIndex",
query: { type: self.selectType, value: self.searchValue }
});
window.open(routeData.href, "_blank");
} else {
self.$message({
type: "error",
message: "请输入" + self.seletListValue[self.selectType]
});
}
}
},
mounted () {
let self = this;
if (sessionStorage.getItem("searchHistory")) {
self.historyList = JSON.parse(sessionStorage.getItem("searchHistory"));
}
}
}
</script>
<style scoped lang="scss">
@import '../../assets/styles/ryxxhc.scss';
@import "../../assets/styles/ryxxhc.scss";
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment