zhanbo.xu

feat: 开发功能

1 +import request from "@/utils/request";
2 +
3 +// POST
4 +// ​/operationLog​/getOperationLogList
5 +// 查询操作日志列表
6 +export function getOperationLogList(data) {
7 + return request({
8 + url: "/bus-customer/operationLog/getOperationLogList",
9 + method: "post",
10 + data: data,
11 + });
12 +}
1 +import request from "@/utils/request";
2 +
3 +// POST
4 +// /mockReceipt/add
5 +// 新增模拟回执
6 +export function add(data) {
7 + return request({
8 + url: "/bus-customer/mockReceipt/add",
9 + method: "post",
10 + data: data,
11 + });
12 +}
13 +
14 +// POST
15 +// /mockReceipt/generateReceiptXml
16 +// 生成回执xml
17 +export function generateReceiptXml(data) {
18 + return request({
19 + url: "/bus-customer/mockReceipt/generateReceiptXml",
20 + method: "post",
21 + data: data,
22 + });
23 +}
24 +
25 +// POST
26 +// /mockReceipt/search
27 +// 搜索
28 +export function searchList(data) {
29 + return request({
30 + url: "/bus-customer/mockReceipt/search",
31 + method: "post",
32 + data: data,
33 + });
34 +}
35 +
36 +// GET
37 +// /mockReceipt/searchOrderNo
38 +// 搜索订单号
39 +export function searchOrderNo(data) {
40 + return request({
41 + url: "/bus-customer/mockReceipt/searchOrderNo",
42 + method: "get",
43 + params: data,
44 + });
45 +}
...@@ -32,3 +32,13 @@ export function updateOperatorPlace(data) { ...@@ -32,3 +32,13 @@ export function updateOperatorPlace(data) {
32 data: data, 32 data: data,
33 }); 33 });
34 } 34 }
35 +
36 +// GET
37 +// ​/portInfo​/getPortCodeList
38 +// 获取口岸列表作用于条件查询的下拉框
39 +export function getPortCodeList() {
40 + return request({
41 + url: "/bus-customer/portInfo/getPortCodeList",
42 + method: "get",
43 + });
44 +}
......
1 +<svg width="23" height="23" viewBox="0 0 23 23" fill="none" xmlns="http://www.w3.org/2000/svg">
2 +<path d="M12.937 21.5617H0V1.4375H18.6868V11.4996H17.2493V2.87495H1.43745V20.1243H11.4996L12.937 21.5617Z" fill="#333333"/>
3 +<path d="M16.5307 11.4996C19.2619 11.4996 21.5618 13.7995 21.5618 16.5306C21.5618 19.2618 19.2619 21.5617 16.5307 21.5617C13.7996 21.5617 11.4997 19.2618 11.4997 16.5306C11.4997 13.7995 13.7996 11.4996 16.5307 11.4996ZM16.5307 10.0621C12.9371 10.0621 10.0622 12.937 10.0622 16.5306C10.0622 20.1242 12.9371 22.9991 16.5307 22.9991C20.1243 22.9991 22.9992 20.1242 22.9992 16.5306C22.9992 12.937 20.1243 10.0621 16.5307 10.0621ZM4.31245 0H5.74989V4.31234H4.31245V0ZM12.9371 0H14.3746V4.31234H12.9371V0ZM2.875 7.18723H15.812V8.62467H2.875V7.18723ZM2.875 11.4996H10.0622V12.937H2.875V11.4996ZM2.875 15.8119H8.62478V17.2493H2.875V15.8119Z" fill="#333333"/>
4 +<path d="M20.1248 18.6873H15.8125V12.9375H17.2499V17.2498H20.1248V18.6873Z" fill="#333333"/>
5 +</svg>
1 +<svg width="21" height="23" viewBox="0 0 21 23" fill="none" xmlns="http://www.w3.org/2000/svg">
2 +<path d="M18.6508 17.8358H12.1641C11.6754 17.8358 11.3555 17.5101 11.3555 17.0273C11.3555 16.5387 11.6813 16.2188 12.1641 16.2188H18.6508C19.1395 16.2188 19.4594 16.5445 19.4594 17.0273C19.4594 17.5101 18.9766 17.8358 18.6508 17.8358Z" fill="#333333"/>
3 +<path d="M20.2746 17.8456C20.1117 17.8456 19.7859 17.8456 19.623 17.6827L16.8654 14.9255C16.5396 14.5997 16.5396 14.1169 16.8654 13.7912C17.1912 13.4654 17.6741 13.4654 17.9999 13.7912L20.7574 16.5484C21.0832 16.8741 21.0832 17.3569 20.7574 17.6827C20.6004 17.8456 20.4375 17.8456 20.2746 17.8456Z" fill="#333333"/>
4 +<path d="M17.354 20.5976C17.1911 20.5976 16.8653 20.5976 16.7024 20.4347C16.3766 20.109 16.3766 19.6262 16.7024 19.3004L19.46 16.5432C19.7858 16.2175 20.2686 16.2175 20.5944 16.5432C20.9202 16.869 20.9202 17.3518 20.5944 17.6775L17.8369 20.4347C17.6614 20.5227 17.6798 20.5976 17.354 20.5976ZM11.356 22.0576H1.62312C0.651575 22.0576 0 21.4061 0 20.4347V1.62291C0 0.651491 0.651575 0 1.62312 0H18.1627C19.1342 0 19.7858 0.651491 19.7858 1.62291V9.56878C19.7858 10.0574 19.46 10.3773 18.9771 10.3773C18.4884 10.3773 18.1685 10.0516 18.1685 9.56878V1.62291H1.62312V20.4347H11.1931C11.6818 20.4347 12.1647 20.7605 12.1647 21.2433C12.1647 21.7319 11.676 22.0576 11.356 22.0576Z" fill="#333333"/>
5 +<path d="M13.7884 6.64053H5.51568C5.027 6.64053 4.70703 6.31479 4.70703 5.83198C4.70703 5.34337 5.03282 5.02344 5.51568 5.02344H13.7884C14.277 5.02344 14.597 5.34918 14.597 5.83198C14.597 6.3206 14.2712 6.64053 13.7884 6.64053ZM11.3566 11.3464H5.51568C5.027 11.3464 4.70703 11.0206 4.70703 10.5378C4.70703 10.0492 5.03282 9.7293 5.51568 9.7293H11.3566C11.6824 9.7293 12.1652 10.055 12.1652 10.5378C12.1652 11.0206 11.6766 11.3464 11.3566 11.3464ZM9.57057 16.2093H5.51568C5.027 16.2093 4.70703 15.8836 4.70703 15.4008C4.70703 14.9121 5.03282 14.5922 5.51568 14.5922H9.57057C10.0593 14.5922 10.3792 14.918 10.3792 15.4008C10.3792 15.8836 9.89636 16.2093 9.57057 16.2093Z" fill="#333333"/>
6 +</svg>
...@@ -137,7 +137,6 @@ ...@@ -137,7 +137,6 @@
137 </template> 137 </template>
138 138
139 <script> 139 <script>
140 -import { addMenu } from "@/api/menu";
141 import { 140 import {
142 getExportArrivalInList, 141 getExportArrivalInList,
143 getExportArrivalInReceipt, 142 getExportArrivalInReceipt,
...@@ -352,20 +351,6 @@ export default { ...@@ -352,20 +351,6 @@ export default {
352 this.loadings.searchLoading = false; 351 this.loadings.searchLoading = false;
353 }); 352 });
354 }, 353 },
355 - // 新增菜单用,可以不麻烦后端---------
356 - // addMenuFn() {
357 - // let params = {
358 - // icon: "",
359 - // menuName: "运抵单查询",
360 - // order: 4.4,
361 - // parentMenuId: 90,
362 - // physicalUrl: "/arrival-list",
363 - // url: "",
364 - // };
365 - // addMenu(params).then((res) => {
366 - // console.log(res);
367 - // });
368 - // },
369 354
370 //分页 355 //分页
371 currentChange(val) { 356 currentChange(val) {
......
1 -<template>
2 - <el-dialog
3 - class="entryDialog classCUploadDialog"
4 - :title="title"
5 - :visible.sync="outerVisible"
6 - :show-close="false"
7 - width="25%"
8 - :close-on-click-modal="false"
9 - :destroy-on-close="true"
10 - v-loading="loadings.dialogLoading"
11 - @close="close"
12 - >
13 - <div class="modelItem">
14 - <el-form
15 - v-if="type != 'menuChange'"
16 - class="fedexFormStyle"
17 - ref="formData"
18 - :model="formData"
19 - :rules="rules"
20 - label-position="top"
21 - size="small"
22 - >
23 - <Formitem label="角色名称" prop="roleName" type="edit">
24 - <el-input
25 - type="text"
26 - class="inputShadow"
27 - id="inputInner-edit-roleName"
28 - resize="none"
29 - v-model="formData.roleName"
30 - clearable
31 - placeholder=""
32 - ></el-input>
33 - </Formitem>
34 - </el-form>
35 - <el-tree
36 - ref="tree"
37 - class="menuTree"
38 - v-else
39 - :data="treeData"
40 - show-checkbox
41 - default-expand-all
42 - node-key="id"
43 - :default-expanded-keys="expandedKeys"
44 - :default-checked-keys="checkedKeys"
45 - :props="defaultProps"
46 - @check="treeCheckChange"
47 - >
48 - </el-tree>
49 - </div>
50 - <div class="dialogOption entrySave">
51 - <el-button
52 - class="entrySaveButton"
53 - :disabled="loadings.submitLoading"
54 - @click="submit"
55 - >确 定</el-button
56 - >
57 - <el-button
58 - class="entrySaveButton"
59 - :disabled="loadings.uploadLoading"
60 - @click="close"
61 - >关 闭</el-button
62 - >
63 - </div>
64 - </el-dialog>
65 -</template>
66 -
67 -<script>
68 -import {
69 - addRoleData,
70 - updateRoleData,
71 - updateRoleMenuData,
72 - getMenuByRoleId,
73 -} from "@/api/system/user.js";
74 -import { getRouters } from "@/api/menu";
75 -export default {
76 - props: {
77 - outerVisible: {
78 - type: Boolean,
79 - default: false,
80 - },
81 - title: {
82 - type: String,
83 - default: "新增角色",
84 - },
85 - type: {
86 - type: String,
87 - default: "",
88 - },
89 - active: {
90 - type: Object,
91 - default: null,
92 - },
93 - },
94 - watch: {
95 - outerVisible(val) {
96 - if (val) {
97 - this.loadings.dialogLoading = false;
98 - if (this.type == "update") {
99 - this.formData = this.active;
100 - } else if (this.type == "menuChange") {
101 - this.formData = this.active;
102 - this.searchTreeData();
103 - this.loadCheckedKeys();//加载已绑定的菜单
104 - }
105 - }
106 - },
107 - },
108 - data() {
109 - return {
110 - formData: {
111 - roleName: "",
112 - },
113 - treeData: [],
114 - treeCheckData: [],
115 - expandedKeys: [],
116 - checkedKeys: [],
117 - rules: {
118 - roleName: [
119 - {
120 - required: true,
121 - trigger: "blur",
122 - message: "角色名称不能为空!",
123 - },
124 - ],
125 - },
126 - defaultProps: {
127 - children: "children",
128 - label: "label",
129 - },
130 - searchForm: {},
131 - loadings: {
132 - dialogLoading: false,
133 - uploadLoading: false,
134 - submitLoading: false,
135 - },
136 - loadingText: "",
137 - };
138 - },
139 - methods: {
140 - //查询菜单数据
141 - searchTreeData() {
142 - this.loadings.dialogLoading = true;
143 - getRouters()
144 - .then((res) => {
145 - if (res.code === "200") {
146 - let arr = [];
147 - res.data.forEach((item) => {
148 - let status = true;
149 - if (item.parentMenuId == 0) {
150 - let obj = {
151 - id: item.menuId,
152 - label: item.menuName,
153 - children: [],
154 - };
155 - arr.forEach((menuItem) => {
156 - if (menuItem.id == item.menuId) {
157 - status = false;
158 - menuItem.label = item.menuName;
159 - }
160 - });
161 - if (status) {
162 - arr.push(obj);
163 - }
164 - } else {
165 - let obj = {
166 - id: item.menuId,
167 - label: item.menuName,
168 - };
169 - arr.forEach((menuItem) => {
170 - if (menuItem.id == item.parentMenuId) {
171 - status = false;
172 - menuItem.children.push(obj);
173 - }
174 - });
175 - if (status) {
176 - arr.push({
177 - id: item.parentMenuId,
178 - label: "",
179 - children: [obj],
180 - });
181 - }
182 - }
183 - });
184 - this.treeData = arr;
185 - } else {
186 - this.alertWarningMsg(res.message);
187 - }
188 - this.loadings.dialogLoading = false;
189 - })
190 - .catch((err) => {
191 - console.log(err);
192 - this.loadings.dialogLoading = false;
193 - });
194 - },
195 - //数据保存
196 - submit() {
197 - this.loadings.dialogLoading = true;
198 - let obj = {};
199 - if (this.type == "add") {
200 - this.$refs.formData.validate((valid) => {
201 - if (valid) {
202 - obj.roleName = this.formData.roleName;
203 - this.addapi(obj);
204 - } else {
205 - this.loadings.dialogLoading = false;
206 - }
207 - });
208 - } else if (this.type == "update") {
209 - this.$refs.formData.validate((valid) => {
210 - if (valid) {
211 - obj.roleId = this.formData.roleId;
212 - obj.roleName = this.formData.roleName;
213 - this.updateapi(obj);
214 - } else {
215 - this.loadings.dialogLoading = false;
216 - }
217 - });
218 - } else if (this.type == "menuChange") {
219 - obj.menuId = this.treeCheckData; // 使用合并后的选中节点
220 - obj.roleId = this.formData.roleId;
221 - this.menuChangeapi(obj);
222 - }
223 - },
224 - //新增
225 - addapi(val) {
226 - addRoleData(val)
227 - .then((res) => {
228 - if (res.code === "200") {
229 - this.msgSuccess(res.message);
230 - this.close();
231 - } else {
232 - this.alertWarningMsg(res.message);
233 - this.loadings.dialogLoading = false;
234 - }
235 - })
236 - .catch((err) => {
237 - console.log(err);
238 - this.loadings.dialogLoading = false;
239 - });
240 - },
241 - //修改
242 - updateapi(val) {
243 - updateRoleData(val)
244 - .then((res) => {
245 - if (res.code === "200") {
246 - this.msgSuccess(res.message);
247 - this.close();
248 - } else {
249 - this.alertWarningMsg(res.message);
250 - this.loadings.dialogLoading = false;
251 - }
252 - })
253 - .catch((err) => {
254 - console.log(err);
255 - this.loadings.dialogLoading = false;
256 - });
257 - },
258 - //菜单权限修改
259 - menuChangeapi(val) {
260 - updateRoleMenuData(val)
261 - .then((res) => {
262 - if (res.code === "200") {
263 - this.msgSuccess(res.message);
264 - this.close();
265 - this.$store.dispatch('GenerateRoutes')
266 - } else {
267 - this.alertWarningMsg(res.message);
268 - this.loadings.dialogLoading = false;
269 - }
270 - })
271 - .catch((err) => {
272 - console.log(err);
273 - this.loadings.dialogLoading = false;
274 - });
275 - },
276 - treeCheckChange(data, checked) {
277 - console.log(data, checked);
278 - let arr = [];
279 - arr = checked.checkedKeys.concat(checked.halfCheckedKeys);
280 - this.treeCheckData = arr;
281 - },
282 - close() {
283 - this.formData = {
284 - roleName: "",
285 - };
286 - this.checkedKeys = []
287 - this.$emit("close");
288 - },
289 - // 加载已绑定的菜单
290 - loadCheckedKeys() {
291 - if (this.formData.roleId) {
292 - getMenuByRoleId(this.formData.roleId)
293 - .then((res) => {
294 - if (res.code === "200") {
295 - this.checkedKeys = res.data.filter(item => item.isBinding && (item.parentMenuId!=0 ) ).map(item => item.menuId);
296 - //console.log('初始 checkedKeys:', this.checkedKeys);
297 - this.$nextTick(() => {
298 - this.$refs.tree.setCheckedKeys(this.checkedKeys);
299 - this.updateTreeCheckData();
300 - });
301 - } else {
302 - this.alertWarningMsg(res.message);
303 - }
304 - })
305 - .catch((err) => {
306 - console.log(err);
307 - });
308 - }
309 - },
310 - //加载选中的节点及半选中的父节点
311 - updateTreeCheckData() {
312 - const checkedKeys = this.$refs.tree.getCheckedKeys();
313 - const halfCheckedKeys = this.$refs.tree.getHalfCheckedKeys();
314 - this.treeCheckData = checkedKeys.concat(halfCheckedKeys);
315 - //console.log('合并后的 treeCheckData:', this.treeCheckData);
316 - },
317 -
318 - },
319 -};
320 -</script>
321 -
322 -<style lang="scss" scoped>
323 -@import "@/assets/styles/variables.scss";
324 -
325 -.menuTree {
326 - max-width: 350px;
327 - max-height: 300px;
328 - overflow: auto;
329 - margin: 0 auto;
330 - border: 1px solid #999;
331 - padding: 10px;
332 -}
333 -</style>
1 +<template>
2 + <div class="entrySreach">
3 + <el-form
4 + class="fedexFormStyle fedexformSreach fedexformSreachBottomBorder"
5 + ref="sreachForm"
6 + :model="sreachFormData"
7 + label-position="top"
8 + size="small"
9 + >
10 + <el-row class="row-border">
11 + <el-col :span="5">
12 + <Formitem label="用户ID" prop="userId">
13 + <el-input
14 + type="text"
15 + class="inputShadow"
16 + id="inputInner--userId"
17 + resize="none"
18 + v-model="sreachFormData.userId"
19 + clearable
20 + placeholder=""
21 + ></el-input>
22 + </Formitem>
23 + </el-col>
24 + <el-col :span="5">
25 + <Formitem label="操作接口" prop="interfaceName">
26 + <el-input
27 + type="text"
28 + class="inputShadow"
29 + id="inputInner--interfaceName"
30 + resize="none"
31 + v-model="sreachFormData.interfaceName"
32 + clearable
33 + placeholder=""
34 + ></el-input>
35 + </Formitem>
36 + </el-col>
37 + <el-col :span="5">
38 + <Formitem label="状态" prop="status">
39 + <el-select
40 + type="text"
41 + id="inputInner--status"
42 + v-model="sreachFormData.status"
43 + clearable
44 + filterable
45 + placeholder=""
46 + >
47 + <el-option
48 + v-for="item in statusList"
49 + :key="item.id"
50 + :label="item.itemChineseName"
51 + :value="item.itemValue"
52 + ></el-option>
53 + </el-select>
54 + </Formitem>
55 + </el-col>
56 + <el-col :span="5">
57 + <Formitem label="操作日期" prop="accessTime">
58 + <el-date-picker
59 + class="inputInner--accessTime"
60 + id="inputInner--accessTime"
61 + v-model="sreachFormData.accessTime"
62 + type="daterange"
63 + format="yyyy-MM-dd"
64 + prefix-icon="none"
65 + value-format="yyyy-MM-dd"
66 + range-separator="至"
67 + @change="dateChange"
68 + />
69 + </Formitem>
70 + </el-col>
71 + <el-col :span="2">
72 + <el-form-item class="textCenter">
73 + <el-button
74 + class="entrySreachButton"
75 + type="text"
76 + icon="el-icon-search"
77 + :loading="loadings.searchLoading"
78 + @click="search(0)"
79 + ></el-button>
80 + </el-form-item>
81 + </el-col>
82 + <el-col :span="2">
83 + <el-form-item class="textLeft textCenter">
84 + <el-button
85 + type="text"
86 + size="small"
87 + icon="el-icon-refresh"
88 + @click="clear"
89 + >
90 + 重置
91 + </el-button>
92 + </el-form-item>
93 + </el-col>
94 + </el-row>
95 + <el-row class="row-border">
96 + <el-col :span="5">
97 + <Formitem label="IP地址" prop="ipAddress">
98 + <el-input
99 + type="text"
100 + class="inputShadow"
101 + id="inputInner--ipAddress"
102 + resize="none"
103 + v-model="sreachFormData.ipAddress"
104 + clearable
105 + placeholder=""
106 + ></el-input>
107 + </Formitem>
108 + </el-col>
109 + </el-row>
110 + </el-form>
111 + <div style="height: 20px"></div>
112 + <!-- :maxHeight="tableMaxheight + 'px'" -->
113 + <Table
114 + class="fedexDetialTable fedexSreachTable"
115 + ref="entryTable"
116 + :data="tableData"
117 + :headerData="headerData"
118 + :height="tableMaxheight + 'px'"
119 + :border="true"
120 + :pagination="true"
121 + :order="false"
122 + :loading="loadings.searchLoading"
123 + :page="page.pageIndex"
124 + :pageSizes="[20, 30, 50, 100]"
125 + :totalCount="page.total"
126 + @sizeChange="sizeChange"
127 + @currentChange="currentChange"
128 + :selection="false"
129 + :selectFixed="false"
130 + :rowSelectDataType="false"
131 + >
132 + </Table>
133 + </div>
134 +</template>
135 +
136 +<script>
137 +import { getOperationLogList } from "@/api/logSearch-api.js";
138 +import { getDictData } from "@/api/system/dict-api.js";
139 +
140 +export default {
141 + name: "SupervisePlaceManage",
142 + components: {},
143 + data() {
144 + return {
145 + sreachFormData: {
146 + userId: "",
147 + interfaceName: "",
148 + status: "",
149 + ipAddress: "",
150 + endAccessTime: "",
151 + startAccessTime: "",
152 + accessTime: [],
153 + },
154 + page: {
155 + pageIndex: 1,
156 + pageSize: 20,
157 + total: 0,
158 + },
159 + tableData: [],
160 + headerData: [
161 + {
162 + name: "用户ID",
163 + value: "userId",
164 + width: "100px",
165 + align: "left",
166 + },
167 + {
168 + name: "操作接口",
169 + value: "interfaceName",
170 + width: "",
171 + align: "left",
172 + },
173 + {
174 + name: "IP地址",
175 + value: "ipAddress",
176 + width: "150px",
177 + align: "left",
178 + },
179 + {
180 + name: "请求参数",
181 + value: "requestParams",
182 + width: "",
183 + align: "left",
184 + },
185 + {
186 + name: "状态",
187 + value: "status",
188 + width: "120px",
189 + align: "left",
190 + },
191 + {
192 + name: "错误信息",
193 + value: "errorMessage",
194 + width: "",
195 + align: "left",
196 + },
197 + {
198 + name: "操作时间",
199 + value: "accessTime",
200 + width: "180px",
201 + align: "left",
202 + },
203 + ],
204 + loadings: {
205 + searchLoading: false,
206 + },
207 + tableMaxheight: 500,
208 + statusList: [],
209 + };
210 + },
211 + created() {
212 + this.search(0);
213 + this.calculateTableHeight();
214 + },
215 + mounted() {
216 + this.tableMaxheight = window.innerHeight - 300;
217 + this.fetchStatusList();
218 + window.addEventListener("resize", this.calculateTableHeight);
219 + },
220 + beforeDestroy() {
221 + window.removeEventListener("resize", this.calculateTableHeight);
222 + },
223 + methods: {
224 + calculateTableHeight() {
225 + this.tableMaxheight = window.innerHeight - 300;
226 + },
227 + fetchStatusList() {
228 + getDictData({ doctCode: "RESPONSE_STATE" })
229 + .then((res) => {
230 + if (res.code == "200") {
231 + console.log(res);
232 + this.statusList = res.data;
233 + }
234 + })
235 + .catch((err) => {
236 + console.error(err);
237 + });
238 + },
239 + dateChange(val) {
240 + if (val) {
241 + this.sreachFormData.startAccessTime = val[0];
242 + this.sreachFormData.endAccessTime = val[1];
243 + } else {
244 + this.sreachFormData.startAccessTime = "";
245 + this.sreachFormData.endAccessTime = "";
246 + this.sreachFormData.accessTime = [];
247 + }
248 + },
249 + clear() {
250 + this.$refs.sreachForm.resetFields();
251 + this.search(0);
252 + },
253 + //查询
254 + search(val) {
255 + this.loadings.searchLoading = true;
256 + if (val == 0) {
257 + this.page.pageIndex = 1;
258 + }
259 + let obj = this.sreachFormData;
260 + obj.pageIndex = this.page.pageIndex;
261 + obj.pageSize = this.page.pageSize;
262 + getOperationLogList(obj)
263 + .then((res) => {
264 + if (res.code === "200") {
265 + this.tableData = res.data.value;
266 + this.page.total = res.data.totalItems;
267 + this.tableData.forEach((item, idx) => {
268 + item.index = idx;
269 + });
270 + } else {
271 + this.alertWarningMsg(res.message);
272 + }
273 + this.loadings.searchLoading = false;
274 + })
275 + .catch((err) => {
276 + console.log(err);
277 + this.loadings.searchLoading = false;
278 + });
279 + },
280 +
281 + //分页
282 + currentChange(val) {
283 + this.page.pageIndex = val.page;
284 + this.search(1);
285 + },
286 + sizeChange(val) {
287 + this.page.pageSize = val;
288 + this.search(1);
289 + },
290 + input() {
291 + this.$forceUpdate();
292 + },
293 + },
294 +};
295 +</script>
296 +
297 +<style scoped lang="scss">
298 +@import "@/assets/styles/variables.scss";
299 +.entrySreach {
300 + height: 100%;
301 + background-color: $menuLightBg;
302 +
303 + .entrySreachButton {
304 + display: inline-block;
305 + font-size: 20px;
306 + color: $fedexButton !important;
307 + }
308 +
309 + .optionButton {
310 + padding: 10px;
311 + text-align: left;
312 +
313 + .el-button {
314 + color: $fedexButton;
315 + border-color: $fedexButton !important;
316 +
317 + svg {
318 + display: inline-block;
319 + margin-right: 5px;
320 + fill: $fedexButton;
321 + }
322 + }
323 +
324 + .entrySaveButton:hover,
325 + .entrySaveButton:focus {
326 + color: $menuLightBg !important;
327 + background-color: $fedexButton !important;
328 + }
329 + }
330 +}
331 +
332 +.texttareaTip {
333 + position: absolute;
334 + top: 52%;
335 + right: 20px;
336 + transform: translate(0, -50%);
337 + z-index: 10;
338 +}
339 +</style>
1 +<template>
2 + <el-dialog
3 + class="entryDialog classCUploadDialog"
4 + :title="title"
5 + :visible.sync="outerVisible"
6 + :show-close="false"
7 + width="40%"
8 + :close-on-click-modal="false"
9 + :destroy-on-close="true"
10 + v-loading="loadings.dialogLoading"
11 + @close="close"
12 + >
13 + <div class="modelItem">
14 + <el-form
15 + class="fedexFormStyle"
16 + ref="formData"
17 + :model="formData"
18 + :rules="rules"
19 + label-position="top"
20 + size="small"
21 + >
22 + <el-row :gutter="5">
23 + <el-col :span="8">
24 + <Formitem
25 + label="监管场所经营人代码"
26 + prop="operatorCode"
27 + type="edit"
28 + >
29 + <el-input
30 + type="text"
31 + class="inputShadow"
32 + id="inputInner-edit-operatorCode"
33 + resize="none"
34 + v-model="formData.operatorCode"
35 + clearable
36 + placeholder=""
37 + ></el-input>
38 + </Formitem>
39 + </el-col>
40 + <el-col :span="8">
41 + <Formitem
42 + label="监管场所经营人名称"
43 + prop="operatorName"
44 + type="edit"
45 + >
46 + <el-input
47 + type="text"
48 + class="inputShadow"
49 + id="inputInner-edit-operatorName"
50 + resize="none"
51 + v-model="formData.operatorName"
52 + clearable
53 + placeholder=""
54 + ></el-input>
55 + </Formitem>
56 + </el-col>
57 + <el-col :span="8">
58 + <Formitem label="所属口岸" prop="portCode" type="edit">
59 + <el-select
60 + type="text"
61 + id="inputInner--portCode"
62 + v-model="formData.portCode"
63 + clearable
64 + filterable
65 + placeholder=""
66 + >
67 + <el-option
68 + v-for="item in portCodeList"
69 + :key="item"
70 + :label="item"
71 + :value="item"
72 + ></el-option>
73 + </el-select>
74 + </Formitem>
75 + </el-col>
76 + </el-row>
77 + <el-row :gutter="5">
78 + <el-col :span="8">
79 + <Formitem label="监管场所代码" prop="loctNo" type="edit">
80 + <el-input
81 + type="text"
82 + class="inputShadow"
83 + id="inputInner-edit-loctNo"
84 + resize="none"
85 + v-model="formData.loctNo"
86 + clearable
87 + placeholder=""
88 + ></el-input>
89 + </Formitem>
90 + </el-col>
91 + <el-col :span="8">
92 + <Formitem
93 + label="监管场所负责人"
94 + prop="operatorPersonInCharge"
95 + type="edit"
96 + >
97 + <el-input
98 + type="text"
99 + class="inputShadow"
100 + id="inputInner-edit-operatorPersonInCharge"
101 + resize="none"
102 + v-model="formData.operatorPersonInCharge"
103 + clearable
104 + placeholder=""
105 + ></el-input>
106 + </Formitem>
107 + </el-col>
108 + <el-col :span="8">
109 + <Formitem label="联系电话" prop="contactNumber" type="edit">
110 + <el-input
111 + type="text"
112 + class="inputShadow"
113 + id="inputInner-edit-contactNumber"
114 + resize="none"
115 + v-model="formData.contactNumber"
116 + clearable
117 + placeholder=""
118 + ></el-input>
119 + </Formitem>
120 + </el-col>
121 + </el-row>
122 + </el-form>
123 + </div>
124 + <div class="dialogOption entrySave">
125 + <el-button
126 + class="entrySaveButton"
127 + :disabled="loadings.submitLoading"
128 + @click="submit"
129 + >确 定</el-button
130 + >
131 + <el-button
132 + class="entrySaveButton"
133 + :disabled="loadings.uploadLoading"
134 + @click="close"
135 + >关 闭</el-button
136 + >
137 + </div>
138 + </el-dialog>
139 +</template>
140 +
141 +<script>
142 +import {
143 + addOperatorPlace,
144 + updateOperatorPlace,
145 +} from "@/api/supervisePlaceManage-api.js";
146 +export default {
147 + props: {
148 + outerVisible: {
149 + type: Boolean,
150 + default: false,
151 + },
152 + title: {
153 + type: String,
154 + default: "监管场所管理新增",
155 + },
156 + type: {
157 + type: String,
158 + default: "",
159 + },
160 + active: {
161 + type: Object,
162 + default: null,
163 + },
164 + portCodeList: {
165 + type: Array,
166 + default: () => {
167 + return [];
168 + },
169 + },
170 + },
171 + watch: {
172 + outerVisible(val) {
173 + if (val) {
174 + this.loadings.dialogLoading = false;
175 + if (this.type == "update") {
176 + this.formData = this.active;
177 + }
178 + }
179 + },
180 + },
181 + data() {
182 + return {
183 + formData: {
184 + operatorCode: "",
185 + operatorName: "",
186 + portCode: "",
187 + loctNo: "",
188 + operatorPersonInCharge: "",
189 + contactNumber: "",
190 + },
191 + rules: {
192 + operatorCode: [
193 + {
194 + required: true,
195 + trigger: "blur",
196 + message: "监管场所代码不能为空!",
197 + },
198 + ],
199 + operatorName: [
200 + {
201 + required: true,
202 + trigger: "blur",
203 + message: "监管场所负责人不能为空!",
204 + },
205 + ],
206 + },
207 +
208 + searchForm: {},
209 + loadings: {
210 + dialogLoading: false,
211 + uploadLoading: false,
212 + submitLoading: false,
213 + },
214 + loadingText: "",
215 + };
216 + },
217 + methods: {
218 + //数据保存
219 + submit() {
220 + this.loadings.dialogLoading = true;
221 + let obj = {
222 + ...this.formData,
223 + };
224 + if (this.type == "add") {
225 + this.$refs.formData.validate((valid) => {
226 + if (valid) {
227 + this.addapi(obj);
228 + } else {
229 + this.loadings.dialogLoading = false;
230 + }
231 + });
232 + } else if (this.type == "update") {
233 + this.$refs.formData.validate((valid) => {
234 + if (valid) {
235 + obj.id = this.active.id;
236 + this.updateapi(obj);
237 + } else {
238 + this.loadings.dialogLoading = false;
239 + }
240 + });
241 + }
242 + },
243 + //新增
244 + addapi(val) {
245 + addOperatorPlace(val)
246 + .then((res) => {
247 + if (res.code === "200") {
248 + this.msgSuccess(res.message);
249 + this.close();
250 + } else {
251 + this.alertWarningMsg(res.message);
252 + this.loadings.dialogLoading = false;
253 + }
254 + })
255 + .catch((err) => {
256 + console.log(err);
257 + this.loadings.dialogLoading = false;
258 + });
259 + },
260 + //修改
261 + updateapi(val) {
262 + updateOperatorPlace(val)
263 + .then((res) => {
264 + if (res.code === "200") {
265 + this.msgSuccess(res.message);
266 + this.close();
267 + } else {
268 + this.alertWarningMsg(res.message);
269 + this.loadings.dialogLoading = false;
270 + }
271 + })
272 + .catch((err) => {
273 + console.log(err);
274 + this.loadings.dialogLoading = false;
275 + });
276 + },
277 + //菜单权限修改
278 + menuChangeapi(val) {
279 + updateOperatorPlace(val)
280 + .then((res) => {
281 + if (res.code === "200") {
282 + this.msgSuccess(res.message);
283 + this.close();
284 + this.$store.dispatch("GenerateRoutes");
285 + } else {
286 + this.alertWarningMsg(res.message);
287 + this.loadings.dialogLoading = false;
288 + }
289 + })
290 + .catch((err) => {
291 + console.log(err);
292 + this.loadings.dialogLoading = false;
293 + });
294 + },
295 +
296 + close() {
297 + this.formData = {
298 + operatorCode: "",
299 + operatorName: "",
300 + portCode: "",
301 + loctNo: "",
302 + operatorPersonInCharge: "",
303 + contactNumber: "",
304 + };
305 + this.$emit("close");
306 + },
307 + },
308 +};
309 +</script>
310 +
311 +<style lang="scss" scoped>
312 +@import "@/assets/styles/variables.scss";
313 +
314 +.menuTree {
315 + max-width: 350px;
316 + max-height: 300px;
317 + overflow: auto;
318 + margin: 0 auto;
319 + border: 1px solid #999;
320 + padding: 10px;
321 +}
322 +</style>
...@@ -10,18 +10,50 @@ ...@@ -10,18 +10,50 @@
10 <el-row class="row-border"> 10 <el-row class="row-border">
11 <!-- 角色名称 --> 11 <!-- 角色名称 -->
12 <el-col :span="5"> 12 <el-col :span="5">
13 - <Formitem label="角色名称" prop="roleName"> 13 + <Formitem label="经营人代码" prop="operatorCode">
14 <el-input 14 <el-input
15 type="text" 15 type="text"
16 class="inputShadow" 16 class="inputShadow"
17 - id="inputInner--roleName" 17 + id="inputInner--operatorCode"
18 resize="none" 18 resize="none"
19 - v-model="sreachFormData.roleName" 19 + v-model="sreachFormData.operatorCode"
20 clearable 20 clearable
21 placeholder="" 21 placeholder=""
22 ></el-input> 22 ></el-input>
23 </Formitem> 23 </Formitem>
24 </el-col> 24 </el-col>
25 + <el-col :span="5">
26 + <Formitem label="经营人名称" prop="operatorName">
27 + <el-input
28 + type="text"
29 + class="inputShadow"
30 + id="inputInner--operatorName"
31 + resize="none"
32 + v-model="sreachFormData.operatorName"
33 + clearable
34 + placeholder=""
35 + ></el-input>
36 + </Formitem>
37 + </el-col>
38 + <el-col :span="5">
39 + <Formitem label="所属口岸" prop="portCode">
40 + <el-select
41 + type="text"
42 + id="inputInner--portCode"
43 + v-model="sreachFormData.portCode"
44 + clearable
45 + filterable
46 + placeholder=""
47 + >
48 + <el-option
49 + v-for="item in portCodeList"
50 + :key="item"
51 + :label="item"
52 + :value="item"
53 + ></el-option>
54 + </el-select>
55 + </Formitem>
56 + </el-col>
25 <el-col :span="2"> 57 <el-col :span="2">
26 <el-form-item class="textCenter"> 58 <el-form-item class="textCenter">
27 <el-button 59 <el-button
...@@ -33,6 +65,19 @@ ...@@ -33,6 +65,19 @@
33 ></el-button> 65 ></el-button>
34 </el-form-item> 66 </el-form-item>
35 </el-col> 67 </el-col>
68 + <el-col :span="2">
69 + <!-- 清空查询条件-->
70 + <el-form-item class="textLeft textCenter">
71 + <el-button
72 + type="text"
73 + size="small"
74 + icon="el-icon-refresh"
75 + @click="clear"
76 + >
77 + 重置
78 + </el-button>
79 + </el-form-item>
80 + </el-col>
36 </el-row> 81 </el-row>
37 </el-form> 82 </el-form>
38 <div class="optionButton"> 83 <div class="optionButton">
...@@ -42,7 +87,7 @@ ...@@ -42,7 +87,7 @@
42 size="small" 87 size="small"
43 @click="addRole" 88 @click="addRole"
44 > 89 >
45 - 新增角色 90 + 新增
46 </el-button> 91 </el-button>
47 </div> 92 </div>
48 <Table 93 <Table
...@@ -67,12 +112,7 @@ ...@@ -67,12 +112,7 @@
67 <template slot="optionColumn"> 112 <template slot="optionColumn">
68 <el-table-column align="left" label="操作"> 113 <el-table-column align="left" label="操作">
69 <template slot-scope="scope"> 114 <template slot-scope="scope">
70 - <el-button type="text" @click="update(scope.row)"> 115 + <el-button type="text" @click="update(scope.row)"> 修改 </el-button>
71 - 角色修改
72 - </el-button>
73 - <el-button type="text" @click="muenChange(scope.row)">
74 - 权限绑定
75 - </el-button>
76 </template> 116 </template>
77 </el-table-column> 117 </el-table-column>
78 </template> 118 </template>
...@@ -83,23 +123,29 @@ ...@@ -83,23 +123,29 @@
83 :type="editType" 123 :type="editType"
84 :active="activeData" 124 :active="activeData"
85 @close="dialogClose" 125 @close="dialogClose"
126 + :portCodeList="portCodeList"
86 /> 127 />
87 </div> 128 </div>
88 </template> 129 </template>
89 130
90 <script> 131 <script>
91 -import { getRoleList } from "@/api/system/user.js"; 132 +import {
133 + getOperatorPlaceList,
134 + getPortCodeList,
135 +} from "@/api/supervisePlaceManage-api.js";
136 +import { searchList } from "@/api/receiptManagement-api.js";
92 import DialogVue from "./dialog.vue"; 137 import DialogVue from "./dialog.vue";
93 -import { addMenu } from "@/api/menu";
94 export default { 138 export default {
95 - name: "LogList", 139 + name: "SupervisePlaceManage",
96 components: { 140 components: {
97 DialogVue, 141 DialogVue,
98 }, 142 },
99 data() { 143 data() {
100 return { 144 return {
101 sreachFormData: { 145 sreachFormData: {
102 - roleName: "", 146 + portCode: "",
147 + operatorCode: "",
148 + operatorName: "",
103 }, 149 },
104 page: { 150 page: {
105 pageIndex: 1, 151 pageIndex: 1,
...@@ -110,8 +156,32 @@ export default { ...@@ -110,8 +156,32 @@ export default {
110 tableData: [], 156 tableData: [],
111 headerData: [ 157 headerData: [
112 { 158 {
113 - name: "角色名", 159 + name: "回执状态",
114 - value: "roleName", 160 + value: "receiptStatus",
161 + width: "",
162 + align: "left",
163 + },
164 + {
165 + name: "订单编号",
166 + value: "orderNo",
167 + width: "",
168 + align: "left",
169 + },
170 + {
171 + name: "回执类型",
172 + value: "receiptType",
173 + width: "",
174 + align: "left",
175 + },
176 + {
177 + name: "回执文本",
178 + value: "receiptInfo",
179 + width: "",
180 + align: "left",
181 + },
182 + {
183 + name: "创建时间",
184 + value: "createTime",
115 width: "", 185 width: "",
116 align: "left", 186 align: "left",
117 }, 187 },
...@@ -123,6 +193,7 @@ export default { ...@@ -123,6 +193,7 @@ export default {
123 outerVisible: false, 193 outerVisible: false,
124 dialogTitle: "", 194 dialogTitle: "",
125 editType: "", 195 editType: "",
196 + portCodeList: [],
126 }; 197 };
127 }, 198 },
128 created() { 199 created() {
...@@ -130,8 +201,25 @@ export default { ...@@ -130,8 +201,25 @@ export default {
130 }, 201 },
131 mounted() { 202 mounted() {
132 this.tableMaxheight = window.innerHeight - 300; 203 this.tableMaxheight = window.innerHeight - 300;
204 + this.fetchPortCodeList();
133 }, 205 },
134 methods: { 206 methods: {
207 + // 获取所属口岸
208 + fetchPortCodeList() {
209 + getPortCodeList()
210 + .then((res) => {
211 + if (res.code === "200") {
212 + this.portCodeList = res.data;
213 + } else {
214 + }
215 + })
216 + .catch((err) => {
217 + console.log(err);
218 + });
219 + },
220 + clear() {
221 + this.$refs.sreachForm.resetFields();
222 + },
135 //查询 223 //查询
136 search(val) { 224 search(val) {
137 this.loadings.searchLoading = true; 225 this.loadings.searchLoading = true;
...@@ -141,7 +229,7 @@ export default { ...@@ -141,7 +229,7 @@ export default {
141 let obj = this.sreachFormData; 229 let obj = this.sreachFormData;
142 obj.pageIndex = this.page.pageIndex; 230 obj.pageIndex = this.page.pageIndex;
143 obj.pageSize = this.page.pageSize; 231 obj.pageSize = this.page.pageSize;
144 - getRoleList(obj) 232 + searchList(obj)
145 .then((res) => { 233 .then((res) => {
146 if (res.code === "200") { 234 if (res.code === "200") {
147 this.tableData = res.data.value; 235 this.tableData = res.data.value;
...@@ -160,36 +248,17 @@ export default { ...@@ -160,36 +248,17 @@ export default {
160 }); 248 });
161 }, 249 },
162 addRole() { 250 addRole() {
163 - this.dialogTitle = "新增角色"; 251 + this.dialogTitle = "监管场所管理新增";
164 this.editType = "add"; 252 this.editType = "add";
165 this.outerVisible = true; 253 this.outerVisible = true;
166 }, 254 },
167 - // 新增菜单用,可以不麻烦后端---------
168 - addMenuFn() {
169 - let params = {
170 - icon: "",
171 - menuName: "运抵单查询",
172 - order: 4.4,
173 - parentMenuId: 90,
174 - physicalUrl: "/arrival-list",
175 - url: "",
176 - };
177 - addMenu(params).then((res) => {
178 - console.log(res);
179 - });
180 - },
181 update(val) { 255 update(val) {
182 - this.dialogTitle = "修改角色"; 256 + this.dialogTitle = "监管场所管理修改";
183 this.editType = "update"; 257 this.editType = "update";
184 this.outerVisible = true; 258 this.outerVisible = true;
185 - this.activeData = val; 259 + this.activeData = JSON.parse(JSON.stringify(val));
186 - },
187 - muenChange(val) {
188 - this.dialogTitle = "绑定权限";
189 - this.editType = "menuChange";
190 - this.outerVisible = true;
191 - this.activeData = val;
192 }, 260 },
261 +
193 dialogClose() { 262 dialogClose() {
194 this.outerVisible = false; 263 this.outerVisible = false;
195 this.activeData = null; 264 this.activeData = null;
......
...@@ -168,11 +168,11 @@ export default { ...@@ -168,11 +168,11 @@ export default {
168 // 新增菜单用,可以不麻烦后端--------- 168 // 新增菜单用,可以不麻烦后端---------
169 addMenuFn() { 169 addMenuFn() {
170 let params = { 170 let params = {
171 - icon: "", 171 + icon: "receipt",
172 - menuName: "运抵单查询", 172 + menuName: "模拟回执管理",
173 - order: 2.4, 173 + order: 1,
174 - parentMenuId: 98, 174 + parentMenuId: 0,
175 - physicalUrl: "/arrival-list", 175 + physicalUrl: "/receipt", //-management
176 url: "", 176 url: "",
177 }; 177 };
178 addMenu(params).then((res) => { 178 addMenu(params).then((res) => {
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
12 > 12 >
13 <div class="modelItem"> 13 <div class="modelItem">
14 <el-form 14 <el-form
15 - v-if="type != 'menuChange'"
16 class="fedexFormStyle" 15 class="fedexFormStyle"
17 ref="formData" 16 ref="formData"
18 :model="formData" 17 :model="formData"
...@@ -57,17 +56,25 @@ ...@@ -57,17 +56,25 @@
57 </el-col> 56 </el-col>
58 <el-col :span="8"> 57 <el-col :span="8">
59 <Formitem label="所属口岸" prop="portCode" type="edit"> 58 <Formitem label="所属口岸" prop="portCode" type="edit">
60 - <el-input 59 + <el-select
61 type="text" 60 type="text"
62 - class="inputShadow" 61 + id="inputInner--portCode"
63 - id="inputInner-edit-portCode"
64 - resize="none"
65 v-model="formData.portCode" 62 v-model="formData.portCode"
66 clearable 63 clearable
64 + filterable
67 placeholder="" 65 placeholder=""
68 - ></el-input> 66 + >
67 + <el-option
68 + v-for="item in portCodeList"
69 + :key="item"
70 + :label="item"
71 + :value="item"
72 + ></el-option>
73 + </el-select>
69 </Formitem> 74 </Formitem>
70 </el-col> 75 </el-col>
76 + </el-row>
77 + <el-row :gutter="5">
71 <el-col :span="8"> 78 <el-col :span="8">
72 <Formitem label="监管场所代码" prop="loctNo" type="edit"> 79 <Formitem label="监管场所代码" prop="loctNo" type="edit">
73 <el-input 80 <el-input
...@@ -113,20 +120,6 @@ ...@@ -113,20 +120,6 @@
113 </el-col> 120 </el-col>
114 </el-row> 121 </el-row>
115 </el-form> 122 </el-form>
116 - <el-tree
117 - ref="tree"
118 - class="menuTree"
119 - v-else
120 - :data="treeData"
121 - show-checkbox
122 - default-expand-all
123 - node-key="id"
124 - :default-expanded-keys="expandedKeys"
125 - :default-checked-keys="checkedKeys"
126 - :props="defaultProps"
127 - @check="treeCheckChange"
128 - >
129 - </el-tree>
130 </div> 123 </div>
131 <div class="dialogOption entrySave"> 124 <div class="dialogOption entrySave">
132 <el-button 125 <el-button
...@@ -147,12 +140,9 @@ ...@@ -147,12 +140,9 @@
147 140
148 <script> 141 <script>
149 import { 142 import {
150 - addRoleData, 143 + addOperatorPlace,
151 - updateRoleData, 144 + updateOperatorPlace,
152 - updateRoleMenuData, 145 +} from "@/api/supervisePlaceManage-api.js";
153 - getMenuByRoleId,
154 -} from "@/api/system/user.js";
155 -import { getRouters } from "@/api/menu";
156 export default { 146 export default {
157 props: { 147 props: {
158 outerVisible: { 148 outerVisible: {
...@@ -161,7 +151,7 @@ export default { ...@@ -161,7 +151,7 @@ export default {
161 }, 151 },
162 title: { 152 title: {
163 type: String, 153 type: String,
164 - default: "新增角色", 154 + default: "监管场所管理新增",
165 }, 155 },
166 type: { 156 type: {
167 type: String, 157 type: String,
...@@ -171,6 +161,12 @@ export default { ...@@ -171,6 +161,12 @@ export default {
171 type: Object, 161 type: Object,
172 default: null, 162 default: null,
173 }, 163 },
164 + portCodeList: {
165 + type: Array,
166 + default: () => {
167 + return [];
168 + },
169 + },
174 }, 170 },
175 watch: { 171 watch: {
176 outerVisible(val) { 172 outerVisible(val) {
...@@ -178,10 +174,6 @@ export default { ...@@ -178,10 +174,6 @@ export default {
178 this.loadings.dialogLoading = false; 174 this.loadings.dialogLoading = false;
179 if (this.type == "update") { 175 if (this.type == "update") {
180 this.formData = this.active; 176 this.formData = this.active;
181 - } else if (this.type == "menuChange") {
182 - this.formData = this.active;
183 - this.searchTreeData();
184 - this.loadCheckedKeys(); //加载已绑定的菜单
185 } 177 }
186 } 178 }
187 }, 179 },
...@@ -196,23 +188,23 @@ export default { ...@@ -196,23 +188,23 @@ export default {
196 operatorPersonInCharge: "", 188 operatorPersonInCharge: "",
197 contactNumber: "", 189 contactNumber: "",
198 }, 190 },
199 - treeData: [],
200 - treeCheckData: [],
201 - expandedKeys: [],
202 - checkedKeys: [],
203 rules: { 191 rules: {
204 - roleName: [ 192 + operatorCode: [
205 { 193 {
206 required: true, 194 required: true,
207 trigger: "blur", 195 trigger: "blur",
208 - message: "角色名称不能为空!", 196 + message: "监管场所代码不能为空!",
209 }, 197 },
210 ], 198 ],
199 + operatorName: [
200 + {
201 + required: true,
202 + trigger: "blur",
203 + message: "监管场所负责人不能为空!",
211 }, 204 },
212 - defaultProps: { 205 + ],
213 - children: "children",
214 - label: "label",
215 }, 206 },
207 +
216 searchForm: {}, 208 searchForm: {},
217 loadings: { 209 loadings: {
218 dialogLoading: false, 210 dialogLoading: false,
...@@ -223,69 +215,15 @@ export default { ...@@ -223,69 +215,15 @@ export default {
223 }; 215 };
224 }, 216 },
225 methods: { 217 methods: {
226 - //查询菜单数据
227 - searchTreeData() {
228 - this.loadings.dialogLoading = true;
229 - getRouters()
230 - .then((res) => {
231 - if (res.code === "200") {
232 - let arr = [];
233 - res.data.forEach((item) => {
234 - let status = true;
235 - if (item.parentMenuId == 0) {
236 - let obj = {
237 - id: item.menuId,
238 - label: item.menuName,
239 - children: [],
240 - };
241 - arr.forEach((menuItem) => {
242 - if (menuItem.id == item.menuId) {
243 - status = false;
244 - menuItem.label = item.menuName;
245 - }
246 - });
247 - if (status) {
248 - arr.push(obj);
249 - }
250 - } else {
251 - let obj = {
252 - id: item.menuId,
253 - label: item.menuName,
254 - };
255 - arr.forEach((menuItem) => {
256 - if (menuItem.id == item.parentMenuId) {
257 - status = false;
258 - menuItem.children.push(obj);
259 - }
260 - });
261 - if (status) {
262 - arr.push({
263 - id: item.parentMenuId,
264 - label: "",
265 - children: [obj],
266 - });
267 - }
268 - }
269 - });
270 - this.treeData = arr;
271 - } else {
272 - this.alertWarningMsg(res.message);
273 - }
274 - this.loadings.dialogLoading = false;
275 - })
276 - .catch((err) => {
277 - console.log(err);
278 - this.loadings.dialogLoading = false;
279 - });
280 - },
281 //数据保存 218 //数据保存
282 submit() { 219 submit() {
283 this.loadings.dialogLoading = true; 220 this.loadings.dialogLoading = true;
284 - let obj = {}; 221 + let obj = {
222 + ...this.formData,
223 + };
285 if (this.type == "add") { 224 if (this.type == "add") {
286 this.$refs.formData.validate((valid) => { 225 this.$refs.formData.validate((valid) => {
287 if (valid) { 226 if (valid) {
288 - obj.roleName = this.formData.roleName;
289 this.addapi(obj); 227 this.addapi(obj);
290 } else { 228 } else {
291 this.loadings.dialogLoading = false; 229 this.loadings.dialogLoading = false;
...@@ -294,22 +232,17 @@ export default { ...@@ -294,22 +232,17 @@ export default {
294 } else if (this.type == "update") { 232 } else if (this.type == "update") {
295 this.$refs.formData.validate((valid) => { 233 this.$refs.formData.validate((valid) => {
296 if (valid) { 234 if (valid) {
297 - obj.roleId = this.formData.roleId; 235 + obj.id = this.active.id;
298 - obj.roleName = this.formData.roleName;
299 this.updateapi(obj); 236 this.updateapi(obj);
300 } else { 237 } else {
301 this.loadings.dialogLoading = false; 238 this.loadings.dialogLoading = false;
302 } 239 }
303 }); 240 });
304 - } else if (this.type == "menuChange") {
305 - obj.menuId = this.treeCheckData; // 使用合并后的选中节点
306 - obj.roleId = this.formData.roleId;
307 - this.menuChangeapi(obj);
308 } 241 }
309 }, 242 },
310 //新增 243 //新增
311 addapi(val) { 244 addapi(val) {
312 - addRoleData(val) 245 + addOperatorPlace(val)
313 .then((res) => { 246 .then((res) => {
314 if (res.code === "200") { 247 if (res.code === "200") {
315 this.msgSuccess(res.message); 248 this.msgSuccess(res.message);
...@@ -326,7 +259,7 @@ export default { ...@@ -326,7 +259,7 @@ export default {
326 }, 259 },
327 //修改 260 //修改
328 updateapi(val) { 261 updateapi(val) {
329 - updateRoleData(val) 262 + updateOperatorPlace(val)
330 .then((res) => { 263 .then((res) => {
331 if (res.code === "200") { 264 if (res.code === "200") {
332 this.msgSuccess(res.message); 265 this.msgSuccess(res.message);
...@@ -343,7 +276,7 @@ export default { ...@@ -343,7 +276,7 @@ export default {
343 }, 276 },
344 //菜单权限修改 277 //菜单权限修改
345 menuChangeapi(val) { 278 menuChangeapi(val) {
346 - updateRoleMenuData(val) 279 + updateOperatorPlace(val)
347 .then((res) => { 280 .then((res) => {
348 if (res.code === "200") { 281 if (res.code === "200") {
349 this.msgSuccess(res.message); 282 this.msgSuccess(res.message);
...@@ -359,49 +292,18 @@ export default { ...@@ -359,49 +292,18 @@ export default {
359 this.loadings.dialogLoading = false; 292 this.loadings.dialogLoading = false;
360 }); 293 });
361 }, 294 },
362 - treeCheckChange(data, checked) { 295 +
363 - console.log(data, checked);
364 - let arr = [];
365 - arr = checked.checkedKeys.concat(checked.halfCheckedKeys);
366 - this.treeCheckData = arr;
367 - },
368 close() { 296 close() {
369 this.formData = { 297 this.formData = {
370 - roleName: "", 298 + operatorCode: "",
299 + operatorName: "",
300 + portCode: "",
301 + loctNo: "",
302 + operatorPersonInCharge: "",
303 + contactNumber: "",
371 }; 304 };
372 - this.checkedKeys = [];
373 this.$emit("close"); 305 this.$emit("close");
374 }, 306 },
375 - // 加载已绑定的菜单
376 - loadCheckedKeys() {
377 - if (this.formData.roleId) {
378 - getMenuByRoleId(this.formData.roleId)
379 - .then((res) => {
380 - if (res.code === "200") {
381 - this.checkedKeys = res.data
382 - .filter((item) => item.isBinding && item.parentMenuId != 0)
383 - .map((item) => item.menuId);
384 - //console.log('初始 checkedKeys:', this.checkedKeys);
385 - this.$nextTick(() => {
386 - this.$refs.tree.setCheckedKeys(this.checkedKeys);
387 - this.updateTreeCheckData();
388 - });
389 - } else {
390 - this.alertWarningMsg(res.message);
391 - }
392 - })
393 - .catch((err) => {
394 - console.log(err);
395 - });
396 - }
397 - },
398 - //加载选中的节点及半选中的父节点
399 - updateTreeCheckData() {
400 - const checkedKeys = this.$refs.tree.getCheckedKeys();
401 - const halfCheckedKeys = this.$refs.tree.getHalfCheckedKeys();
402 - this.treeCheckData = checkedKeys.concat(halfCheckedKeys);
403 - //console.log('合并后的 treeCheckData:', this.treeCheckData);
404 - },
405 }, 307 },
406 }; 308 };
407 </script> 309 </script>
......
...@@ -37,15 +37,21 @@ ...@@ -37,15 +37,21 @@
37 </el-col> 37 </el-col>
38 <el-col :span="5"> 38 <el-col :span="5">
39 <Formitem label="所属口岸" prop="portCode"> 39 <Formitem label="所属口岸" prop="portCode">
40 - <el-input 40 + <el-select
41 type="text" 41 type="text"
42 - class="inputShadow"
43 id="inputInner--portCode" 42 id="inputInner--portCode"
44 - resize="none"
45 v-model="sreachFormData.portCode" 43 v-model="sreachFormData.portCode"
46 clearable 44 clearable
45 + filterable
47 placeholder="" 46 placeholder=""
48 - ></el-input> 47 + >
48 + <el-option
49 + v-for="item in portCodeList"
50 + :key="item"
51 + :label="item"
52 + :value="item"
53 + ></el-option>
54 + </el-select>
49 </Formitem> 55 </Formitem>
50 </el-col> 56 </el-col>
51 <el-col :span="2"> 57 <el-col :span="2">
...@@ -106,12 +112,7 @@ ...@@ -106,12 +112,7 @@
106 <template slot="optionColumn"> 112 <template slot="optionColumn">
107 <el-table-column align="left" label="操作"> 113 <el-table-column align="left" label="操作">
108 <template slot-scope="scope"> 114 <template slot-scope="scope">
109 - <el-button type="text" @click="update(scope.row)"> 115 + <el-button type="text" @click="update(scope.row)"> 修改 </el-button>
110 - 角色修改
111 - </el-button>
112 - <el-button type="text" @click="muenChange(scope.row)">
113 - 权限绑定
114 - </el-button>
115 </template> 116 </template>
116 </el-table-column> 117 </el-table-column>
117 </template> 118 </template>
...@@ -122,12 +123,16 @@ ...@@ -122,12 +123,16 @@
122 :type="editType" 123 :type="editType"
123 :active="activeData" 124 :active="activeData"
124 @close="dialogClose" 125 @close="dialogClose"
126 + :portCodeList="portCodeList"
125 /> 127 />
126 </div> 128 </div>
127 </template> 129 </template>
128 130
129 <script> 131 <script>
130 -import { getOperatorPlaceList } from "@/api/supervisePlaceManage-api.js"; 132 +import {
133 + getOperatorPlaceList,
134 + getPortCodeList,
135 +} from "@/api/supervisePlaceManage-api.js";
131 import DialogVue from "./dialog.vue"; 136 import DialogVue from "./dialog.vue";
132 export default { 137 export default {
133 name: "SupervisePlaceManage", 138 name: "SupervisePlaceManage",
...@@ -193,6 +198,7 @@ export default { ...@@ -193,6 +198,7 @@ export default {
193 outerVisible: false, 198 outerVisible: false,
194 dialogTitle: "", 199 dialogTitle: "",
195 editType: "", 200 editType: "",
201 + portCodeList: [],
196 }; 202 };
197 }, 203 },
198 created() { 204 created() {
...@@ -200,8 +206,22 @@ export default { ...@@ -200,8 +206,22 @@ export default {
200 }, 206 },
201 mounted() { 207 mounted() {
202 this.tableMaxheight = window.innerHeight - 300; 208 this.tableMaxheight = window.innerHeight - 300;
209 + this.fetchPortCodeList();
203 }, 210 },
204 methods: { 211 methods: {
212 + // 获取所属口岸
213 + fetchPortCodeList() {
214 + getPortCodeList()
215 + .then((res) => {
216 + if (res.code === "200") {
217 + this.portCodeList = res.data;
218 + } else {
219 + }
220 + })
221 + .catch((err) => {
222 + console.log(err);
223 + });
224 + },
205 clear() { 225 clear() {
206 this.$refs.sreachForm.resetFields(); 226 this.$refs.sreachForm.resetFields();
207 }, 227 },
...@@ -233,22 +253,17 @@ export default { ...@@ -233,22 +253,17 @@ export default {
233 }); 253 });
234 }, 254 },
235 addRole() { 255 addRole() {
236 - this.dialogTitle = "新增角色"; 256 + this.dialogTitle = "监管场所管理新增";
237 this.editType = "add"; 257 this.editType = "add";
238 this.outerVisible = true; 258 this.outerVisible = true;
239 }, 259 },
240 update(val) { 260 update(val) {
241 - this.dialogTitle = "修改角色"; 261 + this.dialogTitle = "监管场所管理修改";
242 this.editType = "update"; 262 this.editType = "update";
243 this.outerVisible = true; 263 this.outerVisible = true;
244 - this.activeData = val; 264 + this.activeData = JSON.parse(JSON.stringify(val));
245 - },
246 - muenChange(val) {
247 - this.dialogTitle = "绑定权限";
248 - this.editType = "menuChange";
249 - this.outerVisible = true;
250 - this.activeData = val;
251 }, 265 },
266 +
252 dialogClose() { 267 dialogClose() {
253 this.outerVisible = false; 268 this.outerVisible = false;
254 this.activeData = null; 269 this.activeData = null;
......