Browse Source

fix:修改发布新版本

confidence
杜贤金 3 years ago
parent
commit
0cdf36dd55
  1. 15
      src/api/communication/basiccard.js
  2. 8
      src/api/communication/outbound.js
  3. 26
      src/api/ordermanage/mallorders.js
  4. 2
      src/config/website.js
  5. 72
      src/option/system/dict.js
  6. 24
      src/router/axios.js
  7. 50
      src/views/communicationmanage/basiccard/basiccard.vue
  8. 20
      src/views/communicationmanage/device/device.vue
  9. 132
      src/views/communicationmanage/outbound/outbound.vue
  10. 2
      src/views/mallmanagement/bank/index.vue
  11. 1
      src/views/mallmanagement/classify/index.vue
  12. 72
      src/views/mallmanagement/shopmanagement/index.vue
  13. 461
      src/views/ordermanage/mallorders/index.vue
  14. 2
      src/views/ordermanage/payondelivery/index.vue
  15. 2
      src/views/original/targetpackagegroupmanage/index.vue
  16. 33
      src/views/package/basicpackage/index.vue
  17. 49
      src/views/package/packagegroup/index.vue
  18. 48
      src/views/package/targetpackagegroupmanage/index.vue
  19. 22
      src/views/package/targetpackagemanage/index.vue
  20. 180
      src/views/system/menu.vue
  21. 4
      src/views/wel/component/Administrator.vue

15
src/api/communication/basiccard.js

@ -101,21 +101,30 @@ export const flowpoolfillData = () => {
} }
//基础套餐 //基础套餐
export const dataplan = () => { export const dataplan = (dataPlanGroupId) => {
return request({ return request({
url: '/api/iot-sim/dataplan/fillData?isSource=' + 2, url: '/api/iot-sim/dataplan/fillData?isSource=' + 2 + "&dataPlanGroupId=" + dataPlanGroupId,
method: 'get',
})
}
//基础套餐组
export const dataplangroup = () => {
return request({
url: '/api/iot-sim/dataplangroup/fillData?isSource=' + 2,
method: 'get', method: 'get',
}) })
} }
export const deliver = (tenantId,dataPlanId,id) => { export const deliver = (tenantId, dataPlanId, dataPlanGroupId, id) => {
return request({ return request({
url: '/api/iot-sim/simcard/deliver', url: '/api/iot-sim/simcard/deliver',
method: 'post', method: 'post',
params: { params: {
tenantId, tenantId,
dataPlanId, dataPlanId,
dataPlanGroupId,
id id
} }
}) })

8
src/api/communication/outbound.js

@ -100,3 +100,11 @@ export const updateThreshold = (row) => {
} }
}) })
} }
//基础套餐
export const dataplan = (dataPlanGroupId) => {
return request({
url: '/api/iot-sim/dataplan/fillData?isSource=' + 2 + "&dataPlanGroupId=" + dataPlanGroupId,
method: 'get',
})
}

26
src/api/ordermanage/mallorders.js

@ -36,7 +36,9 @@ export const add = (row) => {
return request({ return request({
url: '/api/iot-sim/orders/save', url: '/api/iot-sim/orders/save',
method: 'post', method: 'post',
data: row data: {
...row
}
}) })
} }
//修改 //修改
@ -79,7 +81,7 @@ export const deviceDeliver = (query) => {
}) })
} }
//接口类型 //接口类型
export const interfaceType = (current, size) => { export const interfaceType = () => {
return request({ return request({
url: '/api/iot-system/dict/dictionary?code=interface_type', url: '/api/iot-system/dict/dictionary?code=interface_type',
method: 'get', method: 'get',
@ -104,3 +106,23 @@ export const getParcel = (id) => {
} }
}) })
} }
//商品下拉
export const productfillData = (id) => {
return request({
url: '/api/iot-sim/product/fillData',
method: 'get',
params: {
id
}
})
}
//规格下拉
export const productspecsfillData = (productId) => {
return request({
url: '/api/iot-sim/productspecs/fillData',
method: 'get',
params: {
productId
}
})
}

2
src/config/website.js

