Commit 109d41a5 authored by “yiyousong”'s avatar “yiyousong”

feat:添加排队编号搜索事项

parent 6e385428
#开发环境 #开发环境
NODE_ENV = "development" NODE_ENV = "development"
VUE_APP_API_BASE_URL=http://192.168.0.98:8090 VUE_APP_API_BASE_URL=http://192.168.0.98:8090
VUE_APP_API_PHP_URL=http://192.168.0.98:8090
#VUE_APP_API_BASE_URL=http://192.168.0.98:11071/zwfw #VUE_APP_API_BASE_URL=http://192.168.0.98:11071/zwfw
#VUE_APP_API_BASE_URL=http://192.168.0.98:11023 #VUE_APP_API_BASE_URL=http://192.168.0.98:11023
#VUE_APP_API_BASE_URL=http://192.168.0.217:17311 #VUE_APP_API_BASE_URL=http://192.168.0.217:17311
\ No newline at end of file
#生产环境 #生产环境
NODE_ENV = "production" NODE_ENV = "production"
VUE_APP_API_BASE_URL=/basics_api VUE_APP_API_PHP_URL=/basics_api
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
import local from "@/utils/local"; import local from "@/utils/local";
import request from "@/utils/request"; import request from "@/utils/request";
import store from "@/store"; import store from "@/store";
let PHP_URL = process.env.VUE_APP_API_PHP_URL;
// 首页数据展示 // 首页数据展示
export const getHomeInfo = (data) => { export const getHomeInfo = (data) => {
let baseUrl = local.getLocal("serverUrl"); let baseUrl = local.getLocal("serverUrl");
...@@ -114,3 +115,11 @@ export const getSkinList = (data) => { ...@@ -114,3 +115,11 @@ export const getSkinList = (data) => {
data, data,
}); });
}; };
// 排队编号查询对应事项
export const getMatterForFlownum = (params) => {
return request({
url: `${PHP_URL}/api/matter/matterForFlownum`,
method: "get",
params,
});
};
...@@ -104,7 +104,7 @@ import Header from "@/components/Header.vue"; ...@@ -104,7 +104,7 @@ import Header from "@/components/Header.vue";
import PageTop from "@/components/PageTop.vue"; import PageTop from "@/components/PageTop.vue";
import SearchBox from "@/components/SearchBox.vue"; import SearchBox from "@/components/SearchBox.vue";
import MateralsList from "@/components/MateralsList.vue"; import MateralsList from "@/components/MateralsList.vue";
import { getSampleformMatterList } from "@/api"; import { getSampleformMatterList, getMatterForFlownum } from "@/api";
export default { export default {
components: { components: {
Header, Header,
...@@ -128,40 +128,62 @@ export default { ...@@ -128,40 +128,62 @@ export default {
}; };
}, },
created() { created() {
this.getSampleformMatterList(); this.typeSearch();
// this.getAllmaterials(); // this.getAllmaterials();
}, },
watch: { watch: {
searchVal(newVal) { searchVal(newVal) {
if (newVal === "") { if (newVal === "") {
this.current = 1; this.current = 1;
this.getSampleformMatterList(); this.typeSearch();
} }
}, },
}, },
methods: { methods: {
// 区分搜索
async typeSearch() {
let reg = /^[\u4e00-\u9fa5]+$/;
if (reg.test(this.searchVal) || this.searchVal == "") {
this.getSampleformMatterList(this.searchVal);
} else {
let matterFullName = await this.getMatterForFlownum(this.searchVal);
this.getSampleformMatterList(matterFullName);
}
},
// 获取事项列表 // 获取事项列表
async getSampleformMatterList() { async getSampleformMatterList(matterFullName) {
let res = await getSampleformMatterList({ let res = await getSampleformMatterList({
page: this.current, page: this.current,
size: this.size, size: this.size,
isTerminal: 1, isTerminal: 1,
matterFullName: this.searchVal, matterFullName,
}); });
let { total, matterDatumTotal, data } = res.data.data; let { total, matterDatumTotal, data } = res.data.data;
this.matterList = data; this.matterList = data;
this.total = total; this.total = total;
this.matterDatumTotal = matterDatumTotal; this.matterDatumTotal = matterDatumTotal;
}, },
// 排队编号获取事项
async getMatterForFlownum(flownum) {
let matterFullName = "";
let res = await getMatterForFlownum({ flownum });
if (res.data.code == 1) {
let { data } = res.data.data;
if (data.length) {
matterFullName = data[0].matterName;
}
}
return matterFullName;
},
// 搜索 // 搜索
handleSearch() { handleSearch() {
this.current = 1; this.current = 1;
this.getSampleformMatterList(); this.typeSearch();
}, },
// 分页 // 分页
changePage(cur) { changePage(cur) {
this.current = cur; this.current = cur;
this.getSampleformMatterList(); this.typeSearch();
}, },
// 查看 // 查看
handleCheck(row) { handleCheck(row) {
......
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