增加排序

dev
张同海 2 years ago
parent a727c34fbd
commit dc7953ed1f

@ -0,0 +1,53 @@
import { axios } from '@/utils/request'
/**
* 分页查询用户邮箱账号
*
* @author Myshipping
*/
export function DjyUserMailAccountPage(parameter) {
return axios({
url: '/DjyUserMailAccount/page',
method: 'get',
params: parameter
})
}
/**
* 增加用户邮箱账号
*
* @author Myshipping
*/
export function DjyUserMailAccountAdd(parameter) {
return axios({
url: '/DjyUserMailAccount/add',
method: 'post',
data: parameter
})
}
/**
* 更新用户邮箱账号
*
* @author Myshipping
*/
export function DjyUserMailAccountEdit(parameter) {
return axios({
url: '/DjyUserMailAccount/edit',
method: 'post',
data: parameter
})
}
/**
* 删除用户邮箱账号
*
* @author Myshipping
*/
export function DjyUserMailAccountDelete(parameter) {
return axios({
url: '/DjyUserMailAccount/delete',
method: 'post',
data: parameter
})
}

@ -43,6 +43,11 @@
<a-input placeholder="请输入备注" v-decorator="['remark']" />
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="排序" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input-number v-decorator="['sort']" />
</a-form-item>
</a-col>
</a-row>
</a-form>
</a-spin>