@ -4,7 +4,7 @@
export default { export default {
title: "saber", title: "saber",
logo: "S", logo: "S",
key: 'saber',//配置主键,目前用于存储 key: 'saber', //配置主键,目前用于存储
indexTitle: '物联网平台', indexTitle: '物联网平台',
clientId: 'falcon', // 客户端id clientId: 'falcon', // 客户端id
clientSecret: 'falcon_secret', // 客户端密钥 clientSecret: 'falcon_secret', // 客户端密钥

72
src/option/system/dict.js

@ -11,33 +11,28 @@ export const optionParent = {
menuWidth: 250, menuWidth: 250,
dialogWidth: 880, dialogWidth: 880,
dialogClickModal: false, dialogClickModal: false,
column: [ column: [{
{
label: "字典编号", label: "字典编号",
prop: "code", prop: "code",
search: true, search: true,
slot: true, slot: true,
span: 24, span: 24,
rules: [ rules: [{
{
required: true, required: true,
message: "请输入字典编号", message: "请输入字典编号",
trigger: "blur" trigger: "blur"
} }]
]
}, },
{ {
label: "字典名称", label: "字典名称",
prop: "dictValue", prop: "dictValue",
search: true, search: true,
align: "center", align: "center",
rules: [ rules: [{
{
required: true, required: true,
message: "请输入字典名称", message: "请输入字典名称",
trigger: "blur" trigger: "blur"
} }]
]
}, },
{ {
label: "字典排序", label: "字典排序",
@ -45,13 +40,11 @@ export const optionParent = {
type: "number", type: "number",
align: "right", align: "right",
width: 100, width: 100,
rules: [ rules: [{
{
required: true, required: true,
message: "请输入字典排序", message: "请输入字典排序",
trigger: "blur" trigger: "blur"
} }]
]
}, },
{ {
label: "封存", label: "封存",
@ -59,8 +52,7 @@ export const optionParent = {
type: "switch", type: "switch",
align: "center", align: "center",
width: 100, width: 100,
dicData: [ dicData: [{
{
label: "否", label: "否",
value: 0 value: 0
}, },
@ -71,13 +63,11 @@ export const optionParent = {
], ],
value: 0, value: 0,
slot: true, slot: true,
rules: [ rules: [{
{
required: true, required: true,
message: "请选择封存", message: "请选择封存",
trigger: "blur" trigger: "blur"
} }]
]
}, },
{ {
label: "字典备注", label: "字典备注",
@ -101,34 +91,29 @@ export const optionChild = {
menuWidth: 300, menuWidth: 300,
dialogWidth: 880, dialogWidth: 880,
dialogClickModal: false, dialogClickModal: false,
column: [ column: [{
{
label: "字典编号", label: "字典编号",
prop: "code", prop: "code",
addDisabled: true, addDisabled: true,
editDisabled: true, editDisabled: true,
search: true, search: true,
span: 24, span: 24,
rules: [ rules: [{
{
required: true, required: true,
message: "请输入字典编号", message: "请输入字典编号",
trigger: "blur" trigger: "blur"
} }]
]
}, },
{ {
label: "字典名称", label: "字典名称",
prop: "dictValue", prop: "dictValue",
search: true, search: true,
align: "center", align: "center",
rules: [ rules: [{
{
required: true, required: true,
message: "请输入字典名称", message: "请输入字典名称",
trigger: "blur" trigger: "blur"
} }]
]
}, },
{ {
label: "上级字典", label: "上级字典",
@ -141,25 +126,21 @@ export const optionChild = {
}, },
addDisabled: true, addDisabled: true,
editDisabled: true, editDisabled: true,
rules: [ rules: [{
{
required: false, required: false,
message: "请选择上级字典", message: "请选择上级字典",
trigger: "click" trigger: "click"
} }]
]
}, },
{ {
label: "字典键值", label: "字典键值",
prop: "dictKey", prop: "dictKey",
width: 80, width: 80,
rules: [ rules: [{
{
required: true, required: true,
message: "请输入字典键值", message: "请输入字典键值",
trigger: "blur" trigger: "blur"
} }]
]
}, },
{ {
label: "字典排序", label: "字典排序",
@ -167,13 +148,11 @@ export const optionChild = {
type: "number", type: "number",
align: "right", align: "right",
hide: true, hide: true,
rules: [ rules: [{
{
required: true, required: true,
message: "请输入字典排序", message: "请输入字典排序",
trigger: "blur" trigger: "blur"
} }]
]
}, },
{ {
label: "封存", label: "封存",
@ -181,8 +160,7 @@ export const optionChild = {
type: "switch", type: "switch",
align: "center", align: "center",
width: 80, width: 80,
dicData: [ dicData: [{
{
label: "否", label: "否",
value: 0 value: 0
}, },
@ -193,13 +171,11 @@ export const optionChild = {
], ],
value: 0, value: 0,
slot: true, slot: true,
rules: [ rules: [{
{
required: true, required: true,
message: "请选择封存", message: "请选择封存",
trigger: "blur" trigger: "blur"
} }]
]
}, },
{ {
label: "字典备注", label: "字典备注",

24
src/router/axios.js

@ -8,14 +8,24 @@
import axios from 'axios'; import axios from 'axios';
import store from '@/store/'; import store from '@/store/';
import router from '@/router/router'; import router from '@/router/router';
import {serialize} from '@/util/util'; import {
import {getToken} from '@/util/auth'; serialize
import {Message} from 'element-ui'; } from '@/util/util';
import {
getToken
} from '@/util/auth';
import {
Message
} from 'element-ui';
import website from '@/config/website'; import website from '@/config/website';
import {Base64} from 'js-base64'; import {
Base64
} from 'js-base64';
import NProgress from 'nprogress'; import NProgress from 'nprogress';
import 'nprogress/nprogress.css'; import 'nprogress/nprogress.css';
import {baseUrl} from '@/config/env'; import {
baseUrl
} from '@/config/env';
//默认超时时间 //默认超时时间
axios.defaults.timeout = 300000; axios.defaults.timeout = 300000;
@ -67,7 +77,9 @@ axios.interceptors.response.use(res => {
//如果在白名单里则自行catch逻辑处理 //如果在白名单里则自行catch逻辑处理
if (statusWhiteList.includes(status)) return Promise.reject(res); if (statusWhiteList.includes(status)) return Promise.reject(res);
//如果是401则跳转到登录页面 //如果是401则跳转到登录页面
if (status === 401) store.dispatch('FedLogOut').then(() => router.push({path: '/login'})); if (status === 401) store.dispatch('FedLogOut').then(() => router.push({
path: '/login'
}));
// 如果请求为非200否者默认统一处理 // 如果请求为非200否者默认统一处理
if (status !== 200) { if (status !== 200) {
Message({ Message({

50
src/views/communicationmanage/basiccard/basiccard.vue

@ -131,6 +131,26 @@
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item
label="基础套餐组"
prop="dataPlanGroupId"
v-if="distitle == '分拨' || distitle == '出库'"
>
<el-select
v-model="distribution.dataPlanGroupId"
placeholder="请选择基础套餐"
size="mini"
style="width: 90%"
@change="handledataPlanGroup"
>
<el-option
v-for="(item, index) in basicpackgegroup"
:label="item.name"
:value="item.id"
:key="item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item <el-form-item
label="基础套餐" label="基础套餐"
prop="dataPlanId" prop="dataPlanId"
@ -150,6 +170,7 @@
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
label="开始/结束号码" label="开始/结束号码"
prop="numbers" prop="numbers"
@ -203,6 +224,7 @@ import {
dataplan, dataplan,
simCallback, simCallback,
deliver, deliver,
dataplangroup,
} from "@/api/communication/basiccard"; } from "@/api/communication/basiccard";
import { mapGetters } from "vuex"; import { mapGetters } from "vuex";
import { getToken } from "@/util/auth"; import { getToken } from "@/util/auth";
@ -358,6 +380,7 @@ export default {
numStart: "", // numStart: "", //
numEnd: "", // numEnd: "", //
dataPlanId: "", dataPlanId: "",
dataPlanGroupId: "", //
}, // }, //
redistribution: { redistribution: {
numStart: null, // numStart: null, //
@ -365,6 +388,7 @@ export default {
}, // }, //
distributionlist: [], // distributionlist: [], //
basicpackge: [], // basicpackge: [], //
basicpackgegroup: [],
tenantlist: [], // tenantlist: [], //
distrules: { distrules: {
tenantId: [ tenantId: [
@ -377,6 +401,9 @@ export default {
dataPlanId: [ dataPlanId: [
{ required: true, message: "请选择基础套餐", trigger: "change" }, { required: true, message: "请选择基础套餐", trigger: "change" },
], ],
dataPlanGroupId: [
{ required: true, message: "请选择基础套餐组", trigger: "change" },
],
}, },
channellist: [], // channellist: [], //
ruleForm: {}, // ruleForm: {}, //
@ -652,7 +679,8 @@ export default {
created() { created() {
this.allocatelist(); // this.allocatelist(); //
this.tenantlists(); // this.tenantlists(); //
this.basicpackges(); //
this.basicpackgesgroup(); //
}, },
watch: { watch: {
"excelForm.tenantId"() { "excelForm.tenantId"() {
@ -866,14 +894,29 @@ export default {
} }
}); });
}, },
//
basicpackgesgroup() {
dataplangroup().then((res) => {
if (res.data.code == 200) {
this.basicpackgegroup = res.data.data;
}
});
},
//-
handledataPlanGroup(e) {
this.distribution.dataPlanId = "";
this.basicpackges(e);
},
// //
basicpackges() { basicpackges(id) {
dataplan().then((res) => { dataplan(id).then((res) => {
if (res.data.code == 200) { if (res.data.code == 200) {
this.basicpackge = res.data.data; this.basicpackge = res.data.data;
} }
}); });
}, },
// //
tenantlists() { tenantlists() {
tenant().then((res) => { tenant().then((res) => {
@ -951,6 +994,7 @@ export default {
deliver( deliver(
this.distribution.tenantId, this.distribution.tenantId,
this.distribution.dataPlanId, this.distribution.dataPlanId,
this.distribution.dataPlanGroupId,
this.deliverId this.deliverId
).then((res) => { ).then((res) => {
if (res.data.data == 1) { if (res.data.data == 1) {

20
src/views/communicationmanage/device/device.vue

@ -149,7 +149,25 @@ export default {
width: 140, width: 140,
search: true, search: true,
rules: [ rules: [
{ required: true, message: "请选择租户名称", trigger: "change" }, { required: false, message: "请选择租户名称", trigger: "change" },
],
},
{
label: "用户名称",
prop: "userId",
type: "select",
dicUrl: "/api/iot-system/user/fillData",
props: {
label: "account",
value: "id",
},
dataType: "String",
span: 12,
labelWidth: 130,
width: 140,
search: true,
rules: [
{ required: false, message: "请选择租户名称", trigger: "change" },
], ],
}, },
{ {

132
src/views/communicationmanage/outbound/outbound.vue

@ -20,6 +20,22 @@
@refresh-change="refreshChange" @refresh-change="refreshChange"
@on-load="onLoad" @on-load="onLoad"
> >
<template slot-scope="{ type, size, row }" slot="dataPlanIdForm">
<el-select
v-model="form.dataPlanId"
placeholder="请选择"
:size="size"
:type="type"
>
<el-option
v-for="item in dataPlanGroup"
:key="item.id"
:label="item.name"
:value="item.id"
>
</el-option>
</el-select>
</template>
<template slot="menuLeft"> <template slot="menuLeft">
<el-button <el-button
size="small" size="small"
@ -229,6 +245,7 @@ import {
syncRealNameStatus, syncRealNameStatus,
updateSimStatus, updateSimStatus,
updateThreshold, updateThreshold,
dataplan,
} from "@/api/communication/outbound"; } from "@/api/communication/outbound";
import { syncUsage } from "@/api/informationmanage/sim.js"; import { syncUsage } from "@/api/informationmanage/sim.js";
import { mapGetters } from "vuex"; import { mapGetters } from "vuex";
@ -299,6 +316,7 @@ export default {
{ required: true, message: "请选择导出类型", trigger: "change" }, { required: true, message: "请选择导出类型", trigger: "change" },
], ],
}, },
dataPlanGroup: [],
page: { page: {
pageSize: 10, pageSize: 10,
currentPage: 1, currentPage: 1,
@ -338,6 +356,40 @@ export default {
}, },
], ],
}, },
{
label: "msisdn",
prop: "msisdn",
span: 12,
width: 150,
labelWidth: 130,
addDisplay: false,
search: true,
editDisplay: false,
rules: [
{
required: true,
message: "请输入msisdn",
trigger: "blur",
},
],
},
{
label: "iccid",
prop: "iccid",
width: 150,
span: 12,
labelWidth: 130,
search: true,
editDisplay: false,
rules: [
{
required: true,
message: "请输入iccid",
trigger: "blur",
},
],
},
{ {
label: "租户名称", label: "租户名称",
prop: "tenantId", prop: "tenantId",
@ -430,6 +482,29 @@ export default {
}, },
], ],
}, },
{
label: "基础套餐组",
prop: "dataPlanGroupId",
type: "select",
dicUrl: "/api/iot-sim/dataplangroup/fillData?isSource=" + 2,
props: {
label: "name",
value: "id",
},
dataType: "String",
span: 12,
labelWidth: 130,
searchLabelWidth: 110,
width: 110,
search: false,
rules: [
{
required: true,
message: "请选择基础套餐组",
trigger: "change",
},
],
},
{ {
label: "基础套餐", label: "基础套餐",
prop: "dataPlanId", prop: "dataPlanId",
@ -440,6 +515,7 @@ export default {
value: "id", value: "id",
}, },
dataType: "String", dataType: "String",
formslot: true,
span: 12, span: 12,
labelWidth: 130, labelWidth: 130,
searchLabelWidth: 110, searchLabelWidth: 110,
@ -602,29 +678,17 @@ export default {
}, },
], ],
}, },
{
label: "iccid",
prop: "iccid",
width: 150,
span: 12,
labelWidth: 130,
search: true,
rules: [
{
required: true,
message: "请输入iccid",
trigger: "blur",
},
],
},
{ {
label: "imsi", label: "imsi",
prop: "imsi", prop: "imsi",
span: 12, span: 12,
width: 150, width: 150,
labelWidth: 130, labelWidth: 130,
search: true, search: false,
addDisplay: false, addDisplay: false,
editDisplay: false,
hide: true,
rules: [ rules: [
{ {
required: true, required: true,
@ -633,22 +697,7 @@ export default {
}, },
], ],
}, },
{
label: "msisdn",
prop: "msisdn",
span: 12,
width: 150,
labelWidth: 130,
addDisplay: false,
search: true,
rules: [
{
required: true,
message: "请输入msisdn",
trigger: "blur",
},
],
},
{ {
label: "剩余流量(M)", label: "剩余流量(M)",
prop: "surplusM", prop: "surplusM",
@ -730,6 +779,17 @@ export default {
} }
} }
}, },
"form.dataPlanGroupId"() {
if (this.form.dataPlanGroupId) {
dataplan(this.form.dataPlanGroupId).then((res) => {
if (res.data.code == 200) {
this.dataPlanGroup = res.data.data;
}
});
} else {
this.dataPlanGroup = [];
}
},
}, },
created() { created() {
this.tenantlists(); // this.tenantlists(); //
@ -737,14 +797,6 @@ export default {
this.exportTypelistlists(); // this.exportTypelistlists(); //
}, },
computed: { computed: {
...mapGetters(["permission"]),
permissionList() {
return {
// viewBtn: this.vaildData(this.permission.sourceApi_view, false),
// editBtn: this.vaildData(this.permission.sourceApi_edit, false),
// delBtn: this.vaildData(this.permission.sourceApi_delete, false),
};
},
ids() { ids() {
let ids = []; let ids = [];
this.selectionList.forEach((ele) => { this.selectionList.forEach((ele) => {

2
src/views/mallmanagement/bank/index.vue

@ -44,7 +44,7 @@ export default {
index: true, index: true,
viewBtn: true, viewBtn: true,
columnBtn: true, columnBtn: true,
addBtn: true, addBtn: false,
editBtn: false, editBtn: false,
delBtn: false, delBtn: false,
dialogClickModal: false, dialogClickModal: false,

1
src/views/mallmanagement/classify/index.vue

@ -22,7 +22,6 @@
</avue-crud> </avue-crud>
</basic-container> </basic-container>
</template> </template>
<script> <script>
import { import {
add, add,

72
src/views/mallmanagement/shopmanagement/index.vue

@ -20,6 +20,22 @@
@refresh-change="refreshChange" @refresh-change="refreshChange"
@on-load="onLoad" @on-load="onLoad"
> >
<template slot-scope="{ type, size, row }" slot="dataPlanIdForm">
<el-select
v-model="form.dataPlanId"
placeholder="请选择"
:size="size"
:type="type"
>
<el-option
v-for="item in dataPlanGroup"
:key="item.id"
:label="item.name"
:value="item.id"
>
</el-option>
</el-select>
</template>
</avue-crud> </avue-crud>
</basic-container> </basic-container>
</template> </template>
@ -32,6 +48,7 @@ import {
remove, remove,
update, update,
} from "@/api/mallmanagement/shopmanagement"; } from "@/api/mallmanagement/shopmanagement";
import { dataplan } from "@/api/communication/outbound";
import { substr } from "@/util/util"; import { substr } from "@/util/util";
export default { export default {
data() { data() {
@ -44,6 +61,7 @@ export default {
currentPage: 1, currentPage: 1,
total: 0, total: 0,
}, },
dataPlanGroup: [],
option: { option: {
tip: false, tip: false,
searchShow: true, searchShow: true,
@ -102,16 +120,22 @@ export default {
}, },
dataType: "number", dataType: "number",
control: (val, form) => { control: (val, form) => {
if (val == "2") { if (val == "3") {
return { return {
dataPlanId: { dataPlanId: {
display: false, display: true,
},
dataPlanGroupId: {
display: true,
}, },
}; };
} else { } else {
return { return {
dataPlanId: { dataPlanId: {
display: true, display: false,
},
dataPlanGroupId: {
display: false,
}, },
}; };
} }
@ -124,6 +148,29 @@ export default {
}, },
], ],
}, },
{
label: "基础套餐组名称",
prop: "dataPlanGroupId",
span: 12,
type: "select",
searchLabelWidth: 120,
search: false,
hide: true,
labelWidth: 130,
dicUrl: "/api/iot-sim/dataplangroup/fillData?isSource=" + 2,
props: {
label: "name",
value: "id",
},
dataType: "String",
rules: [
{
required: true,
message: "请选择套餐组名称",
trigger: "change",
},
],
},
{ {
label: "基础套餐", label: "基础套餐",
prop: "dataPlanId", prop: "dataPlanId",
@ -139,9 +186,10 @@ export default {
searchLabelWidth: 110, searchLabelWidth: 110,
width: 110, width: 110,
search: true, search: true,
hide: true,
rules: [ rules: [
{ {
required: false, required: true,
message: "请选择基础套餐", message: "请选择基础套餐",
trigger: "change", trigger: "change",
}, },
@ -332,8 +380,20 @@ export default {
}, },
watch: { watch: {
"form.type"() { "form.type"() {
if (this.form.type == 2) { if (this.form.type != 3) {
this.form.dataPlanId = ""; this.form.dataPlanGroupId = undefined;
this.form.dataPlanId = undefined;
}
},
"form.dataPlanGroupId"() {
if (this.form.dataPlanGroupId) {
dataplan(this.form.dataPlanGroupId).then((res) => {
if (res.data.code == 200) {
this.dataPlanGroup = res.data.data;
}
});
} else {
this.dataPlanGroup = [];
} }
}, },
}, },

461
src/views/ordermanage/mallorders/index.vue

@ -19,7 +19,94 @@
@refresh-change="refreshChange" @refresh-change="refreshChange"
@on-load="onLoad" @on-load="onLoad"
> >
<template slot-scope="scope" slot="productIdForm">
<el-form :model="dynamicValidateForm" ref="dynamicValidateForm">
<el-form-item
style="margin: 0 0 15px 0"
v-for="(domain, index) in dynamicValidateForm.domains"
:key="index"
:prop="'domains.' + index + '.productId'"
:rules="{
required: true,
message: '请选择商品',
trigger: 'change',
}"
>
<el-select
v-model="domain.productId"
placeholder="请选择"
@change="handleProduct"
size="small"
>
<el-option
v-for="item in productIdArr"
:key="item.id"
:label="item.name"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
</el-form>
</template>
<template slot-scope="scope" slot="productSpecsIdForm">
<el-form :model="dynamicValidateForm" ref="dynamicValidateForm">
<el-form-item
style="margin: 0 0 15px 0"
v-for="(domain, index) in dynamicValidateForm.domains"
:key="index"
>
<el-select
v-model="domain.productSpecsId"
placeholder="请选择"
size="small"
>
<el-option
v-for="item in productSpecsIdArr"
:key="item.id"
:label="item.name"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
</el-form>
</template>
<template slot-scope="scope" slot="itemnumForm">
<el-form
v-for="(domain, index) in dynamicValidateForm.domains"
:key="index"
style="display: flex"
>
<el-form-item
style="margin: 0 0 15px 0"
:rules="{
required: true,
message: '商品数量不能为空',
trigger: 'blur',
}"
>
<el-input
v-model="domain.itemnum"
placeholder="数量"
size="small"
type="number"
min="1"
></el-input>
</el-form-item>
<div v-if="index > 0">
<el-button @click.prevent="removeDomain(domain)">删除</el-button>
</div>
<div v-else>
<el-button @click.prevent="addDomain(domain)">新增</el-button>
</div>
</el-form>
</template>
<template slot-scope="scope" slot="menu"> <template slot-scope="scope" slot="menu">
<el-button @click="handleView(scope.row)" type="text" size="mini"
><span class="el-icon-view"></span> &nbsp;查看</el-button
>
<el-button <el-button
@click="handleShiporder(scope.row)" @click="handleShiporder(scope.row)"
type="text" type="text"
@ -36,6 +123,7 @@
> >
</template> </template>
</avue-crud> </avue-crud>
<!-- 发货单 -->
<el-dialog <el-dialog
title="发货单" title="发货单"
v-dialogDrag v-dialogDrag
@ -241,7 +329,7 @@
v-for="(item, index) in basicpackge" v-for="(item, index) in basicpackge"
:label="item.name" :label="item.name"
:value="item.id" :value="item.id"
:key="item.id" :key="index"
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -259,6 +347,7 @@
</el-button> </el-button>
</div> </div>
</el-dialog> </el-dialog>
<!-- 物流信息 -->
<el-dialog <el-dialog
title="物流信息" title="物流信息"
v-dialogDrag v-dialogDrag
@ -279,6 +368,111 @@
</el-timeline-item> </el-timeline-item>
</el-timeline> </el-timeline>
</el-dialog> </el-dialog>
<!-- 查看 -->
<el-dialog
title="查看"
v-dialogDrag
:visible.sync="viewVisiable"
class="avue-dialog avue-dialog--top"
append-to-body
:close-on-click-modal="false"
:before-close="handleViewClose"
>
<el-form ref="form" :model="form" label-width="120px">
<el-row :gutter="24">
<el-card class="box-card" shadow="never">
<div slot="header" class="clearfix">
<span>订单信息</span>
</div>
<el-col :span="12">
<el-form-item label="订单编号:">
<span>{{ form.id }}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="下单用户:">
<span>{{ form.shippingName }}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="是否需要发货:">
<span v-if="form.isDelivery == 1">不需要</span>
<span v-if="form.isDelivery == 2">需要发货</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="订单状态:">
<span v-if="form.orderStatus == 0">已取消</span>
<span v-if="form.orderStatus == 2">待付款</span>
<span v-if="form.orderStatus == 3">待发货</span>
<span v-if="form.orderStatus == 4">待收货</span>
<span v-if="form.orderStatus == 5">已完成</span>
<span v-if="form.orderStatus == 6">退款售后</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="订单金额:">
<span>{{ form.price }}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="支付方式:">
<span v-if="form.payment == 1">微信</span>
<span v-if="form.payment == 2">支付宝</span>
<span v-if="form.payment == 3">现金</span>
<span v-if="form.payment == 4">货到付款</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="收货人手机号:">
<span>{{ form.consigneePhone }}</span>
</el-form-item>
</el-col>
</el-card>
</el-row>
<el-row :gutter="24">
<el-card
class="box-card"
shadow="never"
v-for="(item, index) in form.ordersDetailsList"
:key="index"
>
<div slot="header" class="clearfix" v-if="index < 1">
<span>商品信息</span>
</div>
<el-col :span="12">
<el-form-item label="商品名称:">
<span>{{ item.productName }}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="商品单价:">
<span>{{ item.productSpecsPrice }}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="购买数量:">
<span>{{ item.itemnum }}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="商品规格名称:">
<span>{{ item.productSpecsName }}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="商品图片:">
<el-image
style="width: 80px; height: 80px"
:fit="contain"
:src="item.productThumb"
></el-image>
</el-form-item>
</el-col>
</el-card>
</el-row>
</el-form>
</el-dialog>
</basic-container> </basic-container>
</template> </template>
@ -295,11 +489,22 @@ import {
interfaceType, interfaceType,
dataplan, dataplan,
getParcel, getParcel,
productfillData,
productspecsfillData,
} from "@/api/ordermanage/mallorders"; } from "@/api/ordermanage/mallorders";
export default { export default {
data() { data() {
return { return {
form: {}, form: {},
dynamicValidateForm: {
domains: [
{
productId: "",
productSpecsId: "",
itemnum: "",
},
],
},
query: {}, query: {},
loading: true, loading: true,
page: { page: {
@ -317,19 +522,19 @@ export default {
searchMenuSpan: 6, searchMenuSpan: 6,
border: true, border: true,
index: true, index: true,
viewBtn: true, viewBtn: false,
columnBtn: true, columnBtn: true,
addBtn: true, addBtn: true,
dialogClickModal: false, dialogClickModal: false,
dialogWidth: "45%", dialogWidth: "65%",
labelWidth: 110, labelWidth: 130,
// searchLabelWidth: 100,
column: [ column: [
{ {
label: "订单编号", label: "订单编号",
prop: "id", prop: "id",
search: true, search: true,
addDisplay: false, addDisplay: false,
editDisplay: false,
rules: [ rules: [
{ {
required: true, required: true,
@ -339,25 +544,53 @@ export default {
], ],
}, },
{ {
label: "商品名称", label: "下单用户",
prop: "productName", prop: "userId",
search: true, search: true,
editDisplay: false, type: "select",
props: {
label: "account",
value: "id",
},
dicUrl: "/api/iot-system/user/fillData",
rules: [ rules: [
{ {
required: true, required: true,
message: "请输入商品名称", message: "请选择下单用户",
trigger: "blur", trigger: "change",
}, },
], ],
}, },
{ {
label: "商品类型", label: "发货",
prop: "productType", prop: "isDelivery",
type: "select",
search: false,
dataType: "number",
dicData: [
{
label: "不需要",
value: 1,
},
{
label: "需要发货",
value: 2,
},
],
rules: [
{
required: true,
message: "请选择是否需要发货",
trigger: "change",
},
],
},
{
label: "订单状态",
prop: "orderStatus",
type: "select", type: "select",
search: true, search: true,
editDisplay: false, dicUrl: "/api/iot-system/dict/dictionary?code=order_status",
dicUrl: "/api/iot-system/dict/dictionary?code=shop_type",
props: { props: {
label: "dictValue", label: "dictValue",
value: "dictKey", value: "dictKey",
@ -366,90 +599,160 @@ export default {
rules: [ rules: [
{ {
required: true, required: true,
message: "请选择商品类型", message: "请选择订单状态",
trigger: "blur", trigger: "change",
}, },
], ],
}, },
{ {
label: "订购数量", label: "订单金额",
prop: "itemnum", prop: "price",
search: true, search: true,
rules: [ rules: [
{ {
required: true, required: true,
message: "请输入订购数量", message: "请输入订单金额",
trigger: "blur", trigger: "blur",
}, },
], ],
}, },
{ {
label: "下单用户", label: "支付方式",
prop: "shippingName", prop: "payment",
type: "select",
search: true, search: true,
dicUrl: "/api/iot-system/dict/dictionary?code=payment",
props: {
label: "dictValue",
value: "dictKey",
},
dataType: "number",
rules: [ rules: [
{ {
required: true, required: true,
message: "请输入下单用户", message: "请选择支付方式",
trigger: "blur", trigger: "change",
}, },
], ],
}, },
{ {
label: "是否需要发货", label: "收货人手机号",
prop: "isDelivery", prop: "consigneePhone",
type: "select",
search: false, search: false,
dataType: "number", rules: [
dicData: [
{ {
label: "不需要", required: true,
value: 1, message: "请输入收货人手机号",
trigger: "blur",
},
],
}, },
{ {
label: "需要发货", label: "省份",
value: 2, prop: "provence",
type: "select",
props: {
label: "name",
value: "code",
},
cascaderItem: ["city", "area"],
dicUrl: "/api/iot-system/region/select",
rules: [
{
required: true,
message: "请选择省份",
trigger: "blur",
}, },
], ],
},
{
label: "市",
prop: "city",
type: "select",
props: {
label: "name",
value: "code",
},
dicFlag: false,
dicUrl: "/api/iot-system/region/select?code={{key}}",
rules: [ rules: [
{ {
required: true, required: true,
message: "请选择是否需要发货", message: "请选择",
trigger: "change", trigger: "blur",
}, },
], ],
}, },
{ {
label: "订单状态", label: "",
prop: "status", prop: "area",
type: "select", type: "select",
search: true,
dicUrl: "/api/iot-system/dict/dictionary?code=order_status",
props: { props: {
label: "dictValue", label: "name",
value: "dictKey", value: "code",
}, },
dataType: "number", dicFlag: false,
dicUrl: "/api/iot-system/region/select?code={{key}}",
rules: [ rules: [
{ {
required: true, required: true,
message: "请选择订单状态", message: "请选择",
trigger: "change", trigger: "blur",
}, },
], ],
}, },
{ {
label: "订单金额", label: "详细地址",
prop: "price", prop: "shippingAddress",
search: true, search: false,
hide: true,
rules: [ rules: [
{ {
required: true, required: true,
message: "请输入订单金额", message: "请输入详细地址",
trigger: "blur", trigger: "blur",
}, },
], ],
}, },
{
label: "商品名称",
prop: "productId",
type: "select",
search: false,
formslot: true,
labelslot: true,
hide: true,
span: 8,
props: {
label: "name",
value: "id",
},
dicUrl: "/api/iot-sim/product/fillData",
},
{
label: "商品规格",
prop: "productSpecsId",
type: "select",
search: false,
span: 8,
hide: true,
formslot: true,
labelslot: true,
props: {
label: "name",
value: "id",
},
dicUrl: "/api/iot-sim/productspecs/fillData",
},
{
label: "商品数量",
prop: "itemnum",
search: false,
labelslot: true,
span: 8,
hide: true,
formslot: true,
},
], ],
}, },
data: [], data: [],
@ -498,10 +801,17 @@ export default {
{ required: false, message: "请选择出库商品", trigger: "blur" }, { required: false, message: "请选择出库商品", trigger: "blur" },
], ],
}, },
viewVisiable: false, //
productIdArr: [], //
productSpecsIdArr: [], //
}; };
}, },
methods: { methods: {
rowSave(row, done, loading) { rowSave(row, done, loading) {
row.specsAndNum = this.dynamicValidateForm.domains;
row.area = row.$area;
row.city = row.$city;
row.provence = row.$provence;
add(row).then( add(row).then(
() => { () => {
this.onLoad(this.page); this.onLoad(this.page);
@ -509,6 +819,7 @@ export default {
type: "success", type: "success",
message: "操作成功!", message: "操作成功!",
}); });
this.dynamicValidateForm.domains = [];
done(); done();
}, },
(error) => { (error) => {
@ -518,6 +829,10 @@ export default {
); );
}, },
rowUpdate(row, index, done, loading) { rowUpdate(row, index, done, loading) {
row.specsAndNum = this.dynamicValidateForm.domains;
row.area = row.$area;
row.city = row.$city;
row.provence = row.$provence;
update(row).then( update(row).then(
() => { () => {
this.onLoad(this.page); this.onLoad(this.page);
@ -525,6 +840,7 @@ export default {
type: "success", type: "success",
message: "操作成功!", message: "操作成功!",
}); });
this.dynamicValidateForm.domains = [];
done(); done();
}, },
(error) => { (error) => {
@ -551,13 +867,64 @@ export default {
}); });
}, },
beforeOpen(done, type) { beforeOpen(done, type) {
this.dynamicValidateForm.domains = [
{
productId: "",
productSpecsId: "",
itemnum: "",
},
];
if (["edit", "view"].includes(type)) { if (["edit", "view"].includes(type)) {
getDetail(this.form.id).then((res) => { getDetail(this.form.id).then((res) => {
this.form = res.data.data; this.form = res.data.data;
this.dynamicValidateForm.domains = res.data.data.ordersDetailsList;
}); });
} }
productfillData().then((res) => {
if (res.data.code == 200) {
this.productIdArr = res.data.data;
}
});
done(); done();
}, },
handleProduct(e) {
this.form.productSpecsId = undefined;
this.productspecsfillDatas(e);
},
//
productspecsfillDatas(id) {
productspecsfillData(id).then((res) => {
if (res.data.code == 200) {
this.productSpecsIdArr = res.data.data;
}
});
},
//
addDomain() {
this.dynamicValidateForm.domains.push({
productId: "",
productSpecsId: "",
itemnum: "",
});
},
//
removeDomain(item) {
var index = this.dynamicValidateForm.domains.indexOf(item);
if (index !== -1) {
this.dynamicValidateForm.domains.splice(index, 1);
}
},
handleView(row) {
this.viewVisiable = true;
getDetail(row.id).then((res) => {
this.form = res.data.data;
});
},
handleViewClose() {
this.viewVisiable = false;
this.form = {};
},
searchReset() { searchReset() {
this.query = {}; this.query = {};
this.onLoad(this.page); this.onLoad(this.page);

2
src/views/ordermanage/payondelivery/index.vue

@ -117,7 +117,7 @@ export default {
}, },
{ {
label: "订单状态", label: "订单状态",
prop: "status", prop: "orderStatus",
type: "select", type: "select",
dicUrl: "/api/iot-system/dict/dictionary?code=order_status", dicUrl: "/api/iot-system/dict/dictionary?code=order_status",
search: true, search: true,

2
src/views/original/targetpackagegroupmanage/index.vue

@ -86,7 +86,7 @@ export default {
searchLabelWidth: 120, searchLabelWidth: 120,
search: true, search: true,
labelWidth: 130, labelWidth: 130,
dicUrl: "/api/iot-system/dict/dictionary?code=dataPlanGroupType", dicUrl: "/api/iot-system/dict/dictionary?code=dataPlanType",
props: { props: {
label: "dictValue", label: "dictValue",
value: "dictKey", value: "dictKey",

33
src/views/package/basicpackage/index.vue

@ -122,6 +122,28 @@ export default {
], ],
}, },
{
label: "生效类型",
prop: "activateType",
span: 12,
type: "select",
searchLabelWidth: 100,
search: true,
labelWidth: 130,
dicUrl: "/api/iot-system/dict/dictionary?code=activateType",
props: {
label: "dictValue",
value: "dictKey",
},
dataType: "number",
rules: [
{
required: true,
message: "请选择生效类型",
trigger: "change",
},
],
},
{ {
label: "套餐类型", label: "套餐类型",
prop: "type", prop: "type",
@ -130,7 +152,7 @@ export default {
searchLabelWidth: 100, searchLabelWidth: 100,
search: true, search: true,
labelWidth: 130, labelWidth: 130,
dicUrl: "/api/iot-system/dict/dictionary?code=dataPlanType", dicUrl: "/api/iot-system/dict/dictionary?code=sourcedataPlanTypes",
props: { props: {
label: "dictValue", label: "dictValue",
value: "dictKey", value: "dictKey",
@ -145,14 +167,14 @@ export default {
], ],
}, },
{ {
label: "生效类型", label: "流量类型",
prop: "activateType", prop: "flowType",
span: 12, span: 12,
type: "select", type: "select",
searchLabelWidth: 100, searchLabelWidth: 100,
search: true, search: true,
labelWidth: 130, labelWidth: 130,
dicUrl: "/api/iot-system/dict/dictionary?code=activateType", dicUrl: "/api/iot-system/dict/dictionary?code=DataPlanFlowType",
props: { props: {
label: "dictValue", label: "dictValue",
value: "dictKey", value: "dictKey",
@ -161,7 +183,7 @@ export default {
rules: [ rules: [
{ {
required: true, required: true,
message: "请选择生效类型", message: "请选择流量类型",
trigger: "change", trigger: "change",
}, },
], ],
@ -263,6 +285,7 @@ export default {
}, },
], ],
}, },
{ {
label: "套餐内容", label: "套餐内容",
prop: "content", prop: "content",

49
src/views/package/packagegroup/index.vue

@ -61,12 +61,12 @@ export default {
columnBtn: false, columnBtn: false,
selection: false, selection: false,
dialogClickModal: false, dialogClickModal: false,
dialogWidth: "60%", dialogWidth: "40%",
column: [ column: [
{ {
label: "套餐组名称", label: "套餐组名称",
prop: "name", prop: "name",
span: 12, span: 24,
labelWidth: 130, labelWidth: 130,
searchLabelWidth: 100, searchLabelWidth: 100,
search: true, search: true,
@ -78,29 +78,28 @@ export default {
}, },
], ],
}, },
{ // {
label: "套餐组类型", // label: "",
prop: "type", // prop: "type",
span: 12, // span: 12,
type: "select", // type: "select",
searchLabelWidth: 120, // searchLabelWidth: 120,
search: true, // search: true,
labelWidth: 130, // labelWidth: 130,
dicUrl: // dicUrl: "/api/iot-system/dict/dictionary?code=sourcedataPlanType",
"/api/iot-system/dict/dictionary?code=sourcedataPlanGroupType", // props: {
props: { // label: "dictValue",
label: "dictValue", // value: "dictKey",
value: "dictKey", // },
}, // dataType: "number",
dataType: "number", // rules: [
rules: [ // {
{ // required: true,
required: true, // message: "",
message: "请选择套餐组类型", // trigger: "change",
trigger: "change", // },
}, // ],
], // },
},
// { // {
// label: "", // label: "",
// prop: "orderCount", // prop: "orderCount",

48
src/views/package/targetpackagegroupmanage/index.vue

@ -61,12 +61,12 @@ export default {
columnBtn: false, columnBtn: false,
selection: false, selection: false,
dialogClickModal: false, dialogClickModal: false,
dialogWidth: "60%", dialogWidth: "40%",
column: [ column: [
{ {
label: "目标套餐组名称", label: "目标套餐组名称",
prop: "name", prop: "name",
span: 12, span: 24,
labelWidth: 130, labelWidth: 130,
searchLabelWidth: 120, searchLabelWidth: 120,
search: true, search: true,
@ -78,28 +78,28 @@ export default {
}, },
], ],
}, },
{ // {
label: "目标套餐组类型", // label: "",
prop: "type", // prop: "type",
span: 12, // span: 12,
type: "select", // type: "select",
searchLabelWidth: 120, // searchLabelWidth: 120,
search: true, // search: true,
labelWidth: 130, // labelWidth: 130,
dicUrl: "/api/iot-system/dict/dictionary?code=dataPlanGroupType", // dicUrl: "/api/iot-system/dict/dictionary?code=dataPlanType",
props: { // props: {
label: "dictValue", // label: "dictValue",
value: "dictKey", // value: "dictKey",
}, // },
dataType: "number", // dataType: "number",
rules: [ // rules: [
{ // {
required: true, // required: true,
message: "请选择目标套餐组类型", // message: "",
trigger: "change", // trigger: "change",
}, // },
], // ],
}, // },
], ],
}, },
data: [], data: [],

22
src/views/package/targetpackagemanage/index.vue

@ -150,6 +150,28 @@ export default {
}, },
], ],
}, },
{
label: "流量类型",
prop: "flowType",
span: 12,
type: "select",
searchLabelWidth: 100,
search: true,
labelWidth: 130,
dicUrl: "/api/iot-system/dict/dictionary?code=DataPlanFlowType",
props: {
label: "dictValue",
value: "dictKey",
},
dataType: "number",
rules: [
{
required: true,
message: "请选择流量类型",
trigger: "change",
},
],
},
{ {
label: "生效类型", label: "生效类型",
prop: "activateType", prop: "activateType",

180
src/views/system/menu.vue

@ -1,6 +1,7 @@
<template> <template>
<basic-container> <basic-container>
<avue-crud :option="option" <avue-crud
:option="option"
:table-loading="loading" :table-loading="loading"
:data="data" :data="data"
ref="crud" ref="crud"
@ -18,14 +19,17 @@
@size-change="sizeChange" @size-change="sizeChange"
@refresh-change="refreshChange" @refresh-change="refreshChange"
@on-load="onLoad" @on-load="onLoad"
@tree-load="treeLoad"> @tree-load="treeLoad"
>
<template slot="menuLeft"> <template slot="menuLeft">
<el-button type="danger" <el-button
type="danger"
size="small" size="small"
icon="el-icon-delete" icon="el-icon-delete"
v-if="permission.menu_delete" v-if="permission.menu_delete"
plain plain
@click="handleDelete"> @click="handleDelete"
>
</el-button> </el-button>
</template> </template>
<template slot-scope="scope" slot="menu"> <template slot-scope="scope" slot="menu">
@ -33,15 +37,16 @@
type="text" type="text"
icon="el-icon-circle-plus-outline" icon="el-icon-circle-plus-outline"
size="small" size="small"
@click.stop="handleAdd(scope.row,scope.index)" @click.stop="handleAdd(scope.row, scope.index)"
v-if="userInfo.role_name.includes('admin') && scope.row.category === 1" v-if="
userInfo.role_name.includes('admin') && scope.row.category === 1
"
>新增子项 >新增子项
</el-button> </el-button>
</template> </template>
<template slot-scope="{row}" <template slot-scope="{ row }" slot="source">
slot="source"> <div style="text-align: center">
<div style="text-align:center"> <i :class="row.source" />
<i :class="row.source"/>
</div> </div>
</template> </template>
</avue-crud> </avue-crud>
@ -49,13 +54,13 @@
</template> </template>
<script> <script>
import {getLazyList, remove, update, add, getMenu} from "@/api/system/menu"; import { getLazyList, remove, update, add, getMenu } from "@/api/system/menu";
import {mapGetters} from "vuex"; import { mapGetters } from "vuex";
import iconList from "@/config/iconList"; import iconList from "@/config/iconList";
import func from "@/util/func"; import func from "@/util/func";
import {getMenuTree} from "@/api/system/menu"; import { getMenuTree } from "@/api/system/menu";
export default { export default {
data() { data() {
return { return {
form: {}, form: {},
@ -91,9 +96,9 @@
{ {
required: true, required: true,
message: "请输入菜单名称", message: "请输入菜单名称",
trigger: "blur" trigger: "blur",
} },
] ],
}, },
{ {
label: "路由地址", label: "路由地址",
@ -102,9 +107,9 @@
{ {
required: true, required: true,
message: "请输入路由地址", message: "请输入路由地址",
trigger: "blur" trigger: "blur",
} },
] ],
}, },
{ {
label: "上级菜单", label: "上级菜单",
@ -114,15 +119,15 @@
hide: true, hide: true,
addDisabled: false, addDisabled: false,
props: { props: {
label: "title" label: "title",
}, },
rules: [ rules: [
{ {
required: false, required: false,
message: "请选择上级菜单", message: "请选择上级菜单",
trigger: "click" trigger: "click",
} },
] ],
}, },
{ {
label: "菜单图标", label: "菜单图标",
@ -134,9 +139,9 @@
{ {
required: true, required: true,
message: "请输入菜单图标", message: "请输入菜单图标",
trigger: "click" trigger: "click",
} },
] ],
}, },
{ {
label: "菜单编号", label: "菜单编号",
@ -146,9 +151,9 @@
{ {
required: true, required: true,
message: "请输入菜单编号", message: "请输入菜单编号",
trigger: "blur" trigger: "blur",
} },
] ],
}, },
{ {
label: "菜单类型", label: "菜单类型",
@ -157,21 +162,21 @@
dicData: [ dicData: [
{ {
label: "菜单", label: "菜单",
value: 1 value: 1,
}, },
{ {
label: "按钮", label: "按钮",
value: 2 value: 2,
} },
], ],
hide: true, hide: true,
rules: [ rules: [
{ {
required: true, required: true,
message: "请选择菜单类型", message: "请选择菜单类型",
trigger: "blur" trigger: "blur",
} },
] ],
}, },
{ {
label: "菜单别名", label: "菜单别名",
@ -181,9 +186,9 @@
{ {
required: true, required: true,
message: "请输入菜单别名", message: "请输入菜单别名",
trigger: "blur" trigger: "blur",
} },
] ],
}, },
{ {
label: "新窗口", label: "新窗口",
@ -193,21 +198,21 @@
dicData: [ dicData: [
{ {
label: "否", label: "否",
value: 1 value: 1,
}, },
{ {
label: "是", label: "是",
value: 2 value: 2,
} },
], ],
value: 1, value: 1,
rules: [ rules: [
{ {
required: true, required: true,
message: "请选择新窗口打开", message: "请选择新窗口打开",
trigger: "blur" trigger: "blur",
} },
] ],
}, },
{ {
label: "菜单排序", label: "菜单排序",
@ -219,9 +224,9 @@
{ {
required: true, required: true,
message: "请输入菜单排序", message: "请输入菜单排序",
trigger: "blur" trigger: "blur",
} },
] ],
}, },
{ {
label: "菜单备注", label: "菜单备注",
@ -229,21 +234,21 @@
type: "textarea", type: "textarea",
span: 24, span: 24,
minRows: 2, minRows: 2,
hide: true hide: true,
} },
] ],
}, },
data: [] data: [],
}; };
}, },
watch: { watch: {
'form.category'() { "form.category"() {
const category = func.toInt(this.form.category); const category = func.toInt(this.form.category);
this.$refs.crud.option.column.filter(item => { this.$refs.crud.option.column.filter((item) => {
if (item.prop === "path") { if (item.prop === "path") {
item.rules[0].required = category === 1; item.rules[0].required = category === 1;
} }
if (item.prop === 'isOpen') { if (item.prop === "isOpen") {
item.disabled = category === 2; item.disabled = category === 2;
} }
}); });
@ -256,20 +261,20 @@
addBtn: this.vaildData(this.permission.menu_add, false), addBtn: this.vaildData(this.permission.menu_add, false),
viewBtn: this.vaildData(this.permission.menu_view, false), viewBtn: this.vaildData(this.permission.menu_view, false),
delBtn: this.vaildData(this.permission.menu_delete, false), delBtn: this.vaildData(this.permission.menu_delete, false),
editBtn: this.vaildData(this.permission.menu_edit, false) editBtn: this.vaildData(this.permission.menu_edit, false),
}; };
}, },
ids() { ids() {
let ids = []; let ids = [];
this.selectionList.forEach(ele => { this.selectionList.forEach((ele) => {
ids.push(ele.id); ids.push(ele.id);
}); });
return ids.join(","); return ids.join(",");
} },
}, },
methods: { methods: {
initData() { initData() {
getMenuTree().then(res => { getMenuTree().then((res) => {
const column = this.findObject(this.option.column, "parentId"); const column = this.findObject(this.option.column, "parentId");
column.dicData = res.data.data; column.dicData = res.data.data;
}); });
@ -282,39 +287,47 @@
this.$refs.crud.rowAdd(); this.$refs.crud.rowAdd();
}, },
rowSave(row, done, loading) { rowSave(row, done, loading) {
add(row).then((res) => { add(row).then(
(res) => {
// //
const data = res.data.data; const data = res.data.data;
row.id = data.id; row.id = data.id;
this.$message({ this.$message({
type: "success", type: "success",
message: "操作成功!" message: "操作成功!",
}); });
// //
done(row); done(row);
}, error => { },
(error) => {
window.console.log(error); window.console.log(error);
loading(); loading();
}); }
);
}, },
rowUpdate(row, index, done, loading) { rowUpdate(row, index, done, loading) {
update(row).then(() => { update(row).then(
() => {
this.$message({ this.$message({
type: "success", type: "success",
message: "操作成功!" message: "操作成功!",
}); });
// //
done(row); done(row);
}, error => { },
(error) => {
window.console.log(error); window.console.log(error);
loading(); loading();
}); }
);
}, },
rowDel(row, index, done) { rowDel(row, index, done) {
this.$confirm("确定将选择数据删除?", { this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning",
}) })
.then(() => { .then(() => {
return remove(row.id); return remove(row.id);
@ -322,7 +335,7 @@
.then(() => { .then(() => {
this.$message({ this.$message({
type: "success", type: "success",
message: "操作成功!" message: "操作成功!",
}); });
// //
done(row); done(row);
@ -336,7 +349,7 @@
this.$confirm("确定将选择数据删除?", { this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning",
}) })
.then(() => { .then(() => {
return remove(this.ids); return remove(this.ids);
@ -351,7 +364,7 @@
this.onLoad(this.page); this.onLoad(this.page);
this.$message({ this.$message({
type: "success", type: "success",
message: "操作成功!" message: "操作成功!",
}); });
}); });
}, },
@ -362,7 +375,7 @@
}, },
searchChange(params, done) { searchChange(params, done) {
this.query = params; this.query = params;
this.parentId = ''; this.parentId = "";
this.page.currentPage = 1; this.page.currentPage = 1;
this.onLoad(this.page, params); this.onLoad(this.page, params);
done(); done();
@ -379,7 +392,7 @@
this.initData(); this.initData();
} }
if (["edit", "view"].includes(type)) { if (["edit", "view"].includes(type)) {
getMenu(this.form.id).then(res => { getMenu(this.form.id).then((res) => {
this.form = res.data.data; this.form = res.data.data;
}); });
} }
@ -403,21 +416,22 @@
}, },
onLoad(page, params = {}) { onLoad(page, params = {}) {
this.loading = true; this.loading = true;
getLazyList(this.parentId, Object.assign(params, this.query)).then(res => { getLazyList(this.parentId, Object.assign(params, this.query)).then(
(res) => {
this.data = res.data.data; this.data = res.data.data;
this.loading = false; this.loading = false;
this.selectionClear(); this.selectionClear();
}); }
);
}, },
treeLoad(tree, treeNode, resolve) { treeLoad(tree, treeNode, resolve) {
const parentId = tree.id; const parentId = tree.id;
getLazyList(parentId).then(res => { getLazyList(parentId).then((res) => {
resolve(res.data.data); resolve(res.data.data);
}); });
} },
} },
}; };
</script> </script>
<style> <style></style>
</style>

4
src/views/wel/component/Administrator.vue

@ -306,6 +306,10 @@ export default {
name: "济南天桥移动", name: "济南天桥移动",
value: res.data.data.jiNanTianQiaoYiDong, value: res.data.data.jiNanTianQiaoYiDong,
}, },
{
name: "东营移动",
value: res.data.data.dongYingYiDong,
},
]; ];
this.cardTotal(); this.cardTotal();
} }

Loading…
Cancel
Save