增加排序

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-input placeholder="请输入备注" v-decorator="['remark']" />
</a-form-item> </a-form-item>
</a-col> </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-row>
</a-form> </a-form>
</a-spin> </a-spin>

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

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

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

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

@ -57,9 +57,14 @@
<vxe-input v-model="data.itemCode" placeholder="请输入选项代码"></vxe-input> <vxe-input v-model="data.itemCode" placeholder="请输入选项代码"></vxe-input>
</template> </template>
</vxe-form-item> </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 }"> <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> </template>
</vxe-form-item> </vxe-form-item>
<vxe-form-item align="center" title-align="left" :span="24"> <vxe-form-item align="center" title-align="left" :span="24">

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

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

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

Loading…
Cancel
Save