@ -31,7 +31,7 @@
</a-col>
<a-col :span="8">
<a-form-item label="租户参数类别" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-select
<!-- <a-select
placeholder="请选择租户参数类别"
v-decorator="['paraCode', { rules: [{ required: true, message: '请选择租户参数类别!' }] }]"
@change="FnChangeTypeCode"
@ -39,6 +39,21 @@
<a-select-option v-for="item in TypeData" :key="item.id" :value="item.paraCode">
{{ item.paraName }}
</a-select-option>
</a-select> -->
<a-select
placeholder="请选择租户参数类别"
v-decorator="['paraCode', { rules: [{ required: true, message: '请选择租户参数类别!' }] }]"
@change="FnChangeTypeCode"
>
<a-select-opt-group
v-for="(item, index) in WTypeData"
:key="`W${index}`"
:label="FnTypeD(item[0].type)"
>
<a-select-option v-for="item2 in item" :key="item2.id" :value="item2.paraCode">
{{ item2.paraName }}
</a-select-option>
</a-select-opt-group>
</a-select>
</a-form-item>
</a-col>
@ -62,11 +77,17 @@
</a-select>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="备注" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-col :span="8">
<a-form-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input placeholder="请输入备注" v-decorator="['remark']" />
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="排序" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input-number v-decorator="['sort']" />
</a-form-item>
</a-col>
</a-row>
</a-form>
</a-spin>
@ -80,10 +101,12 @@ import {
SysTenantPage,
DJYTenantParamGetParamItem
} from '@/api/modular/main/DJYTenantParam'
import { sysDictDataPage } from '@/api/modular/system/dictDataManage'
export default {
data() {
return {
TypeData: [],
WTypeData: [],
labelCol: {
xs: { span: 24 },
sm: { span: 9 }
@ -94,11 +117,11 @@ export default {
},
labelCol2: {
xs: { span: 24 },
sm: { span: 3 }
sm: { span: 5 }
},
wrapperCol2: {
xs: { span: 24 },
sm: { span: 20 }
sm: { span: 2 }
},
typeData: [],
visible: false,
@ -106,20 +129,54 @@ export default {
form: this.$form.createForm(this),
TenantData: [],
ItemData: [],
ItemCodeDisabled: true
ItemCodeDisabled: true,
YWData: []
}
},
mounted() {
DJYTenantParamGet({ pageNo: 1, pageSize: 999 }).then(res => {
this.TypeData = res.data
console.log(this.TypeData)
let data = []
let type = ''
let num = -1
res.data.forEach(item => {
if (type != item.type) {
num = num + 1
type = item.type
}
// if (data.length == 0) {
if (data[num]) {
data[num].push(item)
} else {
data[num] = []
data[num].push(item)
}
// }
})
this.WTypeData = data
console.log(data)
})
sysDictDataPage({ pageNo: 1, pageSize: 999, typeId: '353559512399941' }).then(res => {
this.YWData = res.data.rows
})
SysTenantPage({ pageNo: 1, pageSize: 9999, name: '' }).then(res => {
this.TenantData = res.data.rows
})
},
methods: {
FnTypeD(data) {
let Rdata = ''
this.YWData.forEach(item => {
if (item.code == data) {
Rdata = item.value
}
})
return Rdata
},
FnChangeTypeCode(e) {
this.form.setFieldsValue({
itemCode: ''
})
if (e) {
this.ItemCodeDisabled = false
DJYTenantParamGetParamItem({ paraCode: e }).then(res => {

@ -43,6 +43,11 @@
<a-input placeholder="请输入备注" v-decorator="['remark']" />
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="排序" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input-number v-decorator="['sort']" />
</a-form-item>
</a-col>
</a-row>
</a-form>
</a-spin>
@ -98,7 +103,8 @@ export default {
type: record.type,
paraName: record.paraName,
paraCode: record.paraCode,
remark: record.remark
remark: record.remark,
sort: record.sort
})
console.log(this.form.getFieldsValue())
}, 100)

@ -31,7 +31,7 @@
</a-col>
<a-col :span="8">
<a-form-item label="租户参数类别" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-select
<!-- <a-select
placeholder="请选择租户参数类别"
v-decorator="['paraCode', { rules: [{ required: true, message: '请选择租户参数类别!' }] }]"
@change="FnChangeTypeCode"
@ -39,6 +39,21 @@
<a-select-option v-for="item in TypeData" :key="item.id" :value="item.paraCode">
{{ item.paraName }}
</a-select-option>
</a-select> -->
<a-select
placeholder="请选择租户参数类别"
v-decorator="['paraCode', { rules: [{ required: true, message: '请选择租户参数类别!' }] }]"
@change="FnChangeTypeCode"
>
<a-select-opt-group
v-for="(item, index) in WTypeData"
:key="`W${index}`"
:label="FnTypeD(item[0].type)"
>
<a-select-option v-for="item2 in item" :key="item2.id" :value="item2.paraCode">
{{ item2.paraName }}
</a-select-option>
</a-select-opt-group>
</a-select>
</a-form-item>
</a-col>
@ -62,11 +77,16 @@
</a-select>
</a-form-item>
</a-col>
<a-col :span="19">
<a-form-item label="备注" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-col :span="8">
<a-form-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input placeholder="请输入备注" v-decorator="['remark']" />
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="排序" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input-number v-decorator="['sort']" />
</a-form-item>
</a-col>
</a-row>
</a-form>
</a-spin>
@ -80,10 +100,12 @@ import {
SysTenantPage,
DJYTenantParamGetParamItem
} from '@/api/modular/main/DJYTenantParam'
import { sysDictDataPage } from '@/api/modular/system/dictDataManage'
export default {
data() {
return {
TypeData: [],
WTypeData: [],
labelCol: {
xs: { span: 24 },
sm: { span: 7 }
@ -107,20 +129,54 @@ export default {
data: {},
TenantData: [],
ItemData: [],
ItemCodeDisabled: true
ItemCodeDisabled: true,
YWData: []
}
},
mounted() {
DJYTenantParamGet({ pageNo: 1, pageSize: 999 }).then(res => {
this.TypeData = res.data
console.log(this.TypeData)
let data = []
let type = ''
let num = -1
res.data.forEach(item => {
if (type != item.type) {
num = num + 1
type = item.type
}
// if (data.length == 0) {
if (data[num]) {
data[num].push(item)
} else {
data[num] = []
data[num].push(item)
}
// }
})
this.WTypeData = data
console.log(data)
})
sysDictDataPage({ pageNo: 1, pageSize: 999, typeId: '353559512399941' }).then(res => {
this.YWData = res.data.rows
})
SysTenantPage({ pageNo: 1, pageSize: 9999, name: '' }).then(res => {
this.TenantData = res.data.rows
})
},
methods: {
FnTypeD(data) {
let Rdata = ''
this.YWData.forEach(item => {
if (item.code == data) {
Rdata = item.value
}
})
return Rdata
},
FnChangeTypeCode(e) {
this.form.setFieldsValue({
itemCode: ''
})
if (e) {
this.ItemCodeDisabled = false
DJYTenantParamGetParamItem({ paraCode: e }).then(res => {
@ -149,6 +205,7 @@ export default {
itemCode: record.itemCode,
itemName: record.itemName,
remark: record.remark,
sort: record.sort,
tenantId: record.tenantId
})
console.log(this.form.getFieldsValue())

@ -48,9 +48,15 @@
v-else-if="item.title == '租户参数类别'"
allow-clear
>
<a-select-option v-for="item in TypeData" :key="item.id" :value="item.paraCode">
{{ item.paraName }}
</a-select-option>
<a-select-opt-group
v-for="(item, index) in WTypeData"
:key="`W${index}`"
:label="FnTypeD(item[0].type)"
>
<a-select-option v-for="item2 in item" :key="item2.id" :value="item2.paraCode">
{{ item2.paraName }}
</a-select-option>
</a-select-opt-group>
</a-select>
<a-input
v-model="queryParam[item.dataIndex]"
@ -151,6 +157,7 @@ export default {
data() {
return {
TypeData: [],
WTypeData: [],
// /
advanced: false,
loading: false,
@ -192,7 +199,8 @@ export default {
tstyle: { 'padding-bottom': '0px', 'margin-bottom': '10px' },
// Promise
loadData: {},
TenantData: []
TenantData: [],
YWData: []
}
},
watch: {
@ -213,7 +221,6 @@ export default {
}
},
FnTurnD(data) {
console.log(data)
let Rdata = ''
this.TypeData.forEach(item => {
if (item.paraCode == data) {
@ -222,6 +229,15 @@ export default {
})
return Rdata
},
FnTypeD(data) {
let Rdata = ''
this.YWData.forEach(item => {
if (item.code == data) {
Rdata = item.value
}
})
return Rdata
},
toggleAdvanced() {
this.advanced = !this.advanced
},
@ -229,9 +245,30 @@ export default {
Object.assign(this.$data, this.$options.data())
this.ColumnsQuery = this.columns
this.FnGetData()
sysDictDataPage({ pageNo: 1, pageSize: 999, typeId: '353559512399941' }).then(res => {
this.YWData = res.data.rows
})
DJYTenantParamGet({ pageNo: 1, pageSize: 999 }).then(res => {
this.TypeData = res.data
console.log(this.TypeData)
let data = []
let type = ''
let num = -1
res.data.forEach(item => {
if (type != item.type) {
num = num + 1
type = item.type
}
// if (data.length == 0) {
if (data[num]) {
data[num].push(item)
} else {
data[num] = []
data[num].push(item)
}
// }
})
this.WTypeData = data
console.log(data)
})
SysTenantPage({ pageNo: 1, pageSize: 9999, name: '' }).then(res => {
this.TenantData = res.data.rows
@ -267,7 +304,6 @@ export default {
this.DJYTenantParamDeleteParamValue(data)
},
DJYTenantParamDeleteParamValue(record) {
console.log(record)
DJYTenantParamDeleteParamValue({ id: record.id }).then(res => {
if (res.success) {
this.$message.success('删除成功')

@ -57,9 +57,14 @@
<vxe-input v-model="data.itemCode" placeholder="请输入选项代码"></vxe-input>
</template>
</vxe-form-item>
<vxe-form-item field="remark" title="备注:" :span="24" :item-render="{}">
<vxe-form-item field="sort" title="排序:" :span="12" :item-render="{}">
<template #default="{ data }">
<vxe-textarea v-model="data.remark" placeholder="请输入备注"></vxe-textarea>
<vxe-input v-model="data.sort" type="number" placeholder="请输入选项代码"></vxe-input>
</template>
</vxe-form-item>
<vxe-form-item field="remark" title="备注:" :span="12" :item-render="{}">
<template #default="{ data }">
<vxe-input v-model="data.remark" placeholder="请输入备注"></vxe-input>
</template>
</vxe-form-item>
<vxe-form-item align="center" title-align="left" :span="24">

@ -1,6 +1,6 @@
<template>
<a-modal
title="新增账号"
title="新增邮箱"
:width="1100"
:visible="visible"
:confirmLoading="confirmLoading"
@ -54,7 +54,7 @@
</template>
<script>
import { DjyWebsiteAccountConfigAdd } from '@/api/modular/main/WebSiteaccount'
import { DjyUserMailAccountAdd } from '@/api/modular/main/UserEmail'
import { sysDictDataPage } from '@/api/modular/system/dictDataManage'
export default {
data() {
@ -126,7 +126,7 @@ export default {
values[key] = JSON.stringify(values[key])
}
}
DjyWebsiteAccountConfigAdd(values)
DjyUserMailAccountAdd(values)
.then(res => {
if (res.success) {
this.$message.success('新增成功')

@ -1,6 +1,6 @@
<template>
<a-modal
title="编辑账号"
title="编辑邮箱"
:width="1100"
:visible="visible"
:confirmLoading="confirmLoading"
@ -50,7 +50,7 @@
</template>
<script>
import { DjyWebsiteAccountConfigEdit } from '@/api/modular/main/WebSiteaccount'
import { DjyUserMailAccountEdit } from '@/api/modular/main/UserEmail'
import { sysDictDataPage } from '@/api/modular/system/dictDataManage'
export default {
data() {
@ -120,7 +120,7 @@ export default {
console.log(this.form, values.id)
values.id = this.data.id
console.log(values)
DjyWebsiteAccountConfigEdit(values)
DjyUserMailAccountEdit(values)
.then(res => {
if (res.success) {
this.$message.success('编辑成功')

@ -35,7 +35,7 @@
<vxe-toolbar>
<template #buttons>
<a-button type="primary" icon="plus" @click="$refs.addForm.add()">
新增账号
新增邮箱
</a-button>
</template>
</vxe-toolbar>
@ -86,7 +86,7 @@
</div>
</template>
<script>
import { DjyWebsiteAccountConfigPage, DjyWebsiteAccountConfigDelete } from '@/api/modular/main/WebSiteaccount'
import { DjyUserMailAccountPage, DjyUserMailAccountDelete } from '@/api/modular/main/UserEmail'
import { sysDictDataPage } from '@/api/modular/system/dictDataManage'
import addForm from './addForm.vue'
import editForm from './editForm.vue'
@ -175,7 +175,7 @@ export default {
},
FnGetData() {
this.loading = true
DjyWebsiteAccountConfigPage(this.queryParam).then(res => {
DjyUserMailAccountPage(this.queryParam).then(res => {
this.loadData = res.data.rows
this.loading = false
this.queryParam.currentPage = res.data.pageNo
@ -191,10 +191,10 @@ export default {
return obj
},
confirm(e, data) {
this.DjyWebsiteAccountConfigDelete(data)
this.DjyUserMailAccountDelete(data)
},
DjyWebsiteAccountConfigDelete(record) {
DjyWebsiteAccountConfigDelete(record).then(res => {
DjyUserMailAccountDelete(record) {
DjyUserMailAccountDelete(record).then(res => {
if (res.success) {
this.$message.success('删除成功')
this.FnGetData()

Loading…
Cancel
Save