【更新】前端代码进行大量的优化、缩减
This commit is contained in:
parent
46890f08c8
commit
aea1fac10b
@ -163,9 +163,14 @@
|
|||||||
* @param bool Boolean
|
* @param bool Boolean
|
||||||
*/
|
*/
|
||||||
refresh(bool = false) {
|
refresh(bool = false) {
|
||||||
bool && (this.localPagination = Object.assign({}, {
|
bool &&
|
||||||
current: 1, size: this.size
|
(this.localPagination = Object.assign(
|
||||||
}))
|
{},
|
||||||
|
{
|
||||||
|
current: 1,
|
||||||
|
size: this.size
|
||||||
|
}
|
||||||
|
))
|
||||||
this.loadData()
|
this.loadData()
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
@ -176,18 +181,29 @@
|
|||||||
*/
|
*/
|
||||||
loadData(pagination, filters, sorter) {
|
loadData(pagination, filters, sorter) {
|
||||||
this.localLoading = true
|
this.localLoading = true
|
||||||
const parameter = Object.assign({
|
const parameter = Object.assign(
|
||||||
current: (pagination && pagination.current) ||
|
{
|
||||||
this.showPagination && this.localPagination.current || this.pageNum,
|
current:
|
||||||
size: (pagination && pagination.pageSize) ||
|
(pagination && pagination.current) ||
|
||||||
this.showPagination && this.localPagination.pageSize || this.pageSize || this.localPagination.size
|
(this.showPagination && this.localPagination.current) ||
|
||||||
|
this.pageNum,
|
||||||
|
size:
|
||||||
|
(pagination && pagination.pageSize) ||
|
||||||
|
(this.showPagination && this.localPagination.pageSize) ||
|
||||||
|
this.pageSize ||
|
||||||
|
this.localPagination.size
|
||||||
},
|
},
|
||||||
(sorter && sorter.field && {
|
(sorter &&
|
||||||
sortField: sorter.field
|
sorter.field && {
|
||||||
}) || {},
|
sortField: sorter.field
|
||||||
(sorter && sorter.order && {
|
}) ||
|
||||||
sortOrder: sorter.order
|
{},
|
||||||
}) || {}, {
|
(sorter &&
|
||||||
|
sorter.order && {
|
||||||
|
sortOrder: sorter.order
|
||||||
|
}) ||
|
||||||
|
{},
|
||||||
|
{
|
||||||
...filters
|
...filters
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
@ -325,7 +341,7 @@
|
|||||||
const needTotalItems = this.needTotalList.map((item) => {
|
const needTotalItems = this.needTotalList.map((item) => {
|
||||||
return (
|
return (
|
||||||
<span className="mr-3">
|
<span className="mr-3">
|
||||||
{item.title} 总计 {' '}
|
{item.title} 总计{' '}
|
||||||
<a className="font-6">{!item.customRender ? item.total : item.customRender(item.total)}</a>
|
<a className="font-6">{!item.customRender ? item.total : item.customRender(item.total)}</a>
|
||||||
</span>
|
</span>
|
||||||
)
|
)
|
||||||
@ -416,10 +432,8 @@
|
|||||||
<div className="layout-items-center s-table-tool-right">
|
<div className="layout-items-center s-table-tool-right">
|
||||||
{this.toolConfig.striped ? (
|
{this.toolConfig.striped ? (
|
||||||
<div className="layout-items-center ml-4">
|
<div className="layout-items-center ml-4">
|
||||||
<a-checkbox
|
<a-checkbox checked={this.localSettings.rowClassNameSwitch} onChange={changeRowClass}>
|
||||||
checked={this.localSettings.rowClassNameSwitch}
|
斑马纹
|
||||||
onChange={changeRowClass}
|
|
||||||
>斑马纹
|
|
||||||
</a-checkbox>
|
</a-checkbox>
|
||||||
</div>
|
</div>
|
||||||
) : null}
|
) : null}
|
||||||
|
@ -92,7 +92,7 @@
|
|||||||
import router from '@/router'
|
import router from '@/router'
|
||||||
import { required, rules } from '@/utils/formRules'
|
import { required, rules } from '@/utils/formRules'
|
||||||
import userCenterApi from '@/api/sys/userCenterApi'
|
import userCenterApi from '@/api/sys/userCenterApi'
|
||||||
import smCrypto from "@/utils/smCrypto"
|
import smCrypto from '@/utils/smCrypto'
|
||||||
const emailResetFormRef = ref()
|
const emailResetFormRef = ref()
|
||||||
const emailFormData = ref({})
|
const emailFormData = ref({})
|
||||||
const islogin = ref(false)
|
const islogin = ref(false)
|
||||||
|
@ -93,7 +93,7 @@
|
|||||||
import router from '@/router'
|
import router from '@/router'
|
||||||
import { required, rules } from '@/utils/formRules'
|
import { required, rules } from '@/utils/formRules'
|
||||||
import userCenterApi from '@/api/sys/userCenterApi'
|
import userCenterApi from '@/api/sys/userCenterApi'
|
||||||
import smCrypto from "@/utils/smCrypto"
|
import smCrypto from '@/utils/smCrypto'
|
||||||
const phoneLoginFormRef = ref()
|
const phoneLoginFormRef = ref()
|
||||||
const phoneFormData = ref({})
|
const phoneFormData = ref({})
|
||||||
const islogin = ref(false)
|
const islogin = ref(false)
|
||||||
|
@ -66,7 +66,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<template v-if="column.dataIndex === 'action'">
|
<template v-if="column.dataIndex === 'action'">
|
||||||
<a-popconfirm title="确定要强退此令牌吗?" @confirm="exitToken(record)">
|
<a-popconfirm title="确定要强退此令牌吗?" @confirm="exitToken(record)">
|
||||||
<a-button type="link" danger size="small" :loading="exitLoading" >强退</a-button>
|
<a-button type="link" danger size="small" :loading="exitLoading">强退</a-button>
|
||||||
</a-popconfirm>
|
</a-popconfirm>
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
|
@ -88,10 +88,5 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 分类
|
// 分类
|
||||||
const categoryOptions = tool.dictTypeList('THIRD_CATEGORY').map((item) => {
|
const categoryOptions = tool.dictList('THIRD_CATEGORY')
|
||||||
return {
|
|
||||||
value: item['dictValue'],
|
|
||||||
label: item['name']
|
|
||||||
}
|
|
||||||
})
|
|
||||||
</script>
|
</script>
|
||||||
|
@ -124,12 +124,7 @@
|
|||||||
sortCode: [required('请选择排序')]
|
sortCode: [required('请选择排序')]
|
||||||
}
|
}
|
||||||
// 机构分类字典
|
// 机构分类字典
|
||||||
let orgCategoryOptions = proxy.$TOOL.dictTypeList('ORG_CATEGORY').map((item) => {
|
let orgCategoryOptions = proxy.$TOOL.dictList('ORG_CATEGORY')
|
||||||
return {
|
|
||||||
value: item['dictValue'],
|
|
||||||
label: item['name']
|
|
||||||
}
|
|
||||||
})
|
|
||||||
// 打开人员选择器,选择主管
|
// 打开人员选择器,选择主管
|
||||||
const openSelector = (id) => {
|
const openSelector = (id) => {
|
||||||
let checkedUserIds = []
|
let checkedUserIds = []
|
||||||
@ -157,13 +152,15 @@
|
|||||||
.then(() => {
|
.then(() => {
|
||||||
submitLoading.value = true
|
submitLoading.value = true
|
||||||
formData.value.extJson = JSON.stringify(extJson.value)
|
formData.value.extJson = JSON.stringify(extJson.value)
|
||||||
bizOrgApi.submitForm(formData.value, !formData.value.id).then(() => {
|
bizOrgApi
|
||||||
visible = false
|
.submitForm(formData.value, !formData.value.id)
|
||||||
emit('successful')
|
.then(() => {
|
||||||
})
|
visible = false
|
||||||
.finally(() => {
|
emit('successful')
|
||||||
submitLoading.value = false
|
})
|
||||||
})
|
.finally(() => {
|
||||||
|
submitLoading.value = false
|
||||||
|
})
|
||||||
})
|
})
|
||||||
.catch(() => {})
|
.catch(() => {})
|
||||||
}
|
}
|
||||||
|
@ -137,28 +137,30 @@
|
|||||||
}
|
}
|
||||||
// 加载左侧的树
|
// 加载左侧的树
|
||||||
const loadTreeData = () => {
|
const loadTreeData = () => {
|
||||||
bizOrgApi.orgTree().then((res) => {
|
bizOrgApi
|
||||||
cardLoading.value = false
|
.orgTree()
|
||||||
if (res !== null) {
|
.then((res) => {
|
||||||
treeData.value = res
|
cardLoading.value = false
|
||||||
// 默认展开2级
|
if (res !== null) {
|
||||||
treeData.value.forEach((item) => {
|
treeData.value = res
|
||||||
// 因为0的顶级
|
// 默认展开2级
|
||||||
if (item.parentId === '0') {
|
treeData.value.forEach((item) => {
|
||||||
defaultExpandedKeys.value.push(item.id)
|
// 因为0的顶级
|
||||||
// 取到下级ID
|
if (item.parentId === '0') {
|
||||||
if (item.children) {
|
defaultExpandedKeys.value.push(item.id)
|
||||||
item.children.forEach((items) => {
|
// 取到下级ID
|
||||||
defaultExpandedKeys.value.push(items.id)
|
if (item.children) {
|
||||||
})
|
item.children.forEach((items) => {
|
||||||
|
defaultExpandedKeys.value.push(items.id)
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
})
|
}
|
||||||
}
|
})
|
||||||
})
|
.finally(() => {
|
||||||
.finally(() => {
|
cardLoading.value = false
|
||||||
cardLoading.value = false
|
})
|
||||||
})
|
|
||||||
}
|
}
|
||||||
// 点击树查询
|
// 点击树查询
|
||||||
const treeSelect = (selectedKeys) => {
|
const treeSelect = (selectedKeys) => {
|
||||||
|
@ -101,25 +101,22 @@
|
|||||||
category: [required('请选择岗位分类')],
|
category: [required('请选择岗位分类')],
|
||||||
sortCode: [required('请选择排序')]
|
sortCode: [required('请选择排序')]
|
||||||
}
|
}
|
||||||
let positionCategoryOptions = proxy.$TOOL.dictTypeList('POSITION_CATEGORY').map((item) => {
|
let positionCategoryOptions = proxy.$TOOL.dictList('POSITION_CATEGORY')
|
||||||
return {
|
|
||||||
value: item['dictValue'],
|
|
||||||
label: item['name']
|
|
||||||
}
|
|
||||||
})
|
|
||||||
// 验证并提交数据
|
// 验证并提交数据
|
||||||
const onSubmit = () => {
|
const onSubmit = () => {
|
||||||
formRef.value
|
formRef.value
|
||||||
.validate()
|
.validate()
|
||||||
.then(() => {
|
.then(() => {
|
||||||
submitLoading.value = true
|
submitLoading.value = true
|
||||||
bizPositionApi.submitForm(formData.value, !formData.value.id).then(() => {
|
bizPositionApi
|
||||||
visible = false
|
.submitForm(formData.value, !formData.value.id)
|
||||||
emit('successful')
|
.then(() => {
|
||||||
})
|
visible = false
|
||||||
.finally(() => {
|
emit('successful')
|
||||||
submitLoading.value = false
|
})
|
||||||
})
|
.finally(() => {
|
||||||
|
submitLoading.value = false
|
||||||
|
})
|
||||||
})
|
})
|
||||||
.catch(() => {})
|
.catch(() => {})
|
||||||
}
|
}
|
||||||
|
@ -136,28 +136,30 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 加载左侧的树
|
// 加载左侧的树
|
||||||
bizOrgApi.orgTree().then((res) => {
|
bizOrgApi
|
||||||
cardLoading.value = false
|
.orgTree()
|
||||||
if (res !== null) {
|
.then((res) => {
|
||||||
treeData.value = res
|
cardLoading.value = false
|
||||||
// 默认展开2级
|
if (res !== null) {
|
||||||
treeData.value.forEach((item) => {
|
treeData.value = res
|
||||||
// 因为0的顶级
|
// 默认展开2级
|
||||||
if (item.parentId === '0') {
|
treeData.value.forEach((item) => {
|
||||||
defaultExpandedKeys.value.push(item.id)
|
// 因为0的顶级
|
||||||
// 取到下级ID
|
if (item.parentId === '0') {
|
||||||
if (item.children) {
|
defaultExpandedKeys.value.push(item.id)
|
||||||
item.children.forEach((items) => {
|
// 取到下级ID
|
||||||
defaultExpandedKeys.value.push(items.id)
|
if (item.children) {
|
||||||
})
|
item.children.forEach((items) => {
|
||||||
|
defaultExpandedKeys.value.push(items.id)
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
})
|
}
|
||||||
}
|
})
|
||||||
})
|
.finally(() => {
|
||||||
.finally(() => {
|
cardLoading.value = false
|
||||||
cardLoading.value = false
|
})
|
||||||
})
|
|
||||||
// 点击树查询
|
// 点击树查询
|
||||||
const treeSelect = (selectedKeys) => {
|
const treeSelect = (selectedKeys) => {
|
||||||
if (selectedKeys.length > 0) {
|
if (selectedKeys.length > 0) {
|
||||||
|
@ -514,33 +514,13 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 性别
|
// 性别
|
||||||
const genderOptions = proxy.$TOOL.dictTypeList('GENDER').map((item) => {
|
const genderOptions = proxy.$TOOL.dictList('GENDER')
|
||||||
return {
|
|
||||||
value: item['dictValue'],
|
|
||||||
label: item['name']
|
|
||||||
}
|
|
||||||
})
|
|
||||||
// 民族
|
// 民族
|
||||||
const nationOptions = proxy.$TOOL.dictTypeList('NATION').map((item) => {
|
const nationOptions = proxy.$TOOL.dictList('NATION')
|
||||||
return {
|
|
||||||
value: item['dictValue'],
|
|
||||||
label: item['name']
|
|
||||||
}
|
|
||||||
})
|
|
||||||
// 身份证件
|
// 身份证件
|
||||||
const idcardTypeOptions = proxy.$TOOL.dictTypeList('IDCARD_TYPE').map((item) => {
|
const idcardTypeOptions = proxy.$TOOL.dictList('IDCARD_TYPE')
|
||||||
return {
|
|
||||||
value: item['dictValue'],
|
|
||||||
label: item['name']
|
|
||||||
}
|
|
||||||
})
|
|
||||||
// 文化程度
|
// 文化程度
|
||||||
const cultureLevelOptions = proxy.$TOOL.dictTypeList('CULTURE_LEVEL').map((item) => {
|
const cultureLevelOptions = proxy.$TOOL.dictList('CULTURE_LEVEL')
|
||||||
return {
|
|
||||||
value: item['dictValue'],
|
|
||||||
label: item['name']
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
// 调用这个函数将子组件的一些数据和方法暴露出去
|
// 调用这个函数将子组件的一些数据和方法暴露出去
|
||||||
defineExpose({
|
defineExpose({
|
||||||
|
@ -28,8 +28,8 @@
|
|||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-form-item name="userStatus" :label="$t('user.userStatus')">
|
<a-form-item name="userStatus" :label="$t('user.userStatus')">
|
||||||
<a-select v-model:value="searchFormState.userStatus" :placeholder="$t('user.placeholderUserStatus')">
|
<a-select v-model:value="searchFormState.userStatus" :placeholder="$t('user.placeholderUserStatus')">
|
||||||
<a-select-option v-for="item in statusData" :key="item.dictValue" :value="item.dictValue">{{
|
<a-select-option v-for="item in statusData" :key="item.value" :value="item.value">{{
|
||||||
item.name
|
item.label
|
||||||
}}</a-select-option>
|
}}</a-select-option>
|
||||||
</a-select>
|
</a-select>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
@ -207,7 +207,7 @@
|
|||||||
width: '220px'
|
width: '220px'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const statusData = tool.dictTypeList('COMMON_STATUS')
|
const statusData = tool.dictList('COMMON_STATUS')
|
||||||
const searchFormRef = ref()
|
const searchFormRef = ref()
|
||||||
let defaultExpandedKeys = ref([])
|
let defaultExpandedKeys = ref([])
|
||||||
let searchFormState = reactive({})
|
let searchFormState = reactive({})
|
||||||
|
@ -59,24 +59,22 @@
|
|||||||
}
|
}
|
||||||
// 验证并提交数据
|
// 验证并提交数据
|
||||||
const onSubmit = () => {
|
const onSubmit = () => {
|
||||||
formRef.value
|
formRef.value.validate().then(() => {
|
||||||
.validate()
|
submitLoading.value = true
|
||||||
.then(() => {
|
let submitParam = cloneDeep(formData.value)
|
||||||
submitLoading.value = true
|
const param = Object.entries(submitParam).map((item) => {
|
||||||
let submitParam = cloneDeep(formData.value)
|
return {
|
||||||
const param = Object.entries(submitParam).map((item) => {
|
configKey: item[0],
|
||||||
return {
|
configValue: item[1]
|
||||||
configKey: item[0],
|
}
|
||||||
configValue: item[1]
|
|
||||||
}
|
|
||||||
})
|
|
||||||
configApi
|
|
||||||
.configEditForm(param)
|
|
||||||
.then(() => {})
|
|
||||||
.finally(() => {
|
|
||||||
submitLoading.value = false
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
configApi
|
||||||
|
.configEditForm(param)
|
||||||
|
.then(() => {})
|
||||||
|
.finally(() => {
|
||||||
|
submitLoading.value = false
|
||||||
|
})
|
||||||
|
})
|
||||||
}
|
}
|
||||||
const layout = {
|
const layout = {
|
||||||
labelCol: {
|
labelCol: {
|
||||||
|
@ -55,24 +55,22 @@
|
|||||||
}
|
}
|
||||||
// 验证并提交数据
|
// 验证并提交数据
|
||||||
const onSubmit = () => {
|
const onSubmit = () => {
|
||||||
formRef.value
|
formRef.value.validate().then(() => {
|
||||||
.validate()
|
submitLoading.value = true
|
||||||
.then(() => {
|
let submitParam = cloneDeep(formData.value)
|
||||||
submitLoading.value = true
|
const param = Object.entries(submitParam).map((item) => {
|
||||||
let submitParam = cloneDeep(formData.value)
|
return {
|
||||||
const param = Object.entries(submitParam).map((item) => {
|
configKey: item[0],
|
||||||
return {
|
configValue: item[1]
|
||||||
configKey: item[0],
|
}
|
||||||
configValue: item[1]
|
|
||||||
}
|
|
||||||
})
|
|
||||||
configApi
|
|
||||||
.configEditForm(param)
|
|
||||||
.then(() => {})
|
|
||||||
.finally(() => {
|
|
||||||
submitLoading.value = false
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
configApi
|
||||||
|
.configEditForm(param)
|
||||||
|
.then(() => {})
|
||||||
|
.finally(() => {
|
||||||
|
submitLoading.value = false
|
||||||
|
})
|
||||||
|
})
|
||||||
}
|
}
|
||||||
const layout = {
|
const layout = {
|
||||||
labelCol: {
|
labelCol: {
|
||||||
|
@ -63,24 +63,22 @@
|
|||||||
}
|
}
|
||||||
// 验证并提交数据
|
// 验证并提交数据
|
||||||
const onSubmit = () => {
|
const onSubmit = () => {
|
||||||
formRef.value
|
formRef.value.validate().then(() => {
|
||||||
.validate()
|
submitLoading.value = true
|
||||||
.then(() => {
|
let submitParam = cloneDeep(formData.value)
|
||||||
submitLoading.value = true
|
const param = Object.entries(submitParam).map((item) => {
|
||||||
let submitParam = cloneDeep(formData.value)
|
return {
|
||||||
const param = Object.entries(submitParam).map((item) => {
|
configKey: item[0],
|
||||||
return {
|
configValue: item[1]
|
||||||
configKey: item[0],
|
}
|
||||||
configValue: item[1]
|
|
||||||
}
|
|
||||||
})
|
|
||||||
configApi
|
|
||||||
.configEditForm(param)
|
|
||||||
.then(() => {})
|
|
||||||
.finally(() => {
|
|
||||||
submitLoading.value = false
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
configApi
|
||||||
|
.configEditForm(param)
|
||||||
|
.then(() => {})
|
||||||
|
.finally(() => {
|
||||||
|
submitLoading.value = false
|
||||||
|
})
|
||||||
|
})
|
||||||
}
|
}
|
||||||
const layout = {
|
const layout = {
|
||||||
labelCol: {
|
labelCol: {
|
||||||
|
@ -55,24 +55,22 @@
|
|||||||
}
|
}
|
||||||
// 验证并提交数据
|
// 验证并提交数据
|
||||||
const onSubmit = () => {
|
const onSubmit = () => {
|
||||||
formRef.value
|
formRef.value.validate().then(() => {
|
||||||
.validate()
|
submitLoading.value = true
|
||||||
.then(() => {
|
let submitParam = cloneDeep(formData.value)
|
||||||
submitLoading.value = true
|
const param = Object.entries(submitParam).map((item) => {
|
||||||
let submitParam = cloneDeep(formData.value)
|
return {
|
||||||
const param = Object.entries(submitParam).map((item) => {
|
configKey: item[0],
|
||||||
return {
|
configValue: item[1]
|
||||||
configKey: item[0],
|
}
|
||||||
configValue: item[1]
|
|
||||||
}
|
|
||||||
})
|
|
||||||
configApi
|
|
||||||
.configEditForm(param)
|
|
||||||
.then(() => {})
|
|
||||||
.finally(() => {
|
|
||||||
submitLoading.value = false
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
configApi
|
||||||
|
.configEditForm(param)
|
||||||
|
.then(() => {})
|
||||||
|
.finally(() => {
|
||||||
|
submitLoading.value = false
|
||||||
|
})
|
||||||
|
})
|
||||||
}
|
}
|
||||||
const layout = {
|
const layout = {
|
||||||
labelCol: {
|
labelCol: {
|
||||||
|
@ -63,24 +63,22 @@
|
|||||||
}
|
}
|
||||||
// 验证并提交数据
|
// 验证并提交数据
|
||||||
const onSubmit = () => {
|
const onSubmit = () => {
|
||||||
formRef.value
|
formRef.value.validate().then(() => {
|
||||||
.validate()
|
submitLoading.value = true
|
||||||
.then(() => {
|
let submitParam = cloneDeep(formData.value)
|
||||||
submitLoading.value = true
|
const param = Object.entries(submitParam).map((item) => {
|
||||||
let submitParam = cloneDeep(formData.value)
|
return {
|
||||||
const param = Object.entries(submitParam).map((item) => {
|
configKey: item[0],
|
||||||
return {
|
configValue: item[1]
|
||||||
configKey: item[0],
|
}
|
||||||
configValue: item[1]
|
|
||||||
}
|
|
||||||
})
|
|
||||||
configApi
|
|
||||||
.configEditForm(param)
|
|
||||||
.then(() => {})
|
|
||||||
.finally(() => {
|
|
||||||
submitLoading.value = false
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
configApi
|
||||||
|
.configEditForm(param)
|
||||||
|
.then(() => {})
|
||||||
|
.finally(() => {
|
||||||
|
submitLoading.value = false
|
||||||
|
})
|
||||||
|
})
|
||||||
}
|
}
|
||||||
const layout = {
|
const layout = {
|
||||||
labelCol: {
|
labelCol: {
|
||||||
|
@ -63,24 +63,22 @@
|
|||||||
}
|
}
|
||||||
// 验证并提交数据
|
// 验证并提交数据
|
||||||
const onSubmit = () => {
|
const onSubmit = () => {
|
||||||
formRef.value
|
formRef.value.validate().then(() => {
|
||||||
.validate()
|
submitLoading.value = true
|
||||||
.then(() => {
|
let submitParam = cloneDeep(formData.value)
|
||||||
submitLoading.value = true
|
const param = Object.entries(submitParam).map((item) => {
|
||||||
let submitParam = cloneDeep(formData.value)
|
return {
|
||||||
const param = Object.entries(submitParam).map((item) => {
|
configKey: item[0],
|
||||||
return {
|
configValue: item[1]
|
||||||
configKey: item[0],
|
}
|
||||||
configValue: item[1]
|
|
||||||
}
|
|
||||||
})
|
|
||||||
configApi
|
|
||||||
.configEditForm(param)
|
|
||||||
.then(() => {})
|
|
||||||
.finally(() => {
|
|
||||||
submitLoading.value = false
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
configApi
|
||||||
|
.configEditForm(param)
|
||||||
|
.then(() => {})
|
||||||
|
.finally(() => {
|
||||||
|
submitLoading.value = false
|
||||||
|
})
|
||||||
|
})
|
||||||
}
|
}
|
||||||
const layout = {
|
const layout = {
|
||||||
labelCol: {
|
labelCol: {
|
||||||
|
@ -68,20 +68,18 @@
|
|||||||
|
|
||||||
// 验证并提交数据
|
// 验证并提交数据
|
||||||
const onSubmit = () => {
|
const onSubmit = () => {
|
||||||
formRef.value
|
formRef.value.validate().then(() => {
|
||||||
.validate()
|
submitLoading.value = true
|
||||||
.then(() => {
|
configApi
|
||||||
submitLoading.value = true
|
.submitForm(formData.value, !formData.value.id)
|
||||||
configApi
|
.then(() => {
|
||||||
.submitForm(formData.value, !formData.value.id)
|
onClose()
|
||||||
.then(() => {
|
emit('successful')
|
||||||
onClose()
|
})
|
||||||
emit('successful')
|
.finally(() => {
|
||||||
})
|
submitLoading.value = false
|
||||||
.finally(() => {
|
})
|
||||||
submitLoading.value = false
|
})
|
||||||
})
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 调用这个函数将子组件的一些数据和方法暴露出去
|
// 调用这个函数将子组件的一些数据和方法暴露出去
|
||||||
|
@ -63,24 +63,22 @@
|
|||||||
}
|
}
|
||||||
// 验证并提交数据
|
// 验证并提交数据
|
||||||
const onSubmit = () => {
|
const onSubmit = () => {
|
||||||
formRef.value
|
formRef.value.validate().then(() => {
|
||||||
.validate()
|
submitLoading.value = true
|
||||||
.then(() => {
|
let submitParam = cloneDeep(formData.value)
|
||||||
submitLoading.value = true
|
const param = Object.entries(submitParam).map((item) => {
|
||||||
let submitParam = cloneDeep(formData.value)
|
return {
|
||||||
const param = Object.entries(submitParam).map((item) => {
|
configKey: item[0],
|
||||||
return {
|
configValue: item[1]
|
||||||
configKey: item[0],
|
}
|
||||||
configValue: item[1]
|
|
||||||
}
|
|
||||||
})
|
|
||||||
configApi
|
|
||||||
.configEditForm(param)
|
|
||||||
.then(() => {})
|
|
||||||
.finally(() => {
|
|
||||||
submitLoading.value = false
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
configApi
|
||||||
|
.configEditForm(param)
|
||||||
|
.then(() => {})
|
||||||
|
.finally(() => {
|
||||||
|
submitLoading.value = false
|
||||||
|
})
|
||||||
|
})
|
||||||
}
|
}
|
||||||
const layout = {
|
const layout = {
|
||||||
labelCol: {
|
labelCol: {
|
||||||
|
@ -67,24 +67,22 @@
|
|||||||
}
|
}
|
||||||
// 验证并提交数据
|
// 验证并提交数据
|
||||||
const onSubmit = () => {
|
const onSubmit = () => {
|
||||||
formRef.value
|
formRef.value.validate().then(() => {
|
||||||
.validate()
|
submitLoading.value = true
|
||||||
.then(() => {
|
let submitParam = cloneDeep(formData.value)
|
||||||
submitLoading.value = true
|
const param = Object.entries(submitParam).map((item) => {
|
||||||
let submitParam = cloneDeep(formData.value)
|
return {
|
||||||
const param = Object.entries(submitParam).map((item) => {
|
configKey: item[0],
|
||||||
return {
|
configValue: item[1]
|
||||||
configKey: item[0],
|
}
|
||||||
configValue: item[1]
|
|
||||||
}
|
|
||||||
})
|
|
||||||
configApi
|
|
||||||
.configEditForm(param)
|
|
||||||
.then(() => {})
|
|
||||||
.finally(() => {
|
|
||||||
submitLoading.value = false
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
configApi
|
||||||
|
.configEditForm(param)
|
||||||
|
.then(() => {})
|
||||||
|
.finally(() => {
|
||||||
|
submitLoading.value = false
|
||||||
|
})
|
||||||
|
})
|
||||||
}
|
}
|
||||||
const layout = {
|
const layout = {
|
||||||
labelCol: {
|
labelCol: {
|
||||||
|
@ -140,19 +140,9 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
// 文件引擎
|
// 文件引擎
|
||||||
const fileEngineOptions = tool.dictTypeList('FILE_ENGINE').map((item) => {
|
const fileEngineOptions = tool.dictList('FILE_ENGINE')
|
||||||
return {
|
|
||||||
value: item['dictValue'],
|
|
||||||
label: item['name']
|
|
||||||
}
|
|
||||||
})
|
|
||||||
// 开关
|
// 开关
|
||||||
const commonSwitchOptions = tool.dictTypeList('COMMON_SWITCH').map((item) => {
|
const commonSwitchOptions = tool.dictList('COMMON_SWITCH')
|
||||||
return {
|
|
||||||
value: item['dictValue'],
|
|
||||||
label: item['name']
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
const customRequest = (data) => {
|
const customRequest = (data) => {
|
||||||
formData.value.SNOWY_SYS_LOGO = ref([])
|
formData.value.SNOWY_SYS_LOGO = ref([])
|
||||||
|
@ -59,24 +59,22 @@
|
|||||||
}
|
}
|
||||||
// 验证并提交数据
|
// 验证并提交数据
|
||||||
const onSubmit = () => {
|
const onSubmit = () => {
|
||||||
formRef.value
|
formRef.value.validate().then(() => {
|
||||||
.validate()
|
submitLoading.value = true
|
||||||
.then(() => {
|
let submitParam = cloneDeep(formData.value)
|
||||||
submitLoading.value = true
|
const param = Object.entries(submitParam).map((item) => {
|
||||||
let submitParam = cloneDeep(formData.value)
|
return {
|
||||||
const param = Object.entries(submitParam).map((item) => {
|
configKey: item[0],
|
||||||
return {
|
configValue: item[1]
|
||||||
configKey: item[0],
|
}
|
||||||
configValue: item[1]
|
|
||||||
}
|
|
||||||
})
|
|
||||||
configApi
|
|
||||||
.configEditForm(param)
|
|
||||||
.then(() => {})
|
|
||||||
.finally(() => {
|
|
||||||
submitLoading.value = false
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
configApi
|
||||||
|
.configEditForm(param)
|
||||||
|
.then(() => {})
|
||||||
|
.finally(() => {
|
||||||
|
submitLoading.value = false
|
||||||
|
})
|
||||||
|
})
|
||||||
}
|
}
|
||||||
const layout = {
|
const layout = {
|
||||||
labelCol: {
|
labelCol: {
|
||||||
|
@ -59,24 +59,22 @@
|
|||||||
}
|
}
|
||||||
// 验证并提交数据
|
// 验证并提交数据
|
||||||
const onSubmit = () => {
|
const onSubmit = () => {
|
||||||
formRef.value
|
formRef.value.validate().then(() => {
|
||||||
.validate()
|
submitLoading.value = true
|
||||||
.then(() => {
|
let submitParam = cloneDeep(formData.value)
|
||||||
submitLoading.value = true
|
const param = Object.entries(submitParam).map((item) => {
|
||||||
let submitParam = cloneDeep(formData.value)
|
return {
|
||||||
const param = Object.entries(submitParam).map((item) => {
|
configKey: item[0],
|
||||||
return {
|
configValue: item[1]
|
||||||
configKey: item[0],
|
}
|
||||||
configValue: item[1]
|
|
||||||
}
|
|
||||||
})
|
|
||||||
configApi
|
|
||||||
.configEditForm(param)
|
|
||||||
.then(() => {})
|
|
||||||
.finally(() => {
|
|
||||||
submitLoading.value = false
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
configApi
|
||||||
|
.configEditForm(param)
|
||||||
|
.then(() => {})
|
||||||
|
.finally(() => {
|
||||||
|
submitLoading.value = false
|
||||||
|
})
|
||||||
|
})
|
||||||
}
|
}
|
||||||
const layout = {
|
const layout = {
|
||||||
labelCol: {
|
labelCol: {
|
||||||
|
@ -31,7 +31,12 @@
|
|||||||
<a-input v-model:value="formData.dictLabel" placeholder="请输入字典名称" allow-clear />
|
<a-input v-model:value="formData.dictLabel" placeholder="请输入字典名称" allow-clear />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="字典值:" name="dictValue">
|
<a-form-item label="字典值:" name="dictValue">
|
||||||
<a-input v-model:value="formData.dictValue" placeholder="请输入字典值" allow-clear :disabled="formData.parentId === '0'"/>
|
<a-input
|
||||||
|
v-model:value="formData.dictValue"
|
||||||
|
placeholder="请输入字典值"
|
||||||
|
allow-clear
|
||||||
|
:disabled="formData.parentId === '0'"
|
||||||
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="排序:" name="sortCode">
|
<a-form-item label="排序:" name="sortCode">
|
||||||
<a-slider v-model:value="formData.sortCode" :max="100" />
|
<a-slider v-model:value="formData.sortCode" :max="100" />
|
||||||
@ -104,14 +109,12 @@
|
|||||||
})
|
})
|
||||||
// 验证并提交数据
|
// 验证并提交数据
|
||||||
const onSubmit = () => {
|
const onSubmit = () => {
|
||||||
formRef.value
|
formRef.value.validate().then(() => {
|
||||||
.validate()
|
dictApi.submitForm(formData.value, !formData.value.id).then(() => {
|
||||||
.then(() => {
|
visible = false
|
||||||
dictApi.submitForm(formData.value, !formData.value.id).then(() => {
|
emit('successful')
|
||||||
visible = false
|
|
||||||
emit('successful')
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
})
|
||||||
}
|
}
|
||||||
// 调用这个函数将子组件的一些数据和方法暴露出去
|
// 调用这个函数将子组件的一些数据和方法暴露出去
|
||||||
defineExpose({
|
defineExpose({
|
||||||
|
@ -70,16 +70,14 @@
|
|||||||
|
|
||||||
<script setup name="devEmail">
|
<script setup name="devEmail">
|
||||||
import { message } from 'ant-design-vue'
|
import { message } from 'ant-design-vue'
|
||||||
|
import tool from '@/utils/tool'
|
||||||
import emailApi from '@/api/dev/emailApi'
|
import emailApi from '@/api/dev/emailApi'
|
||||||
import Form from './form.vue'
|
import Form from './form.vue'
|
||||||
import { getCurrentInstance } from 'vue'
|
|
||||||
import detail from './detail.vue'
|
import detail from './detail.vue'
|
||||||
const { proxy } = getCurrentInstance()
|
|
||||||
const table = ref(null)
|
const table = ref(null)
|
||||||
const form = ref()
|
const form = ref()
|
||||||
const searchFormRef = ref()
|
const searchFormRef = ref()
|
||||||
let searchFormState = reactive({})
|
let searchFormState = reactive({})
|
||||||
const deleteLoading = ref(false)
|
|
||||||
const detailRef = ref()
|
const detailRef = ref()
|
||||||
|
|
||||||
const columns = [
|
const columns = [
|
||||||
@ -140,12 +138,7 @@
|
|||||||
return data
|
return data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const engineOptions = proxy.$TOOL.dictTypeList('EMAIL_ENGINE').map((item) => {
|
const engineOptions = tool.dictList('EMAIL_ENGINE')
|
||||||
return {
|
|
||||||
value: item['dictValue'],
|
|
||||||
label: item['name']
|
|
||||||
}
|
|
||||||
})
|
|
||||||
// 删除
|
// 删除
|
||||||
const deleteEmail = (record) => {
|
const deleteEmail = (record) => {
|
||||||
let params = [
|
let params = [
|
||||||
|
@ -4,13 +4,12 @@
|
|||||||
<a-row :gutter="24">
|
<a-row :gutter="24">
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-form-item name="searchKey" label="名称关键词">
|
<a-form-item name="searchKey" label="名称关键词">
|
||||||
<a-input v-model:value="searchFormState.searchKey" placeholder="请输入文件名称关键词"></a-input>
|
<a-input v-model:value="searchFormState.searchKey" placeholder="请输入文件名称关键词" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-form-item name="engine" label="存储位置">
|
<a-form-item name="engine" label="存储位置">
|
||||||
<a-select v-model:value="searchFormState.engine" placeholder="请选择存储位置" :options="engineOptions">
|
<a-select v-model:value="searchFormState.engine" placeholder="请选择存储位置" :options="engineOptions" />
|
||||||
</a-select>
|
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
@ -197,12 +196,7 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 存储位置
|
// 存储位置
|
||||||
const engineOptions = tool.dictTypeList('FILE_ENGINE').map((item) => {
|
const engineOptions = tool.dictList('FILE_ENGINE')
|
||||||
return {
|
|
||||||
value: item['dictValue'],
|
|
||||||
label: item['name']
|
|
||||||
}
|
|
||||||
})
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
@ -13,14 +13,13 @@
|
|||||||
<a-input v-model:value="formData.name" placeholder="请输入定时任务名称" allow-clear />
|
<a-input v-model:value="formData.name" placeholder="请输入定时任务名称" allow-clear />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="分类:" name="category">
|
<a-form-item label="分类:" name="category">
|
||||||
<a-select v-model:value="formData.category" placeholder="请选择分类" :options="categoryOptions"> </a-select>
|
<a-select v-model:value="formData.category" placeholder="请选择分类" :options="categoryOptions" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="任务类名:" name="actionClass">
|
<a-form-item label="任务类名:" name="actionClass">
|
||||||
<a-select v-model:value="formData.actionClass" placeholder="请选择任务类名" :options="actionClassOptions">
|
<a-select v-model:value="formData.actionClass" placeholder="请选择任务类名" :options="actionClassOptions" />
|
||||||
</a-select>
|
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="表达式:" name="cronExpression">
|
<a-form-item label="表达式:" name="cronExpression">
|
||||||
<cron v-model:modelValue="formData.cronExpression"></cron>
|
<cron v-model:modelValue="formData.cronExpression" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="排序:" name="sortCode">
|
<a-form-item label="排序:" name="sortCode">
|
||||||
<a-slider v-model:value="formData.sortCode" :max="100" />
|
<a-slider v-model:value="formData.sortCode" :max="100" />
|
||||||
@ -98,12 +97,7 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 分类
|
// 分类
|
||||||
const categoryOptions = tool.dictTypeList('JOB_CATEGORY').map((item) => {
|
const categoryOptions = tool.dictList('JOB_CATEGORY')
|
||||||
return {
|
|
||||||
value: item['dictValue'],
|
|
||||||
label: item['name']
|
|
||||||
}
|
|
||||||
})
|
|
||||||
// 调用这个函数将子组件的一些数据和方法暴露出去
|
// 调用这个函数将子组件的一些数据和方法暴露出去
|
||||||
defineExpose({
|
defineExpose({
|
||||||
onOpen
|
onOpen
|
||||||
|
@ -4,19 +4,17 @@
|
|||||||
<a-row :gutter="24">
|
<a-row :gutter="24">
|
||||||
<a-col :span="6">
|
<a-col :span="6">
|
||||||
<a-form-item label="关键字" name="searchKey">
|
<a-form-item label="关键字" name="searchKey">
|
||||||
<a-input v-model:value="searchFormState.searchKey" placeholder="请输入关键字"></a-input>
|
<a-input v-model:value="searchFormState.searchKey" placeholder="请输入关键字" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="6">
|
<a-col :span="6">
|
||||||
<a-form-item label="分类" name="category">
|
<a-form-item label="分类" name="category">
|
||||||
<a-select v-model:value="searchFormState.category" placeholder="请选择分类" :options="categoryOptions">
|
<a-select v-model:value="searchFormState.category" placeholder="请选择分类" :options="categoryOptions" />
|
||||||
</a-select>
|
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="6">
|
<a-col :span="6">
|
||||||
<a-form-item label="状态" name="jobStatus">
|
<a-form-item label="状态" name="jobStatus">
|
||||||
<a-select v-model:value="searchFormState.jobStatus" placeholder="请选择状态" :options="jobStatusOptions">
|
<a-select v-model:value="searchFormState.jobStatus" placeholder="请选择状态" :options="jobStatusOptions" />
|
||||||
</a-select>
|
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="6">
|
<a-col :span="6">
|
||||||
@ -207,17 +205,7 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 分类
|
// 分类
|
||||||
const categoryOptions = tool.dictTypeList('JOB_CATEGORY').map((item) => {
|
const categoryOptions = tool.dictList('JOB_CATEGORY')
|
||||||
return {
|
|
||||||
value: item['dictValue'],
|
|
||||||
label: item['name']
|
|
||||||
}
|
|
||||||
})
|
|
||||||
// 状态
|
// 状态
|
||||||
const jobStatusOptions = tool.dictTypeList('JOB_STATUS').map((item) => {
|
const jobStatusOptions = tool.dictList('JOB_STATUS')
|
||||||
return {
|
|
||||||
value: item['dictValue'],
|
|
||||||
label: item['name']
|
|
||||||
}
|
|
||||||
})
|
|
||||||
</script>
|
</script>
|
||||||
|
@ -18,8 +18,7 @@
|
|||||||
:options="categoryOptions"
|
:options="categoryOptions"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
placeholder="请选择站内信分类"
|
placeholder="请选择站内信分类"
|
||||||
>
|
/>
|
||||||
</a-select>
|
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="正文:" name="content">
|
<a-form-item label="正文:" name="content">
|
||||||
<a-textarea v-model:value="formData.content" placeholder="请输入正文" :auto-size="{ minRows: 5, maxRows: 5 }" />
|
<a-textarea v-model:value="formData.content" placeholder="请输入正文" :auto-size="{ minRows: 5, maxRows: 5 }" />
|
||||||
@ -27,7 +26,7 @@
|
|||||||
<a-form-item label="接收人:" name="receiverIdList">
|
<a-form-item label="接收人:" name="receiverIdList">
|
||||||
<a-button type="primary" @click="openUserSelector">选择人员</a-button>
|
<a-button type="primary" @click="openUserSelector">选择人员</a-button>
|
||||||
<br />
|
<br />
|
||||||
<a-tag class="mt-3" v-for="(user, index) in userList" color="cyan" closable @close="removeUserTag(index)">{{
|
<a-tag class="mt-3" v-for="(user, index) in userList" color="cyan" :key="index" @close="removeUserTag(index)">{{
|
||||||
user.name
|
user.name
|
||||||
}}</a-tag>
|
}}</a-tag>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
@ -50,12 +49,12 @@
|
|||||||
import { message } from 'ant-design-vue'
|
import { message } from 'ant-design-vue'
|
||||||
import messageApi from '@/api/dev/messageApi'
|
import messageApi from '@/api/dev/messageApi'
|
||||||
import userSelectorPlus from '@/components/Selector/userSelectorPlus.vue'
|
import userSelectorPlus from '@/components/Selector/userSelectorPlus.vue'
|
||||||
|
import tool from '@/utils/tool'
|
||||||
|
|
||||||
const sendLoading = ref(false)
|
const sendLoading = ref(false)
|
||||||
let UserSelectorPlus = ref()
|
let UserSelectorPlus = ref()
|
||||||
// 定义emit事件
|
// 定义emit事件
|
||||||
const emit = defineEmits({ successful: null })
|
const emit = defineEmits({ successful: null })
|
||||||
const { proxy } = getCurrentInstance()
|
|
||||||
// 默认是关闭状态
|
// 默认是关闭状态
|
||||||
let visible = $ref(false)
|
let visible = $ref(false)
|
||||||
const formRef = ref()
|
const formRef = ref()
|
||||||
@ -78,12 +77,7 @@
|
|||||||
category: [required('请选择站内信分类')]
|
category: [required('请选择站内信分类')]
|
||||||
}
|
}
|
||||||
// 站内信分类字典
|
// 站内信分类字典
|
||||||
let categoryOptions = proxy.$TOOL.dictTypeList('MESSAGE_CATEGORY').map((item) => {
|
const categoryOptions = tool.dictList('MESSAGE_CATEGORY')
|
||||||
return {
|
|
||||||
value: item['dictValue'],
|
|
||||||
label: item['name']
|
|
||||||
}
|
|
||||||
})
|
|
||||||
// 打开人员选择器
|
// 打开人员选择器
|
||||||
const openUserSelector = () => {
|
const openUserSelector = () => {
|
||||||
let ids = []
|
let ids = []
|
||||||
|
@ -72,10 +72,9 @@
|
|||||||
import { message } from 'ant-design-vue'
|
import { message } from 'ant-design-vue'
|
||||||
import smsApi from '@/api/dev/smsApi'
|
import smsApi from '@/api/dev/smsApi'
|
||||||
import Form from './form.vue'
|
import Form from './form.vue'
|
||||||
import { getCurrentInstance } from 'vue'
|
|
||||||
import detail from './detail.vue'
|
import detail from './detail.vue'
|
||||||
|
import tool from '@/utils/tool'
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance()
|
|
||||||
const table = ref(null)
|
const table = ref(null)
|
||||||
const form = ref()
|
const form = ref()
|
||||||
const searchFormRef = ref()
|
const searchFormRef = ref()
|
||||||
@ -140,12 +139,7 @@
|
|||||||
return data
|
return data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const engineOptions = proxy.$TOOL.dictTypeList('SMS_ENGINE').map((item) => {
|
const engineOptions = tool.dictList('SMS_ENGINE')
|
||||||
return {
|
|
||||||
value: item['dictValue'],
|
|
||||||
label: item['name']
|
|
||||||
}
|
|
||||||
})
|
|
||||||
// 删除
|
// 删除
|
||||||
const deleteSms = (record) => {
|
const deleteSms = (record) => {
|
||||||
let params = [
|
let params = [
|
||||||
|
@ -48,20 +48,18 @@
|
|||||||
}
|
}
|
||||||
// 发送短信
|
// 发送短信
|
||||||
const send = () => {
|
const send = () => {
|
||||||
formRef.value
|
formRef.value.validate().then(() => {
|
||||||
.validate()
|
emit('loadingStart')
|
||||||
.then(() => {
|
smsApi
|
||||||
emit('loadingStart')
|
.smsSendAliyun(formData.value)
|
||||||
smsApi
|
.then(() => {
|
||||||
.smsSendAliyun(formData.value)
|
message.success('发送成功')
|
||||||
.then(() => {
|
})
|
||||||
message.success('发送成功')
|
.catch(() => {})
|
||||||
})
|
.finally(() => {
|
||||||
.catch(() => {})
|
emit('loadingEnd')
|
||||||
.finally(() => {
|
})
|
||||||
emit('loadingEnd')
|
})
|
||||||
})
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
// 调用这个函数将子组件的一些数据和方法暴露出去
|
// 调用这个函数将子组件的一些数据和方法暴露出去
|
||||||
defineExpose({
|
defineExpose({
|
||||||
|
@ -52,20 +52,18 @@
|
|||||||
templateCode: [required('请输入短信服务控制台配置且审核通过的模板编码')]
|
templateCode: [required('请输入短信服务控制台配置且审核通过的模板编码')]
|
||||||
}
|
}
|
||||||
const send = () => {
|
const send = () => {
|
||||||
formRef.value
|
formRef.value.validate().then(() => {
|
||||||
.validate()
|
emit('loadingStart')
|
||||||
.then(() => {
|
smsApi
|
||||||
emit('loadingStart')
|
.smsSendTencent(formData.value)
|
||||||
smsApi
|
.then(() => {
|
||||||
.smsSendTencent(formData.value)
|
message.success('发送成功')
|
||||||
.then(() => {
|
})
|
||||||
message.success('发送成功')
|
.catch(() => {})
|
||||||
})
|
.finally(() => {
|
||||||
.catch(() => {})
|
emit('loadingEnd')
|
||||||
.finally(() => {
|
})
|
||||||
emit('loadingEnd')
|
})
|
||||||
})
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
// 调用这个函数将子组件的一些数据和方法暴露出去
|
// 调用这个函数将子组件的一些数据和方法暴露出去
|
||||||
defineExpose({
|
defineExpose({
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<a-card>
|
<a-card>
|
||||||
<a-button type="primary" @click="jump">
|
<a-button type="primary" @click="jump"> 跳转自己并带参数 </a-button>
|
||||||
跳转自己并带参数
|
|
||||||
</a-button>
|
|
||||||
当然也可以跳到指定的路由啦
|
当然也可以跳到指定的路由啦
|
||||||
</a-card>
|
</a-card>
|
||||||
</template>
|
</template>
|
||||||
|
@ -1,33 +1,33 @@
|
|||||||
<template>
|
<template>
|
||||||
<a-carousel class="snowy-right-card-one" autoplay arrows>
|
<a-carousel class="snowy-right-card-one" autoplay arrows>
|
||||||
<template #prevArrow>
|
<template #prevArrow>
|
||||||
<div class="custom-slick-arrow" style="left: 10px; z-index: 1">
|
<div class="custom-slick-arrow" style="left: 10px; z-index: 1">
|
||||||
<left-circle-outlined />
|
<left-circle-outlined />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template #nextArrow>
|
<template #nextArrow>
|
||||||
<div class="custom-slick-arrow" style="right: 10px">
|
<div class="custom-slick-arrow" style="right: 10px">
|
||||||
<right-circle-outlined />
|
<right-circle-outlined />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<img
|
<img
|
||||||
src="/src/assets/images/index_001.png"
|
src="/src/assets/images/index_001.png"
|
||||||
class="carousel-images"
|
class="carousel-images"
|
||||||
@click="leaveForOpen('https://www.xiaonuo.vip')"
|
@click="leaveForOpen('https://www.xiaonuo.vip')"
|
||||||
/>
|
/>
|
||||||
<img
|
<img
|
||||||
src="/src/assets/images/index_002.png"
|
src="/src/assets/images/index_002.png"
|
||||||
class="carousel-images"
|
class="carousel-images"
|
||||||
@click="leaveForOpen('https://www.xiaonuo.vip')"
|
@click="leaveForOpen('https://www.xiaonuo.vip')"
|
||||||
/>
|
/>
|
||||||
<!--
|
<!--
|
||||||
<img v-for="(item, index) in carouselList"
|
<img v-for="(item, index) in carouselList"
|
||||||
:src="item.images"
|
:src="item.images"
|
||||||
class="carousel-images"
|
class="carousel-images"
|
||||||
@click="leaveForOpen(item.url)"
|
@click="leaveForOpen(item.url)"
|
||||||
/>
|
/>
|
||||||
-->
|
-->
|
||||||
</a-carousel>
|
</a-carousel>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup name="carousel">
|
<script setup name="carousel">
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
// 是否展示更多按钮
|
// 是否展示更多按钮
|
||||||
const displayMore = () => {
|
const displayMore = () => {
|
||||||
return (userInfo.roleCodeList && userInfo.roleCodeList.indexOf("super") !== -1)
|
return userInfo.roleCodeList && userInfo.roleCodeList.indexOf('super') !== -1
|
||||||
}
|
}
|
||||||
const seleOpLogList = () => {
|
const seleOpLogList = () => {
|
||||||
indexApi.indexOpLogList().then((data) => {
|
indexApi.indexOpLogList().then((data) => {
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
})
|
})
|
||||||
// 是否展示更多按钮
|
// 是否展示更多按钮
|
||||||
const displayMore = () => {
|
const displayMore = () => {
|
||||||
return (userInfo.roleCodeList && userInfo.roleCodeList.indexOf("super") !== -1)
|
return userInfo.roleCodeList && userInfo.roleCodeList.indexOf('super') !== -1
|
||||||
}
|
}
|
||||||
// 查询数据
|
// 查询数据
|
||||||
const seleVisLogList = () => {
|
const seleVisLogList = () => {
|
||||||
|
@ -36,8 +36,7 @@
|
|||||||
:options="orgCategoryOptions"
|
:options="orgCategoryOptions"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
placeholder="请选择组织分类"
|
placeholder="请选择组织分类"
|
||||||
>
|
/>
|
||||||
</a-select>
|
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="排序:" name="sortCode">
|
<a-form-item label="排序:" name="sortCode">
|
||||||
<a-slider v-model:value="formData.sortCode" :max="100" />
|
<a-slider v-model:value="formData.sortCode" :max="100" />
|
||||||
@ -68,12 +67,11 @@
|
|||||||
import { required } from '@/utils/formRules'
|
import { required } from '@/utils/formRules'
|
||||||
import { message } from 'ant-design-vue'
|
import { message } from 'ant-design-vue'
|
||||||
import orgApi from '@/api/sys/orgApi'
|
import orgApi from '@/api/sys/orgApi'
|
||||||
import { getCurrentInstance } from 'vue'
|
|
||||||
import userSelectorPlus from '@/components/Selector/userSelectorPlus.vue'
|
import userSelectorPlus from '@/components/Selector/userSelectorPlus.vue'
|
||||||
|
import tool from '@/utils/tool'
|
||||||
|
|
||||||
// 定义emit事件
|
// 定义emit事件
|
||||||
const emit = defineEmits({ successful: null })
|
const emit = defineEmits({ successful: null })
|
||||||
const { proxy } = getCurrentInstance()
|
|
||||||
// 默认是关闭状态
|
// 默认是关闭状态
|
||||||
let visible = $ref(false)
|
let visible = $ref(false)
|
||||||
let UserSelectorPlus = ref()
|
let UserSelectorPlus = ref()
|
||||||
@ -124,12 +122,7 @@
|
|||||||
sortCode: [required('请选择排序')]
|
sortCode: [required('请选择排序')]
|
||||||
}
|
}
|
||||||
// 机构分类字典
|
// 机构分类字典
|
||||||
let orgCategoryOptions = proxy.$TOOL.dictTypeList('ORG_CATEGORY').map((item) => {
|
const orgCategoryOptions = tool.dictList('ORG_CATEGORY')
|
||||||
return {
|
|
||||||
value: item['dictValue'],
|
|
||||||
label: item['name']
|
|
||||||
}
|
|
||||||
})
|
|
||||||
// 打开人员选择器,选择主管
|
// 打开人员选择器,选择主管
|
||||||
const openSelector = (id) => {
|
const openSelector = (id) => {
|
||||||
let checkedUserIds = []
|
let checkedUserIds = []
|
||||||
@ -152,21 +145,19 @@
|
|||||||
}
|
}
|
||||||
// 验证并提交数据
|
// 验证并提交数据
|
||||||
const onSubmit = () => {
|
const onSubmit = () => {
|
||||||
formRef.value
|
formRef.value.validate().then(() => {
|
||||||
.validate()
|
submitLoading.value = true
|
||||||
.then(() => {
|
formData.value.extJson = JSON.stringify(extJson.value)
|
||||||
submitLoading.value = true
|
orgApi
|
||||||
formData.value.extJson = JSON.stringify(extJson.value)
|
.submitForm(formData.value, !formData.value.id)
|
||||||
orgApi
|
.then(() => {
|
||||||
.submitForm(formData.value, !formData.value.id)
|
visible = false
|
||||||
.then(() => {
|
emit('successful')
|
||||||
visible = false
|
})
|
||||||
emit('successful')
|
.finally(() => {
|
||||||
})
|
submitLoading.value = false
|
||||||
.finally(() => {
|
})
|
||||||
submitLoading.value = false
|
})
|
||||||
})
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
// 调用这个函数将子组件的一些数据和方法暴露出去
|
// 调用这个函数将子组件的一些数据和方法暴露出去
|
||||||
defineExpose({
|
defineExpose({
|
||||||
|
@ -36,8 +36,7 @@
|
|||||||
:options="positionCategoryOptions"
|
:options="positionCategoryOptions"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
placeholder="请选择职位分类"
|
placeholder="请选择职位分类"
|
||||||
>
|
/>
|
||||||
</a-select>
|
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="排序:" name="sortCode">
|
<a-form-item label="排序:" name="sortCode">
|
||||||
<a-slider v-model:value="formData.sortCode" :max="100" />
|
<a-slider v-model:value="formData.sortCode" :max="100" />
|
||||||
@ -52,14 +51,12 @@
|
|||||||
|
|
||||||
<script setup name="positionForm">
|
<script setup name="positionForm">
|
||||||
import { required } from '@/utils/formRules'
|
import { required } from '@/utils/formRules'
|
||||||
import { getCurrentInstance } from 'vue'
|
|
||||||
import { message } from 'ant-design-vue'
|
|
||||||
import orgApi from '@/api/sys/orgApi'
|
import orgApi from '@/api/sys/orgApi'
|
||||||
import positionApi from '@/api/sys/positionApi'
|
import positionApi from '@/api/sys/positionApi'
|
||||||
|
import tool from '@/utils/tool'
|
||||||
|
|
||||||
// 定义emit事件
|
// 定义emit事件
|
||||||
const emit = defineEmits({ successful: null })
|
const emit = defineEmits({ successful: null })
|
||||||
const { proxy } = getCurrentInstance()
|
|
||||||
// 默认是关闭状态
|
// 默认是关闭状态
|
||||||
let visible = $ref(false)
|
let visible = $ref(false)
|
||||||
const formRef = ref()
|
const formRef = ref()
|
||||||
@ -101,12 +98,7 @@
|
|||||||
category: [required('请选择职位分类')],
|
category: [required('请选择职位分类')],
|
||||||
sortCode: [required('请选择排序')]
|
sortCode: [required('请选择排序')]
|
||||||
}
|
}
|
||||||
let positionCategoryOptions = proxy.$TOOL.dictTypeList('POSITION_CATEGORY').map((item) => {
|
const positionCategoryOptions = tool.dictList('POSITION_CATEGORY')
|
||||||
return {
|
|
||||||
value: item['dictValue'],
|
|
||||||
label: item['name']
|
|
||||||
}
|
|
||||||
})
|
|
||||||
// 验证并提交数据
|
// 验证并提交数据
|
||||||
const onSubmit = () => {
|
const onSubmit = () => {
|
||||||
formRef.value.validate().then(() => {
|
formRef.value.validate().then(() => {
|
||||||
|
@ -18,8 +18,7 @@
|
|||||||
button-style="solid"
|
button-style="solid"
|
||||||
:options="categoryOptions"
|
:options="categoryOptions"
|
||||||
option-type="button"
|
option-type="button"
|
||||||
>
|
/>
|
||||||
</a-radio-group>
|
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="上级菜单:" name="parentId">
|
<a-form-item label="上级菜单:" name="parentId">
|
||||||
<a-tree-select
|
<a-tree-select
|
||||||
@ -39,7 +38,7 @@
|
|||||||
selectable="false"
|
selectable="false"
|
||||||
tree-line
|
tree-line
|
||||||
@change="parentChange(formData.parentId)"
|
@change="parentChange(formData.parentId)"
|
||||||
></a-tree-select>
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item v-if="formData.menuType !== 'CATALOG'" name="path">
|
<a-form-item v-if="formData.menuType !== 'CATALOG'" name="path">
|
||||||
<template #label>
|
<template #label>
|
||||||
@ -105,7 +104,6 @@
|
|||||||
import tool from '@/utils/tool'
|
import tool from '@/utils/tool'
|
||||||
import menuApi from '@/api/sys/resource/menuApi'
|
import menuApi from '@/api/sys/resource/menuApi'
|
||||||
import IconSelector from '@/components/Selector/iconSelector.vue'
|
import IconSelector from '@/components/Selector/iconSelector.vue'
|
||||||
import { getCurrentInstance } from 'vue'
|
|
||||||
// 默认是关闭状态
|
// 默认是关闭状态
|
||||||
let visible = $ref(false)
|
let visible = $ref(false)
|
||||||
const emit = defineEmits({ successful: null })
|
const emit = defineEmits({ successful: null })
|
||||||
@ -180,14 +178,7 @@
|
|||||||
component: [required('请输入组件地址')]
|
component: [required('请输入组件地址')]
|
||||||
}
|
}
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance()
|
const categoryOptions = tool.dictList('MENU_TYPE')
|
||||||
let categoryOptions = proxy.$TOOL.dictTypeList('MENU_TYPE').map((item) => {
|
|
||||||
return {
|
|
||||||
value: item['dictValue'],
|
|
||||||
label: item['name']
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
// 验证并提交数据
|
// 验证并提交数据
|
||||||
const onSubmit = () => {
|
const onSubmit = () => {
|
||||||
formRef.value
|
formRef.value
|
||||||
|
@ -18,8 +18,7 @@
|
|||||||
button-style="solid"
|
button-style="solid"
|
||||||
:options="categoryOptions"
|
:options="categoryOptions"
|
||||||
option-type="button"
|
option-type="button"
|
||||||
>
|
/>
|
||||||
</a-radio-group>
|
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|
||||||
<a-form-item name="path">
|
<a-form-item name="path">
|
||||||
@ -82,11 +81,10 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup name="spaForm">
|
<script setup name="spaForm">
|
||||||
import { message } from 'ant-design-vue'
|
|
||||||
import { required } from '@/utils/formRules'
|
import { required } from '@/utils/formRules'
|
||||||
import IconSelector from '@/components/Selector/iconSelector.vue'
|
import IconSelector from '@/components/Selector/iconSelector.vue'
|
||||||
import spaApi from '@/api/sys/resource/spaApi'
|
import spaApi from '@/api/sys/resource/spaApi'
|
||||||
import { getCurrentInstance } from 'vue'
|
import tool from '@/utils/tool'
|
||||||
// 默认是关闭状态
|
// 默认是关闭状态
|
||||||
let visible = $ref(false)
|
let visible = $ref(false)
|
||||||
const emit = defineEmits({ successful: null })
|
const emit = defineEmits({ successful: null })
|
||||||
@ -125,19 +123,18 @@
|
|||||||
const iconCallBack = (value) => {
|
const iconCallBack = (value) => {
|
||||||
formData.value.icon = value
|
formData.value.icon = value
|
||||||
}
|
}
|
||||||
const { proxy } = getCurrentInstance()
|
let categoryOptions = tool
|
||||||
let categoryOptions = proxy.$TOOL
|
.dictList('MENU_TYPE')
|
||||||
.dictTypeList('MENU_TYPE')
|
|
||||||
.filter((item) => {
|
.filter((item) => {
|
||||||
// 排除
|
// 排除
|
||||||
if (item.dictValue !== 'CATALOG') {
|
if (item.value !== 'CATALOG') {
|
||||||
return item
|
return item
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.map((item) => {
|
.map((item) => {
|
||||||
return {
|
return {
|
||||||
value: item['dictValue'],
|
value: item['value'],
|
||||||
label: item['name'] + '页'
|
label: item['label'] + '页'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<a-row :gutter="24">
|
<a-row :gutter="24">
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-form-item label="名称关键词" name="searchKey">
|
<a-form-item label="名称关键词" name="searchKey">
|
||||||
<a-input v-model:value="searchFormState.searchKey" placeholder="请输入单页名称关键词" allow-clear></a-input>
|
<a-input v-model:value="searchFormState.searchKey" placeholder="请输入单页名称关键词" allow-clear />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
@ -15,7 +15,7 @@
|
|||||||
:options="categoryOptions"
|
:options="categoryOptions"
|
||||||
placeholder="请选择类型"
|
placeholder="请选择类型"
|
||||||
allow-clear
|
allow-clear
|
||||||
></a-select>
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
@ -145,18 +145,18 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let categoryOptions = tool
|
const categoryOptions = tool
|
||||||
.dictTypeList('MENU_TYPE')
|
.dictList('MENU_TYPE')
|
||||||
.filter((item) => {
|
.filter((item) => {
|
||||||
// 排除
|
// 排除
|
||||||
if (item.dictValue !== 'CATALOG') {
|
if (item.value !== 'CATALOG') {
|
||||||
return item
|
return item
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.map((item) => {
|
.map((item) => {
|
||||||
return {
|
return {
|
||||||
value: item['dictValue'],
|
value: item['value'],
|
||||||
label: item['name'] + '页'
|
label: item['label'] + '页'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
// 列表数据
|
// 列表数据
|
||||||
|
@ -18,8 +18,7 @@
|
|||||||
:options="categoryOptions"
|
:options="categoryOptions"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
placeholder="请选择角色分类"
|
placeholder="请选择角色分类"
|
||||||
>
|
/>
|
||||||
</a-select>
|
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item v-if="formData.category === 'ORG'" label="所属机构:" name="orgId">
|
<a-form-item v-if="formData.category === 'ORG'" label="所属机构:" name="orgId">
|
||||||
<a-tree-select
|
<a-tree-select
|
||||||
@ -37,7 +36,7 @@
|
|||||||
}"
|
}"
|
||||||
selectable="false"
|
selectable="false"
|
||||||
tree-line
|
tree-line
|
||||||
></a-tree-select>
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="排序:" name="sortCode">
|
<a-form-item label="排序:" name="sortCode">
|
||||||
<a-slider v-model:value="formData.sortCode" :max="100" />
|
<a-slider v-model:value="formData.sortCode" :max="100" />
|
||||||
@ -52,13 +51,12 @@
|
|||||||
|
|
||||||
<script setup name="roleForm">
|
<script setup name="roleForm">
|
||||||
import { required } from '@/utils/formRules'
|
import { required } from '@/utils/formRules'
|
||||||
import { getCurrentInstance } from 'vue'
|
import tool from '@/utils/tool'
|
||||||
import orgApi from '@/api/sys/orgApi'
|
import orgApi from '@/api/sys/orgApi'
|
||||||
import roleApi from '@/api/sys/roleApi'
|
import roleApi from '@/api/sys/roleApi'
|
||||||
|
|
||||||
// 定义emit事件
|
// 定义emit事件
|
||||||
const emit = defineEmits({ successful: null })
|
const emit = defineEmits({ successful: null })
|
||||||
const { proxy } = getCurrentInstance()
|
|
||||||
// 默认是关闭状态
|
// 默认是关闭状态
|
||||||
let visible = $ref(false)
|
let visible = $ref(false)
|
||||||
const formRef = ref()
|
const formRef = ref()
|
||||||
@ -94,12 +92,7 @@
|
|||||||
sortCode: [required('请选择排序')]
|
sortCode: [required('请选择排序')]
|
||||||
}
|
}
|
||||||
// 机构分类字典
|
// 机构分类字典
|
||||||
let categoryOptions = proxy.$TOOL.dictTypeList('ROLE_CATEGORY').map((item) => {
|
let categoryOptions = tool.dictList('ROLE_CATEGORY')
|
||||||
return {
|
|
||||||
value: item['dictValue'],
|
|
||||||
label: item['name']
|
|
||||||
}
|
|
||||||
})
|
|
||||||
// 验证并提交数据
|
// 验证并提交数据
|
||||||
const onSubmit = () => {
|
const onSubmit = () => {
|
||||||
formRef.value.validate().then(() => {
|
formRef.value.validate().then(() => {
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
<a-row :gutter="16">
|
<a-row :gutter="16">
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
<a-form-item label="性别:" name="gender">
|
<a-form-item label="性别:" name="gender">
|
||||||
<a-radio-group v-model:value="formData.gender" :options="genderOptions"> </a-radio-group>
|
<a-radio-group v-model:value="formData.gender" :options="genderOptions" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
@ -72,7 +72,7 @@
|
|||||||
value: 'id'
|
value: 'id'
|
||||||
}"
|
}"
|
||||||
@change="selePositionData(formData.orgId, 0)"
|
@change="selePositionData(formData.orgId, 0)"
|
||||||
></a-tree-select>
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
@ -84,8 +84,7 @@
|
|||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
placeholder="请选择职位"
|
placeholder="请选择职位"
|
||||||
allow-clear
|
allow-clear
|
||||||
>
|
/>
|
||||||
</a-select>
|
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
@ -97,8 +96,7 @@
|
|||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
placeholder="请选择主管"
|
placeholder="请选择主管"
|
||||||
allow-clear
|
allow-clear
|
||||||
>
|
/>
|
||||||
</a-select>
|
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
@ -150,7 +148,7 @@
|
|||||||
:tree-default-expanded-keys="treeDefaultExpandedKeys"
|
:tree-default-expanded-keys="treeDefaultExpandedKeys"
|
||||||
:field-names="{ children: 'children', label: 'name', value: 'id' }"
|
:field-names="{ children: 'children', label: 'name', value: 'id' }"
|
||||||
@select="childOrgSelect(positionInfo, 0)"
|
@select="childOrgSelect(positionInfo, 0)"
|
||||||
></a-tree-select>
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="7">
|
<a-col :span="7">
|
||||||
@ -165,8 +163,7 @@
|
|||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
placeholder="请选择职位"
|
placeholder="请选择职位"
|
||||||
allow-clear
|
allow-clear
|
||||||
>
|
/>
|
||||||
</a-select>
|
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="7">
|
<a-col :span="7">
|
||||||
@ -178,8 +175,7 @@
|
|||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
placeholder="请选择主管"
|
placeholder="请选择主管"
|
||||||
allow-clear
|
allow-clear
|
||||||
>
|
/>
|
||||||
</a-select>
|
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="3" style="margin-top: 4px">
|
<a-col :span="3" style="margin-top: 4px">
|
||||||
@ -193,7 +189,7 @@
|
|||||||
<a-row :gutter="16">
|
<a-row :gutter="16">
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
<a-form-item label="民族:" name="nation">
|
<a-form-item label="民族:" name="nation">
|
||||||
<a-select v-model:value="formData.nation" placeholder="请选择民族" :options="nationOptions"> </a-select>
|
<a-select v-model:value="formData.nation" placeholder="请选择民族" :options="nationOptions" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
@ -227,8 +223,11 @@
|
|||||||
<a-row :gutter="16">
|
<a-row :gutter="16">
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
<a-form-item label="证件类型:" name="idCardType">
|
<a-form-item label="证件类型:" name="idCardType">
|
||||||
<a-select v-model:value="formData.idCardType" placeholder="请选择证件类型" :options="idcardTypeOptions">
|
<a-select
|
||||||
</a-select>
|
v-model:value="formData.idCardType"
|
||||||
|
placeholder="请选择证件类型"
|
||||||
|
:options="idcardTypeOptions"
|
||||||
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
@ -244,8 +243,7 @@
|
|||||||
v-model:value="formData.cultureLevel"
|
v-model:value="formData.cultureLevel"
|
||||||
placeholder="请选择文化程度"
|
placeholder="请选择文化程度"
|
||||||
:options="cultureLevelOptions"
|
:options="cultureLevelOptions"
|
||||||
>
|
/>
|
||||||
</a-select>
|
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
@ -330,12 +328,12 @@
|
|||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import userApi from '@/api/sys/userApi'
|
import userApi from '@/api/sys/userApi'
|
||||||
import { required, rules } from '@/utils/formRules'
|
import { required } from '@/utils/formRules'
|
||||||
|
import tool from '@/utils/tool'
|
||||||
// 默认是关闭状态
|
// 默认是关闭状态
|
||||||
let visible = $ref(false)
|
let visible = $ref(false)
|
||||||
const formRef = ref()
|
const formRef = ref()
|
||||||
const activeTabsKey = ref('1')
|
const activeTabsKey = ref('1')
|
||||||
const { proxy } = getCurrentInstance()
|
|
||||||
const emit = defineEmits({ successful: null })
|
const emit = defineEmits({ successful: null })
|
||||||
const formLoading = ref(false)
|
const formLoading = ref(false)
|
||||||
const treeData = ref([])
|
const treeData = ref([])
|
||||||
@ -514,34 +512,13 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 性别
|
// 性别
|
||||||
const genderOptions = proxy.$TOOL.dictTypeList('GENDER').map((item) => {
|
const genderOptions = tool.dictList('GENDER')
|
||||||
return {
|
|
||||||
value: item['dictValue'],
|
|
||||||
label: item['name']
|
|
||||||
}
|
|
||||||
})
|
|
||||||
// 民族
|
// 民族
|
||||||
const nationOptions = proxy.$TOOL.dictTypeList('NATION').map((item) => {
|
const nationOptions = tool.dictList('NATION')
|
||||||
return {
|
|
||||||
value: item['dictValue'],
|
|
||||||
label: item['name']
|
|
||||||
}
|
|
||||||
})
|
|
||||||
// 身份证件
|
// 身份证件
|
||||||
const idcardTypeOptions = proxy.$TOOL.dictTypeList('IDCARD_TYPE').map((item) => {
|
const idcardTypeOptions = tool.dictList('IDCARD_TYPE')
|
||||||
return {
|
|
||||||
value: item['dictValue'],
|
|
||||||
label: item['name']
|
|
||||||
}
|
|
||||||
})
|
|
||||||
// 文化程度
|
// 文化程度
|
||||||
const cultureLevelOptions = proxy.$TOOL.dictTypeList('CULTURE_LEVEL').map((item) => {
|
const cultureLevelOptions = tool.dictList('CULTURE_LEVEL')
|
||||||
return {
|
|
||||||
value: item['dictValue'],
|
|
||||||
label: item['name']
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
// 调用这个函数将子组件的一些数据和方法暴露出去
|
// 调用这个函数将子组件的一些数据和方法暴露出去
|
||||||
defineExpose({
|
defineExpose({
|
||||||
onOpen
|
onOpen
|
||||||
@ -561,10 +538,6 @@
|
|||||||
padding-top: 5px;
|
padding-top: 5px;
|
||||||
padding-left: 15px;
|
padding-left: 15px;
|
||||||
}
|
}
|
||||||
.dashedButton {
|
|
||||||
margin-top: 10px;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
.form-div {
|
.form-div {
|
||||||
padding-top: 10px;
|
padding-top: 10px;
|
||||||
}
|
}
|
||||||
|
@ -28,8 +28,8 @@
|
|||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-form-item name="userStatus" :label="$t('user.userStatus')">
|
<a-form-item name="userStatus" :label="$t('user.userStatus')">
|
||||||
<a-select v-model:value="searchFormState.userStatus" :placeholder="$t('user.placeholderUserStatus')">
|
<a-select v-model:value="searchFormState.userStatus" :placeholder="$t('user.placeholderUserStatus')">
|
||||||
<a-select-option v-for="item in statusData" :key="item.dictValue" :value="item.dictValue">{{
|
<a-select-option v-for="item in statusData" :key="item.value" :value="item.value">{{
|
||||||
item.name
|
item.label
|
||||||
}}</a-select-option>
|
}}</a-select-option>
|
||||||
</a-select>
|
</a-select>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
@ -212,7 +212,7 @@
|
|||||||
width: '220px'
|
width: '220px'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
const statusData = tool.dictTypeList('COMMON_STATUS')
|
const statusData = tool.dictList('COMMON_STATUS')
|
||||||
const searchFormRef = ref()
|
const searchFormRef = ref()
|
||||||
let defaultExpandedKeys = ref([])
|
let defaultExpandedKeys = ref([])
|
||||||
let searchFormState = reactive({})
|
let searchFormState = reactive({})
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
<p><i class="group"></i>{{ userInfo.orgName }}</p>
|
<p><i class="group"></i>{{ userInfo.orgName }}</p>
|
||||||
<p>
|
<p>
|
||||||
<i class="address"></i>
|
<i class="address"></i>
|
||||||
<span>{{ userInfo.homeAddress? userInfo.homeAddress : '暂无地址' }}</span>
|
<span>{{ userInfo.homeAddress ? userInfo.homeAddress : '暂无地址' }}</span>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<a-divider />
|
<a-divider />
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
<a-input v-model:value="formData.nickname" placeholder="请输入昵称" allow-clear />
|
<a-input v-model:value="formData.nickname" placeholder="请输入昵称" allow-clear />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="性别:" name="sex">
|
<a-form-item label="性别:" name="sex">
|
||||||
<a-radio-group v-model:value="formData.gender" :options="genderOptions"> </a-radio-group>
|
<a-radio-group v-model:value="formData.gender" :options="genderOptions" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="生日:" name="birthday">
|
<a-form-item label="生日:" name="birthday">
|
||||||
<a-date-picker v-model:value="formData.birthday" value-format="YYYY-MM-DD" style="width: 100%" />
|
<a-date-picker v-model:value="formData.birthday" value-format="YYYY-MM-DD" style="width: 100%" />
|
||||||
@ -36,13 +36,13 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup name="AccountBasic">
|
<script setup name="AccountBasic">
|
||||||
import { getCurrentInstance } from 'vue'
|
|
||||||
import { required } from '@/utils/formRules'
|
import { required } from '@/utils/formRules'
|
||||||
import userCenterApi from '@/api/sys/userCenterApi'
|
import userCenterApi from '@/api/sys/userCenterApi'
|
||||||
|
import tool from '@/utils/tool'
|
||||||
|
import store from '@/store'
|
||||||
const formRef = ref()
|
const formRef = ref()
|
||||||
const { proxy } = getCurrentInstance()
|
|
||||||
// 获取用户信息
|
// 获取用户信息
|
||||||
const userInfo = proxy.$TOOL.data.get('USER_INFO')
|
const userInfo = tool.data.get('USER_INFO')
|
||||||
let formData = ref({})
|
let formData = ref({})
|
||||||
formData.value = userInfo
|
formData.value = userInfo
|
||||||
const submitLoading = ref(false)
|
const submitLoading = ref(false)
|
||||||
@ -51,12 +51,7 @@
|
|||||||
name: [required('请输入姓名')],
|
name: [required('请输入姓名')],
|
||||||
gender: [required('请选择性别')]
|
gender: [required('请选择性别')]
|
||||||
}
|
}
|
||||||
const genderOptions = proxy.$TOOL.dictTypeList('GENDER').map((item) => {
|
const genderOptions = tool.dictList('GENDER')
|
||||||
return {
|
|
||||||
value: item['dictValue'],
|
|
||||||
label: item['name']
|
|
||||||
}
|
|
||||||
})
|
|
||||||
// 验证并提交数据
|
// 验证并提交数据
|
||||||
const onSubmit = () => {
|
const onSubmit = () => {
|
||||||
formRef.value
|
formRef.value
|
||||||
@ -66,8 +61,8 @@
|
|||||||
userCenterApi.userUpdateUserInfo(formData.value).then(() => {
|
userCenterApi.userUpdateUserInfo(formData.value).then(() => {
|
||||||
submitLoading.value = false
|
submitLoading.value = false
|
||||||
// 更新前端缓存
|
// 更新前端缓存
|
||||||
proxy.$store.commit('SET_userInfo', formData.value)
|
store.commit('SET_userInfo', formData.value)
|
||||||
proxy.$TOOL.data.set('USER_INFO', formData.value)
|
tool.data.set('USER_INFO', formData.value)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
<a-row :gutter="10">
|
<a-row :gutter="10">
|
||||||
<a-col :span="4">
|
<a-col :span="4">
|
||||||
<a-menu id="userMessage" v-model:selected-keys="selectedKeys" mode="inline" @click="handleClick">
|
<a-menu id="userMessage" v-model:selected-keys="selectedKeys" mode="inline" @click="handleClick">
|
||||||
<a-menu-item :key="messageCategory.dictValue" v-for="messageCategory in messageCategoryList">{{
|
<a-menu-item :key="messageCategory.value" v-for="messageCategory in messageCategoryList">{{
|
||||||
messageCategory.name
|
messageCategory.label
|
||||||
}}</a-menu-item>
|
}}</a-menu-item>
|
||||||
</a-menu>
|
</a-menu>
|
||||||
</a-col>
|
</a-col>
|
||||||
@ -39,8 +39,8 @@
|
|||||||
import tool from '@/utils/tool'
|
import tool from '@/utils/tool'
|
||||||
import { nextTick } from 'vue'
|
import { nextTick } from 'vue'
|
||||||
|
|
||||||
const messageCategoryList = tool.dictTypeList('MESSAGE_CATEGORY')
|
const messageCategoryList = tool.dictList('MESSAGE_CATEGORY')
|
||||||
const selectedKeys = ref(new Array(messageCategoryList[0].dictValue))
|
const selectedKeys = ref(new Array(messageCategoryList[0].value))
|
||||||
const table = ref()
|
const table = ref()
|
||||||
const detailRef = ref()
|
const detailRef = ref()
|
||||||
const columns = [
|
const columns = [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user