Commit d7b35791 authored by 赵啸非's avatar 赵啸非

Merge remote-tracking branch 'origin/master'

parents cad0c82b 1c7c7f7e
...@@ -32,23 +32,23 @@ export const getdeptList = (data) => { ...@@ -32,23 +32,23 @@ export const getdeptList = (data) => {
}; };
// 查询事项列表 // 查询事项列表
// export const getWriteMatterList = (data) => { export const getSampleformMatterList = (data) => {
// let baseUrl = local.getLocal("serverUrl"); let baseUrl = local.getLocal("serverUrl");
// let siteId = local.getLocal("siteId"); let siteId = local.getLocal("siteId");
// let devicenum = local.getLocal("devicenum"); let devicenum = local.getLocal("devicenum");
// return request({ return request({
// url: `${baseUrl}sampleform/matter/list`, url: `${baseUrl}sampleform/matter/list`,
// method: "post", method: "post",
// data: { data: {
// siteId, siteId,
// devicenum, devicenum,
// ...data, ...data,
// }, },
// }); });
// }; };
// 查询设备关联事项列表 // 查询设备关联事项列表
export const getWriteMatterList = (data) => { export const getDeviceMatterList = (data) => {
let baseUrl = local.getLocal("serverUrl"); let baseUrl = local.getLocal("serverUrl");
let siteId = local.getLocal("siteId"); let siteId = local.getLocal("siteId");
let deviceCode = local.getLocal("devicenum"); let deviceCode = local.getLocal("devicenum");
...@@ -90,3 +90,18 @@ export const mergeFormToDocx = (data) => { ...@@ -90,3 +90,18 @@ export const mergeFormToDocx = (data) => {
}, },
}); });
}; };
// 查看样表
export const checkMaterials = (data) => {
let baseUrl = local.getLocal("serverUrl");
let siteId = local.getLocal("siteId");
let deviceCode = local.getLocal("devicenum");
return request({
url: `${baseUrl}sampleform/sample/bill/save`,
method: "post",
data: {
siteId,
deviceCode,
...data,
},
});
};
...@@ -8,7 +8,9 @@ ...@@ -8,7 +8,9 @@
}}个)</span }}个)</span
> >
<span class="matter-name flex1 flexwrap" <span class="matter-name flex1 flexwrap"
>事项全称:<span v-html="matterInfo.matterFullName"></span> >事项全称:<span
v-html="matterInfo.matterFullName || matterInfo.matterName"
></span>
</span> </span>
</div> </div>
<!-- 列表 --> <!-- 列表 -->
...@@ -89,7 +91,7 @@ export default { ...@@ -89,7 +91,7 @@ export default {
path: "/showMaterials", path: "/showMaterials",
query: { query: {
matterName: this.matterInfo.matterName, matterName: this.matterInfo.matterName,
matterId: this.matterInfo.id, matterId: row.matterId,
id: row.id, id: row.id,
}, },
}); });
......
...@@ -190,11 +190,13 @@ export default { ...@@ -190,11 +190,13 @@ export default {
}, },
// mq通讯 // mq通讯
WebSocketMq(objc) { WebSocketMq(objc) {
var obj = objc.rabbmitInfo; //mq信息 let obj = objc.rabbmitInfo; //mq信息
var serviceInfo = objc.serviceInfo; //服务器信息 let serviceInfo = objc.serviceInfo; //服务器信息
var deviceInfo = objc.deviceInfo; //设备信息 let deviceInfo = objc.deviceInfo; //设备信息
var serverUrl = serviceInfo.serverUrl; //系统地址 let serverUrl = serviceInfo.serverUrl; //系统地址
var siteId = deviceInfo.siteId; //站点id let siteId = deviceInfo.siteId; //站点id
let devicenum = objc.devicenum;
local.setLocal("devicenum", devicenum); // 设备编号
// 保存地址 // 保存地址
local.setLocal("serverUrl", serverUrl); local.setLocal("serverUrl", serverUrl);
local.setLocal("siteId", siteId); local.setLocal("siteId", siteId);
......
...@@ -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 { getWriteMatterList } from "@/api"; import { getSampleformMatterList } from "@/api";
export default { export default {
components: { components: {
Header, Header,
...@@ -128,21 +128,21 @@ export default { ...@@ -128,21 +128,21 @@ export default {
}; };
}, },
created() { created() {
this.getWriteMatterList(); this.getSampleformMatterList();
// this.getAllmaterials(); // this.getAllmaterials();
}, },
watch: { watch: {
searchVal(newVal) { searchVal(newVal) {
if (newVal === "") { if (newVal === "") {
this.current = 1; this.current = 1;
this.getWriteMatterList(); this.getSampleformMatterList();
} }
}, },
}, },
methods: { methods: {
// 获取事项列表 // 获取事项列表
async getWriteMatterList() { async getSampleformMatterList() {
let res = await getWriteMatterList({ let res = await getSampleformMatterList({
page: this.current, page: this.current,
size: this.size, size: this.size,
isTerminal: 1, isTerminal: 1,
...@@ -156,12 +156,12 @@ export default { ...@@ -156,12 +156,12 @@ export default {
// 搜索 // 搜索
handleSearch() { handleSearch() {
this.current = 1; this.current = 1;
this.getWriteMatterList(); this.getSampleformMatterList();
}, },
// 分页 // 分页
changePage(cur) { changePage(cur) {
this.current = cur; this.current = cur;
this.getWriteMatterList(); this.getSampleformMatterList();
}, },
// 查看 // 查看
handleCheck(row) { handleCheck(row) {
...@@ -247,7 +247,7 @@ export default { ...@@ -247,7 +247,7 @@ export default {
.for-short { .for-short {
// margin-bottom: 10px; // margin-bottom: 10px;
margin-bottom: 18px; margin-bottom: 18px;
font-size: 24px; font-size: 28px;
font-weight: 500; font-weight: 500;
color: #333333; color: #333333;
overflow: hidden; overflow: hidden;
...@@ -259,7 +259,7 @@ export default { ...@@ -259,7 +259,7 @@ export default {
} }
.name { .name {
margin-bottom: 10px; margin-bottom: 10px;
font-size: 18px; font-size: 22px;
font-family: Source Han Sans CN; font-family: Source Han Sans CN;
color: #888888; color: #888888;
line-height: 24px; line-height: 24px;
...@@ -275,7 +275,7 @@ export default { ...@@ -275,7 +275,7 @@ export default {
white-space: nowrap; white-space: nowrap;
} }
.materials { .materials {
font-size: 18px; font-size: 22px;
font-family: Source Han Sans CN; font-family: Source Han Sans CN;
color: #333333; color: #333333;
line-height: 28px; line-height: 28px;
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
></div> ></div>
<div class="name"> <div class="name">
<span class="matter-fullName">事项全称</span <span class="matter-fullName">事项全称</span
>{{ v.matterFullName }} >{{ v.matterFullName || v.matterName }}
</div> </div>
</div> </div>
</div> </div>
...@@ -82,7 +82,7 @@ import PageTop from "@/components/PageTop.vue"; ...@@ -82,7 +82,7 @@ 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 YEmpty from "@/components/YEmpty.vue"; import YEmpty from "@/components/YEmpty.vue";
import { getWriteMatterList } from "@/api"; import { getDeviceMatterList } from "@/api";
export default { export default {
components: { components: {
...@@ -107,20 +107,20 @@ export default { ...@@ -107,20 +107,20 @@ export default {
}; };
}, },
created() { created() {
this.getWriteMatterList(); this.getDeviceMatterList();
}, },
watch: { watch: {
searchVal(newVal) { searchVal(newVal) {
if (newVal === "") { if (newVal === "") {
this.current = 1; this.current = 1;
this.getWriteMatterList(); this.getDeviceMatterList();
} }
}, },
}, },
methods: { methods: {
// 获取事项列表 // 获取事项列表
async getWriteMatterList() { async getDeviceMatterList() {
let res = await getWriteMatterList({ let res = await getDeviceMatterList({
page: this.current, page: this.current,
size: this.size, size: this.size,
deptCode: this.deptCode, deptCode: this.deptCode,
...@@ -135,17 +135,17 @@ export default { ...@@ -135,17 +135,17 @@ export default {
changeDept(deptCode) { changeDept(deptCode) {
this.deptCode = deptCode; this.deptCode = deptCode;
this.current = 1; this.current = 1;
this.getWriteMatterList(); this.getDeviceMatterList();
}, },
// 搜索 // 搜索
handleSearch() { handleSearch() {
this.current = 1; this.current = 1;
this.getWriteMatterList(); this.getDeviceMatterList();
}, },
// 分页 // 分页
changePage(cur) { changePage(cur) {
this.current = cur; this.current = cur;
this.getWriteMatterList(); this.getDeviceMatterList();
}, },
handleCheck(row) { handleCheck(row) {
this.matterInfo = row; this.matterInfo = row;
......
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
:class="{ active: i === active }" :class="{ active: i === active }"
v-for="(v, i) in materailsList" v-for="(v, i) in materailsList"
:key="v.id" :key="v.id"
@click="active = i" @click="changeIndex(v, i)"
> >
{{ v.materialName ? v.materialName : v.materiaFullName }} {{ v.materialName ? v.materialName : v.materiaFullName }}
<div class="line"></div> <div class="line"></div>
...@@ -105,7 +105,7 @@ ...@@ -105,7 +105,7 @@
<script> <script>
import Header from "@/components/Header.vue"; import Header from "@/components/Header.vue";
import { getMaterialsList } from "@/api"; import { getMaterialsList, checkMaterials } from "@/api";
import local from "@/utils/local"; import local from "@/utils/local";
export default { export default {
components: { components: {
...@@ -116,6 +116,8 @@ export default { ...@@ -116,6 +116,8 @@ export default {
api: local.getLocal("serverUrl") + "/", api: local.getLocal("serverUrl") + "/",
matterInfo: {}, matterInfo: {},
matterName: "", // 事项名称 matterName: "", // 事项名称
matterId: this.$route.query.matterId, // 事项id
materailsId: this.$route.query.id, // 材料id
materailsList: [], materailsList: [],
active: 0, active: 0,
scale: 100, scale: 100,
...@@ -139,7 +141,7 @@ export default { ...@@ -139,7 +141,7 @@ export default {
let res = await getMaterialsList({ let res = await getMaterialsList({
page: 1, page: 1,
size: -1, size: -1,
matterId: this.$route.query.matterId, matterId: this.matterId,
}); });
let { data } = res.data.data; let { data } = res.data.data;
data.forEach((v) => { data.forEach((v) => {
...@@ -153,8 +155,18 @@ export default { ...@@ -153,8 +155,18 @@ export default {
this.matterName = this.$route.query.matterName this.matterName = this.$route.query.matterName
? this.$route.query.matterName ? this.$route.query.matterName
: data[0].matterName; : data[0].matterName;
let id = this.$route.query.id; this.active = this.materailsList.findIndex(
this.active = this.materailsList.findIndex((v) => v.id == id); (v) => v.id == this.materailsId
);
let curInfo = this.materailsList.find((v) => v.id == this.materailsId);
// 统计报表
this.checkMaterials(
curInfo.matterId,
curInfo.matterName,
curInfo.matterFullName,
curInfo.materialName,
curInfo.materialFullName
);
}, },
// 放大 // 放大
...@@ -173,6 +185,34 @@ export default { ...@@ -173,6 +185,34 @@ export default {
this.scale = 100; this.scale = 100;
} }
}, },
// 统计报表
async checkMaterials(
matterId,
matterName,
matterFullName,
materialName,
materialFullName
) {
await checkMaterials({
matterId,
matterName,
matterFullName,
materialName,
materialFullName,
});
},
// 切换材料
changeIndex(row, index) {
this.active = index;
this.checkMaterials(
row.matterId,
row.matterName,
"",
row.materialName,
row.materialFullName
);
console.log(row);
},
}, },
}; };
</script> </script>
......
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