refactor(jxcj): 移除 ssw-jxcj 包内 app/ web/ 前端目录
背景: app/ web/ 是 dacli form codegen 输出到 ssw-jxcj 的前端代码
- app/ = uniapp 风格 (4 文件, lowercase .vue + .js)
- web/ = web Vue 3 (7 文件, mixed case + .ts)
- 实际位置应在 web/uniapp 项目下, 不应放在 ssw-jxcj 后端包
移动:
- ssw-jxcj/app/* → uniapp/pages/ssw/jxcj/Announcement/ (4 文件)
- ssw-jxcj/web/* → web/apps/jnpf-web-apps-main/src/views/ssw/jxcj/Announcement/ (7 文件)
(web/ 在 .gitignore 中, 不入仓, 后续 codegen 重新生成)
每模块 per-model 目录结构 (对齐现有 web/.../ssw/jxcj/TeamInfo/):
uniapp/pages/ssw/jxcj/{ModelName}/
├── index.vue
├── form.vue
├── detail.vue
└── columnList.js
web/.../ssw/jxcj/{ModelName}/
├── index.vue
├── Form.vue
├── Detail.vue
├── api.ts
├── columnList.ts
├── searchList.ts
└── superQueryJson.ts
后续: dacli form codegen 应默认不输出到 ssw-jxcj, 直接写 web/uniapp 目标位置
Co-Authored-By: Claude <[email protected]>
This commit is contained in:
1 parent
b3459e0475
commit
0e312fdd67
11 files changed
-4200
No files matched your search
@@ -1,325 +0,0 @@
|
||||
const columnList = [
|
||||
{
|
||||
"suffixIcon":"",
|
||||
"useScan":false,
|
||||
"fullNameI18nCode":[
|
||||
""
|
||||
],
|
||||
"align":"left",
|
||||
"headerAlign":"left",
|
||||
"showCount":false,
|
||||
"__config__":{
|
||||
"jnpfKey":"input",
|
||||
"label":"关联大赛",
|
||||
"labelI18nCode":null
|
||||
},
|
||||
"readonly":false,
|
||||
"prop":"f_competition_id",
|
||||
"__vModel__":"f_competition_id",
|
||||
"disabled":false,
|
||||
"id":"f_competition_id",
|
||||
"placeholder":"请输入",
|
||||
"addonBefore":"",
|
||||
"clearable":true,
|
||||
"jnpfKey":"input",
|
||||
"fullName":"关联大赛",
|
||||
"label":"关联大赛",
|
||||
"sortable":false,
|
||||
"addonAfter":"",
|
||||
"maskConfig":{
|
||||
"prefixType":1,
|
||||
"useUnrealMask":false,
|
||||
"maskType":1,
|
||||
"unrealMaskLength":1,
|
||||
"prefixLimit":0,
|
||||
"suffixLimit":0,
|
||||
"filler":"*",
|
||||
"prefixSpecifyChar":"",
|
||||
"suffixType":1,
|
||||
"ignoreChar":"",
|
||||
"suffixSpecifyChar":""
|
||||
},
|
||||
"showPassword":false,
|
||||
"useMask":false,
|
||||
"fixed":"none",
|
||||
"prefixIcon":"",
|
||||
"labelI18nCode":""
|
||||
},
|
||||
{
|
||||
"suffixIcon":"",
|
||||
"useScan":false,
|
||||
"fullNameI18nCode":[
|
||||
""
|
||||
],
|
||||
"align":"left",
|
||||
"headerAlign":"left",
|
||||
"showCount":false,
|
||||
"__config__":{
|
||||
"jnpfKey":"input",
|
||||
"label":"团队名称",
|
||||
"labelI18nCode":null
|
||||
},
|
||||
"readonly":false,
|
||||
"prop":"f_team_name",
|
||||
"__vModel__":"f_team_name",
|
||||
"disabled":false,
|
||||
"id":"f_team_name",
|
||||
"placeholder":"请输入",
|
||||
"addonBefore":"",
|
||||
"clearable":true,
|
||||
"jnpfKey":"input",
|
||||
"fullName":"团队名称",
|
||||
"label":"团队名称",
|
||||
"sortable":false,
|
||||
"addonAfter":"",
|
||||
"maskConfig":{
|
||||
"prefixType":1,
|
||||
"useUnrealMask":false,
|
||||
"maskType":1,
|
||||
"unrealMaskLength":1,
|
||||
"prefixLimit":0,
|
||||
"suffixLimit":0,
|
||||
"filler":"*",
|
||||
"prefixSpecifyChar":"",
|
||||
"suffixType":1,
|
||||
"ignoreChar":"",
|
||||
"suffixSpecifyChar":""
|
||||
},
|
||||
"showPassword":false,
|
||||
"useMask":false,
|
||||
"fixed":"none",
|
||||
"prefixIcon":"",
|
||||
"labelI18nCode":""
|
||||
},
|
||||
{
|
||||
"suffixIcon":"",
|
||||
"useScan":false,
|
||||
"fullNameI18nCode":[
|
||||
""
|
||||
],
|
||||
"align":"left",
|
||||
"headerAlign":"left",
|
||||
"showCount":false,
|
||||
"__config__":{
|
||||
"jnpfKey":"input",
|
||||
"label":"邀请码",
|
||||
"labelI18nCode":null
|
||||
},
|
||||
"readonly":false,
|
||||
"prop":"f_team_code",
|
||||
"__vModel__":"f_team_code",
|
||||
"disabled":false,
|
||||
"id":"f_team_code",
|
||||
"placeholder":"请输入",
|
||||
"addonBefore":"",
|
||||
"clearable":true,
|
||||
"jnpfKey":"input",
|
||||
"fullName":"邀请码",
|
||||
"label":"邀请码",
|
||||
"sortable":false,
|
||||
"addonAfter":"",
|
||||
"maskConfig":{
|
||||
"prefixType":1,
|
||||
"useUnrealMask":false,
|
||||
"maskType":1,
|
||||
"unrealMaskLength":1,
|
||||
"prefixLimit":0,
|
||||
"suffixLimit":0,
|
||||
"filler":"*",
|
||||
"prefixSpecifyChar":"",
|
||||
"suffixType":1,
|
||||
"ignoreChar":"",
|
||||
"suffixSpecifyChar":""
|
||||
},
|
||||
"showPassword":false,
|
||||
"useMask":false,
|
||||
"fixed":"none",
|
||||
"prefixIcon":"",
|
||||
"labelI18nCode":""
|
||||
},
|
||||
{
|
||||
"suffixIcon":"",
|
||||
"useScan":false,
|
||||
"fullNameI18nCode":[
|
||||
""
|
||||
],
|
||||
"align":"left",
|
||||
"headerAlign":"left",
|
||||
"showCount":false,
|
||||
"__config__":{
|
||||
"jnpfKey":"input",
|
||||
"label":"团队口号",
|
||||
"labelI18nCode":null
|
||||
},
|
||||
"readonly":false,
|
||||
"prop":"f_slogan",
|
||||
"__vModel__":"f_slogan",
|
||||
"disabled":false,
|
||||
"id":"f_slogan",
|
||||
"placeholder":"请输入",
|
||||
"addonBefore":"",
|
||||
"clearable":true,
|
||||
"jnpfKey":"input",
|
||||
"fullName":"团队口号",
|
||||
"label":"团队口号",
|
||||
"sortable":false,
|
||||
"addonAfter":"",
|
||||
"maskConfig":{
|
||||
"prefixType":1,
|
||||
"useUnrealMask":false,
|
||||
"maskType":1,
|
||||
"unrealMaskLength":1,
|
||||
"prefixLimit":0,
|
||||
"suffixLimit":0,
|
||||
"filler":"*",
|
||||
"prefixSpecifyChar":"",
|
||||
"suffixType":1,
|
||||
"ignoreChar":"",
|
||||
"suffixSpecifyChar":""
|
||||
},
|
||||
"showPassword":false,
|
||||
"useMask":false,
|
||||
"fixed":"none",
|
||||
"prefixIcon":"",
|
||||
"labelI18nCode":""
|
||||
},
|
||||
{
|
||||
"suffixIcon":"",
|
||||
"useScan":false,
|
||||
"fullNameI18nCode":[
|
||||
""
|
||||
],
|
||||
"align":"left",
|
||||
"headerAlign":"left",
|
||||
"showCount":false,
|
||||
"__config__":{
|
||||
"jnpfKey":"input",
|
||||
"label":"状态",
|
||||
"labelI18nCode":null
|
||||
},
|
||||
"readonly":false,
|
||||
"prop":"f_status",
|
||||
"__vModel__":"f_status",
|
||||
"disabled":false,
|
||||
"id":"f_status",
|
||||
"placeholder":"请输入",
|
||||
"addonBefore":"",
|
||||
"clearable":true,
|
||||
"jnpfKey":"input",
|
||||
"fullName":"状态",
|
||||
"label":"状态",
|
||||
"sortable":false,
|
||||
"addonAfter":"",
|
||||
"maskConfig":{
|
||||
"prefixType":1,
|
||||
"useUnrealMask":false,
|
||||
"maskType":1,
|
||||
"unrealMaskLength":1,
|
||||
"prefixLimit":0,
|
||||
"suffixLimit":0,
|
||||
"filler":"*",
|
||||
"prefixSpecifyChar":"",
|
||||
"suffixType":1,
|
||||
"ignoreChar":"",
|
||||
"suffixSpecifyChar":""
|
||||
},
|
||||
"showPassword":false,
|
||||
"useMask":false,
|
||||
"fixed":"none",
|
||||
"prefixIcon":"",
|
||||
"labelI18nCode":""
|
||||
},
|
||||
{
|
||||
"suffixIcon":"",
|
||||
"useScan":false,
|
||||
"fullNameI18nCode":[
|
||||
""
|
||||
],
|
||||
"align":"left",
|
||||
"headerAlign":"left",
|
||||
"showCount":false,
|
||||
"__config__":{
|
||||
"jnpfKey":"input",
|
||||
"label":"拒绝原因",
|
||||
"labelI18nCode":null
|
||||
},
|
||||
"readonly":false,
|
||||
"prop":"f_reject_reason",
|
||||
"__vModel__":"f_reject_reason",
|
||||
"disabled":false,
|
||||
"id":"f_reject_reason",
|
||||
"placeholder":"请输入",
|
||||
"addonBefore":"",
|
||||
"clearable":true,
|
||||
"jnpfKey":"input",
|
||||
"fullName":"拒绝原因",
|
||||
"label":"拒绝原因",
|
||||
"sortable":false,
|
||||
"addonAfter":"",
|
||||
"maskConfig":{
|
||||
"prefixType":1,
|
||||
"useUnrealMask":false,
|
||||
"maskType":1,
|
||||
"unrealMaskLength":1,
|
||||
"prefixLimit":0,
|
||||
"suffixLimit":0,
|
||||
"filler":"*",
|
||||
"prefixSpecifyChar":"",
|
||||
"suffixType":1,
|
||||
"ignoreChar":"",
|
||||
"suffixSpecifyChar":""
|
||||
},
|
||||
"showPassword":false,
|
||||
"useMask":false,
|
||||
"fixed":"none",
|
||||
"prefixIcon":"",
|
||||
"labelI18nCode":""
|
||||
},
|
||||
{
|
||||
"suffixIcon":"",
|
||||
"useScan":false,
|
||||
"fullNameI18nCode":[
|
||||
""
|
||||
],
|
||||
"align":"left",
|
||||
"headerAlign":"left",
|
||||
"showCount":false,
|
||||
"__config__":{
|
||||
"jnpfKey":"input",
|
||||
"label":"报名时间",
|
||||
"labelI18nCode":null
|
||||
},
|
||||
"readonly":false,
|
||||
"prop":"f_enroll_time",
|
||||
"__vModel__":"f_enroll_time",
|
||||
"disabled":false,
|
||||
"id":"f_enroll_time",
|
||||
"placeholder":"请输入",
|
||||
"addonBefore":"",
|
||||
"clearable":true,
|
||||
"jnpfKey":"input",
|
||||
"fullName":"报名时间",
|
||||
"label":"报名时间",
|
||||
"sortable":false,
|
||||
"addonAfter":"",
|
||||
"maskConfig":{
|
||||
"prefixType":1,
|
||||
"useUnrealMask":false,
|
||||
"maskType":1,
|
||||
"unrealMaskLength":1,
|
||||
"prefixLimit":0,
|
||||
"suffixLimit":0,
|
||||
"filler":"*",
|
||||
"prefixSpecifyChar":"",
|
||||
"suffixType":1,
|
||||
"ignoreChar":"",
|
||||
"suffixSpecifyChar":""
|
||||
},
|
||||
"showPassword":false,
|
||||
"useMask":false,
|
||||
"fixed":"none",
|
||||
"prefixIcon":"",
|
||||
"labelI18nCode":""
|
||||
}
|
||||
]
|
||||
export default columnList
|
||||
@@ -1,339 +0,0 @@
|
||||
<template>
|
||||
<view class="jnpf-wrap jnpf-wrap-form dynamicModel-form-v" v-if="!loading">
|
||||
<u-form :model="dataForm" :rules="rules" ref="dataForm" :errorType="['toast']"
|
||||
label-position="left" label-align="right" :label-width="labelwidth" class="jnpf-form">
|
||||
<view class="u-p-l-20 u-p-r-20 form-item-box">
|
||||
<u-form-item
|
||||
label="关联大赛" class="relation-item--left">
|
||||
<view
|
||||
class = "jnpf-detail-text"
|
||||
@click.native="toDetail(dataForm.f_competition_id_id,'')" relationField='${html.relationField}' vModel='f_competition_id' >
|
||||
<view class="jnpf-detail-text" style="color:rgb(41, 121, 255)">
|
||||
{{dataForm.f_competition_id}}
|
||||
</view>
|
||||
<DisplayList v-if="Object.keys(extraOptions.f_competition_idExtraOptions).length" :extraObj="extraData.f_competition_id" :extraOptions="extraOptions.f_competition_idExtraOptions">
|
||||
</DisplayList>
|
||||
</view>
|
||||
</u-form-item>
|
||||
</view>
|
||||
<view class="u-p-l-20 u-p-r-20 form-item-box">
|
||||
<u-form-item
|
||||
label="团队名称" >
|
||||
<JnpfInput
|
||||
class = "jnpf-detail-text"
|
||||
v-model="dataForm.f_team_name"
|
||||
detailed :maskConfig="maskConfig.f_team_name" input-align='right' >
|
||||
</JnpfInput>
|
||||
</u-form-item>
|
||||
</view>
|
||||
<view class="u-p-l-20 u-p-r-20 form-item-box">
|
||||
<u-form-item
|
||||
label="邀请码" >
|
||||
<JnpfInput
|
||||
class = "jnpf-detail-text"
|
||||
v-model="dataForm.f_team_code"
|
||||
detailed :maskConfig="maskConfig.f_team_code" input-align='right' >
|
||||
</JnpfInput>
|
||||
</u-form-item>
|
||||
</view>
|
||||
<view class="u-p-l-20 u-p-r-20 form-item-box">
|
||||
<u-form-item
|
||||
label="团队口号" >
|
||||
<JnpfInput
|
||||
class = "jnpf-detail-text"
|
||||
v-model="dataForm.f_slogan"
|
||||
detailed :maskConfig="maskConfig.f_slogan" input-align='right' >
|
||||
</JnpfInput>
|
||||
</u-form-item>
|
||||
</view>
|
||||
<view class="u-p-l-20 u-p-r-20 form-item-box">
|
||||
<u-form-item
|
||||
label="状态" >
|
||||
<view
|
||||
class = "jnpf-detail-text"
|
||||
>
|
||||
{{dataForm.f_status}}
|
||||
</view>
|
||||
</u-form-item>
|
||||
</view>
|
||||
<view class="u-p-l-20 u-p-r-20 form-item-box">
|
||||
<u-form-item
|
||||
label="拒绝原因" >
|
||||
<view
|
||||
class = "jnpf-detail-text"
|
||||
input-align='right' >
|
||||
{{dataForm.f_reject_reason}}
|
||||
</view>
|
||||
</u-form-item>
|
||||
</view>
|
||||
<view class="u-p-l-20 u-p-r-20 form-item-box">
|
||||
<u-form-item
|
||||
label="报名时间" >
|
||||
<view
|
||||
class = "jnpf-detail-text"
|
||||
>
|
||||
{{dataForm.f_enroll_time}}
|
||||
</view>
|
||||
</u-form-item>
|
||||
</view>
|
||||
</u-form>
|
||||
<view class="buttom-actions" >
|
||||
<template v-if="btnList.includes('btn_edit')">
|
||||
<CustomButton class="u-flex buttom-btn-left-inner" :btnText="$t('common.cancelText')" btnIcon="icon-ym icon-ym-add-cancel" customIcon />
|
||||
<u-button class="buttom-btn" type="primary" @click.stop="submitForm">{{$t('common.editText','编辑')}}</u-button>
|
||||
</template>
|
||||
<u-button v-else class="buttom-btn" @click="resetForm">{{$t('common.cancelText','取消')}}</u-button>
|
||||
</view>
|
||||
<u-modal v-model="show" :content="content" width='70%' border-radius="16" :content-style="{fontSize: '28rpx',padding: '20rpx',lineHeight: '44rpx',textAlign: 'left'}"
|
||||
:titleStyle="{padding: '20rpx'}" :confirm-style="{height: '80rpx',lineHeight: '80rpx'}" :title="title" confirm-text="确定">
|
||||
</u-modal>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
getDictionaryDataSelector,
|
||||
getDataInterfaceRes
|
||||
} from '@/api/common'
|
||||
import {
|
||||
getRelationFormDetail,
|
||||
getDataInterfaceDataInfoByIds
|
||||
} from '@/api/common.js'
|
||||
import request from '@/utils/request'
|
||||
import DisplayList from '@/components/displayList'
|
||||
import CustomButton from '@/components/CustomButton'
|
||||
|
||||
export default {
|
||||
components:{
|
||||
DisplayList,
|
||||
CustomButton
|
||||
},
|
||||
data(){
|
||||
return{
|
||||
btnLoading: false,
|
||||
loading: false,
|
||||
text: '提示:测试文本',
|
||||
tableKey:'',
|
||||
timeKey : +new Date(),
|
||||
dataForm:{
|
||||
f_id:"",
|
||||
},
|
||||
rules:{},
|
||||
interfaceRes:{
|
||||
f_competition_id:[
|
||||
],
|
||||
f_team_name:[
|
||||
],
|
||||
f_team_code:[
|
||||
],
|
||||
f_slogan:[
|
||||
],
|
||||
f_status:[
|
||||
],
|
||||
f_reject_reason:[
|
||||
],
|
||||
f_enroll_time:[
|
||||
],
|
||||
},
|
||||
extraOptions:{
|
||||
f_competition_idExtraOptions:[
|
||||
],
|
||||
},
|
||||
extraData:{
|
||||
f_competition_id : {},
|
||||
f_team_name : {},
|
||||
f_team_code : {},
|
||||
f_slogan : {},
|
||||
f_status : {},
|
||||
f_reject_reason : {},
|
||||
f_enroll_time : {},
|
||||
},
|
||||
maskConfig:{
|
||||
f_competition_id:{
|
||||
},
|
||||
f_team_name:{
|
||||
},
|
||||
f_team_code:{
|
||||
},
|
||||
f_slogan:{
|
||||
},
|
||||
f_status:{
|
||||
},
|
||||
f_reject_reason:{
|
||||
},
|
||||
f_enroll_time:{
|
||||
},
|
||||
},
|
||||
carousel:{
|
||||
},
|
||||
labelwidth:100*1.5,
|
||||
menuId:'',
|
||||
btnList:[],
|
||||
idList:[],
|
||||
ruleList:{},
|
||||
childIndex:-1,
|
||||
content:'',
|
||||
title:'',
|
||||
show:false,
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
this.menuId=option.menuId
|
||||
this.btnList=option.btnList.split(",")
|
||||
uni.setNavigationBarTitle({
|
||||
title: this.$t('common.detailText','详情')
|
||||
})
|
||||
this.dataForm.f_id = option.id || 0
|
||||
this.idList = option.idList?option.idList.split(","):[]
|
||||
this.initData()
|
||||
uni.$on('refresh', () => {
|
||||
//执行接口更新数据
|
||||
this.initData()
|
||||
})
|
||||
uni.$on('initCollapse', () => {
|
||||
//初始化折叠面板高度高度
|
||||
this.collapse()
|
||||
})
|
||||
},
|
||||
beforeDestroy() {
|
||||
uni.$off('refresh')
|
||||
},
|
||||
onReady() {
|
||||
this.$refs.dataForm.setRules(this.rules);
|
||||
},
|
||||
onShow(){
|
||||
this.collapse()
|
||||
},
|
||||
watch:{
|
||||
dataForm: {
|
||||
handler(val, oldVal) {
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
getParamList(key) {
|
||||
let templateJson = this.interfaceRes[key];
|
||||
if (!templateJson || !templateJson.length || !this.dataForm) return templateJson;
|
||||
for (let i = 0; i < templateJson.length; i++) {
|
||||
if (templateJson[i].relationField && templateJson[i].sourceType == 1) {
|
||||
templateJson[i].defaultValue = this.dataForm[templateJson[i].relationField + '_id'] || '';
|
||||
}
|
||||
}
|
||||
return templateJson;
|
||||
},
|
||||
getf_competition_idExtraInfo(){
|
||||
if (!this.dataForm.f_competition_id_id) return;
|
||||
let query = {
|
||||
id: this.dataForm.f_competition_id_id,
|
||||
};
|
||||
getRelationFormDetail('', query).then(res => {
|
||||
if (!res.data || !res.data.data) return
|
||||
let data = JSON.parse(res.data.data)
|
||||
this.extraData.f_competition_id = data
|
||||
})
|
||||
},
|
||||
doPreviewImage(url,imagesList) {
|
||||
const images = imagesList.map(item => this.define.baseURL + item.url);
|
||||
uni.previewImage({
|
||||
urls: images,
|
||||
current: url,
|
||||
success: () => {},
|
||||
fail: () => {
|
||||
uni.showToast({
|
||||
title: '预览图片失败',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
onCollapseChange() {
|
||||
uni.$emit('initCollapse')
|
||||
},
|
||||
toDetail(id, modelId) {
|
||||
if (!id) return
|
||||
let config = {
|
||||
modelId: modelId,
|
||||
id: id,
|
||||
formTitle: this.$t('common.detailText','详情'),
|
||||
noShowBtn: 1,
|
||||
noDataLog: 1,
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
const url ='/pages/apply/dynamicModel/detail?config=' + this.jnpf.base64.encode(JSON.stringify(config),"UTF-8")
|
||||
uni.navigateTo({
|
||||
url: url
|
||||
})
|
||||
})
|
||||
},
|
||||
clickIcon(label,tipLabel) {
|
||||
this.content = tipLabel
|
||||
this.title = label
|
||||
this.show = true
|
||||
},
|
||||
checkChildRule() {
|
||||
let title = [];
|
||||
let _ruleList = this.ruleList
|
||||
for (let k in _ruleList) {
|
||||
let childData = this.dataForm[k]
|
||||
childData.forEach((item, index) => {
|
||||
for (let model in _ruleList[k]) {
|
||||
if (item[model] instanceof Array) {
|
||||
if (item[model].length == 0) {
|
||||
title.push(_ruleList[k][model])
|
||||
}
|
||||
} else if (!item[model]) {
|
||||
title.push(_ruleList[k][model])
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
if (title.length > 0) {
|
||||
return title[0]
|
||||
}
|
||||
},
|
||||
resetForm(){
|
||||
uni.navigateBack()
|
||||
},
|
||||
dataAll(){
|
||||
},
|
||||
initData(){
|
||||
this.$nextTick(function(){
|
||||
if (this.dataForm.f_id) {
|
||||
this.loading = true
|
||||
request({
|
||||
url: '/api/example/Team/'+'detail/'+this.dataForm.f_id,
|
||||
method: 'get',
|
||||
}).then(res => {
|
||||
this.dataInfo(res.data)
|
||||
this.loading = false
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
submitForm(){
|
||||
uni.navigateTo({
|
||||
url: "./form?menuId=" + this.menuId + "&jurisdictionType=btn_edit&id="+this.dataForm.f_id+"&idList="+this.idList
|
||||
})
|
||||
},
|
||||
selfInit() {
|
||||
this.$store.commit('base/UPDATE_RELATION_DATA', {})
|
||||
},
|
||||
dataInfo(dataAll){
|
||||
let _dataAll =dataAll
|
||||
this.dataForm=_dataAll
|
||||
this.getf_competition_idExtraInfo()
|
||||
this.collapse()
|
||||
},
|
||||
collapse(){
|
||||
setTimeout(()=> {
|
||||
}, 1000);
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
</script>
|
||||
<style>
|
||||
page{
|
||||
background-color: #f0f2f6;
|
||||
}
|
||||
</style>
|
||||
@@ -1,643 +0,0 @@
|
||||
<template>
|
||||
<view class="jnpf-wrap jnpf-wrap-form dynamicModel-form-v" v-if="!loading">
|
||||
<u-form :model="dataForm" :rules="rules" ref="dataForm" :errorType="['toast']"
|
||||
label-position="left" label-align="right" :label-width="labelwidth" class="jnpf-form">
|
||||
<view class="u-p-l-20 u-p-r-20 form-item-box">
|
||||
<u-form-item
|
||||
required label="关联大赛" prop="f_competition_id" class="relation-item--left">
|
||||
<JnpfRelationForm v-model="dataForm.f_competition_id"
|
||||
@change="changeData('f_competition_id',-1)"
|
||||
:fieldKey="'f_competition_id'"
|
||||
:rowIndex="null" :formData="dataForm" :templateJson="interfaceRes.f_competition_id" :queryType="0" relationField='${html.relationField}' vModel='f_competition_id' :columnOptions="f_competition_idColumnOptions" :extraOptions="f_competition_idExtraOptions" type="relation">
|
||||
</JnpfRelationForm>
|
||||
</u-form-item>
|
||||
</view>
|
||||
<view class="u-p-l-20 u-p-r-20 form-item-box">
|
||||
<u-form-item
|
||||
required label="团队名称" prop="f_team_name" >
|
||||
<JnpfInput v-model="dataForm.f_team_name"
|
||||
@change="changeData('f_team_name',-1)"
|
||||
:fieldKey="'f_team_name'"
|
||||
input-align='right' :maskConfig="maskConfig.f_team_name" >
|
||||
</JnpfInput>
|
||||
</u-form-item>
|
||||
</view>
|
||||
<view class="u-p-l-20 u-p-r-20 form-item-box">
|
||||
<u-form-item
|
||||
label="邀请码" prop="f_team_code" >
|
||||
<JnpfInput v-model="dataForm.f_team_code"
|
||||
@change="changeData('f_team_code',-1)"
|
||||
:fieldKey="'f_team_code'"
|
||||
input-align='right' :maskConfig="maskConfig.f_team_code" >
|
||||
</JnpfInput>
|
||||
</u-form-item>
|
||||
</view>
|
||||
<view class="u-p-l-20 u-p-r-20 form-item-box">
|
||||
<u-form-item
|
||||
label="团队口号" prop="f_slogan" >
|
||||
<JnpfInput v-model="dataForm.f_slogan"
|
||||
@change="changeData('f_slogan',-1)"
|
||||
:fieldKey="'f_slogan'"
|
||||
input-align='right' :maskConfig="maskConfig.f_slogan" >
|
||||
</JnpfInput>
|
||||
</u-form-item>
|
||||
</view>
|
||||
<view class="u-p-l-20 u-p-r-20 form-item-box">
|
||||
<u-form-item
|
||||
required label="状态" prop="f_status" >
|
||||
<JnpfSelect v-model="dataForm.f_status"
|
||||
@change="changeData('f_status',-1)"
|
||||
:fieldKey="'f_status'"
|
||||
:props="f_statusProps" :options="f_statusOptions">
|
||||
</JnpfSelect>
|
||||
</u-form-item>
|
||||
</view>
|
||||
<view class="u-p-l-20 u-p-r-20 form-item-box">
|
||||
<u-form-item
|
||||
label="拒绝原因" prop="f_reject_reason" >
|
||||
<JnpfInputTextarea v-model="dataForm.f_reject_reason"
|
||||
@change="changeData('f_reject_reason',-1)"
|
||||
:fieldKey="'f_reject_reason'"
|
||||
input-align='right' type="textarea">
|
||||
</JnpfInputTextarea>
|
||||
</u-form-item>
|
||||
</view>
|
||||
<view class="u-p-l-20 u-p-r-20 form-item-box">
|
||||
<u-form-item
|
||||
label="报名时间" prop="f_enroll_time" >
|
||||
<JnpfDatePicker v-model="dataForm.f_enroll_time"
|
||||
@change="changeData('f_enroll_time',-1)"
|
||||
:fieldKey="'f_enroll_time'"
|
||||
>
|
||||
</JnpfDatePicker>
|
||||
</u-form-item>
|
||||
</view>
|
||||
</u-form>
|
||||
<view class="buttom-actions" v-if="jurisdictionType != 'btn_detail'" >
|
||||
<CustomButton class="u-flex buttom-btn-left-inner" :btnText="$t('common.cancelText')" btnIcon="icon-ym icon-ym-add-cancel" customIcon />
|
||||
<u-button class="buttom-btn" type="primary" @click="submitForm" :loading="btnLoading">{{$t('common.okText','确定')}}</u-button>
|
||||
</view>
|
||||
<u-action-sheet @click="handleAction" :list="actionList" :tips="{ text: '更多操作' , color: '#000' , fontSize: 30 }" v-model="showAction">
|
||||
</u-action-sheet>
|
||||
<u-modal v-model="show" :content="content" width='70%' border-radius="16" :content-style="{fontSize: '28rpx',padding: '20rpx',lineHeight: '44rpx',textAlign: 'left'}"
|
||||
:titleStyle="{padding: '20rpx'}" :confirm-style="{height: '80rpx',lineHeight: '80rpx'}" :title="title" confirm-text="确定">
|
||||
<view class="slot-content">
|
||||
<rich-text :nodes="content"></rich-text>
|
||||
</view>
|
||||
</u-modal>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getDictionaryDataSelector,
|
||||
getDataInterfaceRes
|
||||
} from '@/api/common'
|
||||
import {
|
||||
getDateDay,
|
||||
getLaterData,
|
||||
getBeforeData,
|
||||
getBeforeTime,
|
||||
getLaterTime
|
||||
} from '@/components/index.js'
|
||||
import request from '@/utils/request'
|
||||
import {
|
||||
useBaseStore
|
||||
} from '@/store/modules/base'
|
||||
import CustomButton from '@/components/CustomButton'
|
||||
|
||||
export default {
|
||||
components:{
|
||||
CustomButton
|
||||
},
|
||||
data(){
|
||||
return{
|
||||
idList: [],
|
||||
index:0,
|
||||
actionList: [],
|
||||
actionListLength: false,
|
||||
showAction: false,
|
||||
btnLoading: false,
|
||||
loading: false,
|
||||
isNumLimit:false,
|
||||
label: '',
|
||||
tableKey:'',
|
||||
numLimit:1,
|
||||
timeKey : +new Date(),
|
||||
dataForm:{
|
||||
f_id:"",
|
||||
f_competition_id : undefined,
|
||||
f_team_name : undefined,
|
||||
f_team_code : undefined,
|
||||
f_slogan : undefined,
|
||||
f_status : undefined,
|
||||
f_reject_reason : undefined,
|
||||
f_enroll_time : undefined,
|
||||
},
|
||||
rules:{
|
||||
f_competition_id: [
|
||||
{
|
||||
required: true,
|
||||
message: '关联大赛不能为空',
|
||||
},
|
||||
],
|
||||
f_team_name: [
|
||||
{
|
||||
required: true,
|
||||
message: '团队名称不能为空',
|
||||
},
|
||||
],
|
||||
f_status: [
|
||||
{
|
||||
required: true,
|
||||
message: '状态不能为空',
|
||||
},
|
||||
],
|
||||
},
|
||||
f_competition_idColumnOptions:[
|
||||
],
|
||||
f_competition_idExtraOptions:[
|
||||
],
|
||||
labelwidth:100*1.5,
|
||||
menuId:'',
|
||||
jurisdictionType:'',
|
||||
ruleList:{
|
||||
},
|
||||
ableRelation:{
|
||||
},
|
||||
interfaceRes:{
|
||||
f_competition_id:[
|
||||
],
|
||||
f_team_name:[
|
||||
],
|
||||
f_team_code:[
|
||||
],
|
||||
f_slogan:[
|
||||
],
|
||||
f_status:[
|
||||
],
|
||||
f_reject_reason:[
|
||||
],
|
||||
f_enroll_time:[
|
||||
],
|
||||
},
|
||||
maskConfig:{
|
||||
f_competition_id:{
|
||||
},
|
||||
f_team_name:{
|
||||
},
|
||||
f_team_code:{
|
||||
},
|
||||
f_slogan:{
|
||||
},
|
||||
f_status:{
|
||||
},
|
||||
f_reject_reason:{
|
||||
},
|
||||
f_enroll_time:{
|
||||
},
|
||||
},
|
||||
locationScope:{
|
||||
f_competition_id:[
|
||||
],
|
||||
f_team_name:[
|
||||
],
|
||||
f_team_code:[
|
||||
],
|
||||
f_slogan:[
|
||||
],
|
||||
f_status:[
|
||||
],
|
||||
f_reject_reason:[
|
||||
],
|
||||
f_enroll_time:[
|
||||
],
|
||||
},
|
||||
carousel:{
|
||||
},
|
||||
regList:{
|
||||
},
|
||||
ableAll:{
|
||||
},
|
||||
childIndex:-1,
|
||||
dataValue:{},
|
||||
isEdit:false,
|
||||
userInfo:{},
|
||||
content:'',
|
||||
title:'',
|
||||
show:false,
|
||||
formatType: {
|
||||
'yyyy': 'yyyy',
|
||||
'yyyy-MM': 'yyyy-mm',
|
||||
'yyyy-MM-dd': 'yyyy-mm-dd',
|
||||
'yyyy-MM-dd HH:mm': 'yyyy-mm-dd hh:MM',
|
||||
'yyyy-MM-dd HH:mm:ss': 'yyyy-mm-dd hh:MM:ss',
|
||||
'HH:mm:ss': 'hh:MM:ss',
|
||||
"HH:mm": "hh:MM",
|
||||
'YYYY': 'yyyy',
|
||||
'YYYY-MM': 'yyyy-mm',
|
||||
'YYYY-MM-DD': 'yyyy-mm-dd',
|
||||
'YYYY-MM-DD HH:mm': 'yyyy-mm-dd hh:MM',
|
||||
'YYYY-MM-DD HH:mm:ss': 'yyyy-mm-dd hh:MM:ss',
|
||||
},
|
||||
}
|
||||
},
|
||||
created(){
|
||||
uni.$on('linkPageConfirm', (subVal) => {
|
||||
if (this.tableKey) {
|
||||
let selectedData = JSON.parse(JSON.stringify(subVal));
|
||||
if (this.isNumLimit) {
|
||||
const remaining = this.numLimit - this.dataForm[this.tableKey].length;
|
||||
if (remaining <= 0) return this.$u.toast(`${this.label}超出条数限制}`);
|
||||
selectedData = selectedData.slice(0, remaining);
|
||||
}
|
||||
for (let i = 0; i < selectedData.length; i++) {
|
||||
let t = subVal[i]
|
||||
if (this['get' + this.tableKey]) {
|
||||
this['get' + this.tableKey](t)
|
||||
}
|
||||
}
|
||||
this.childIndex = -1
|
||||
this.collapse()
|
||||
}
|
||||
})
|
||||
uni.$on('initCollapse', () => {
|
||||
//初始化折叠面板高度高度
|
||||
this.collapse()
|
||||
})
|
||||
},
|
||||
onLoad(option) {
|
||||
this.jurisdictionType = option.jurisdictionType
|
||||
this.menuId=option.menuId
|
||||
this.userInfo = uni.getStorageSync('userInfo') || {}
|
||||
this.dataForm.f_id = option.id || ''
|
||||
let _title = ""
|
||||
if(option.jurisdictionType =='btn_edit'){
|
||||
_title = this.$t('common.editText','编辑')
|
||||
}
|
||||
if(option.jurisdictionType =='btn_detail'){
|
||||
_title = this.$t('common.detailText','详情')
|
||||
}
|
||||
if(option.jurisdictionType =='btn_add'){
|
||||
_title = this.$t('common.add2Text','新增')
|
||||
}
|
||||
if(_title){
|
||||
uni.setNavigationBarTitle({
|
||||
title: _title
|
||||
})
|
||||
}
|
||||
this.selfInit()
|
||||
this.initDefaultData()
|
||||
this.dataAll()
|
||||
this.initData()
|
||||
this.dataValue = JSON.parse(JSON.stringify(this.dataForm))
|
||||
this.idList = option.idList?option.idList.split(","):[]
|
||||
for(let i=0;i<this.idList.length;i++){
|
||||
if(this.idList[i]==option.id){
|
||||
this.index = i;
|
||||
}
|
||||
}
|
||||
setTimeout(() => {
|
||||
uni.$emit('initCollapse')
|
||||
}, 50)
|
||||
uni.$on('initCollapse', () => {
|
||||
//初始化折叠面板高度高度
|
||||
this.collapse()
|
||||
})
|
||||
},
|
||||
onReady() {
|
||||
this.$nextTick(()=>{
|
||||
setTimeout(()=>{
|
||||
this.$refs.dataForm.setRules(this.rules);
|
||||
},100)
|
||||
})
|
||||
},
|
||||
watch:{
|
||||
dataForm: {
|
||||
handler(val, oldVal) {
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
handleAction(index) {
|
||||
if (this.actionList[index].id === 'save_add' || this.actionList[index].id === 'save_proceed') {
|
||||
this.submitForm(1)
|
||||
} else {
|
||||
this.calculation(this.actionList[index].id, index)
|
||||
}
|
||||
},
|
||||
onCollapseChange() {
|
||||
uni.$emit('initCollapse')
|
||||
},
|
||||
checkNumLimit() {
|
||||
if(this.isNumLimit && this.dataForm[this.tableKey].length>=this.numLimit){
|
||||
this.$u.toast(`${this.label}超出条数限制`);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
calculation(type, index) {
|
||||
if (type === 'upper') {
|
||||
this.index--
|
||||
this.actionList[index + 1].disabled = false
|
||||
if (this.index == 0) this.actionList[index].disabled = true
|
||||
} else {
|
||||
this.index++
|
||||
this.actionList[index - 1].disabled = false
|
||||
if (this.index == this.idList.length - 1) this.actionList[index].disabled = true
|
||||
}
|
||||
this.dataForm.f_id = this.idList[this.index]
|
||||
this.initData()
|
||||
},
|
||||
changeData(model, index) {
|
||||
this.isEdit = false
|
||||
this.childIndex = index
|
||||
let modelAll = model.split("-");
|
||||
let faceMode = "";
|
||||
for (let i = 0; i < modelAll.length; i++) {
|
||||
faceMode += modelAll[i];
|
||||
}
|
||||
for(let key in this.ableRelation){
|
||||
if(key == faceMode && this.ableRelation[key]){
|
||||
let valueAll = this.ableRelation[key].split("-")
|
||||
if(valueAll.length>1){
|
||||
let value = this.dataForm[valueAll[0]+"List"][index][valueAll[1]]
|
||||
if(Array.isArray(value)){
|
||||
this.dataForm[valueAll[0]+"List"][index][valueAll[1]] = []
|
||||
}else{
|
||||
this.dataForm[valueAll[0]+"List"][index][valueAll[1]] = undefined
|
||||
}
|
||||
}else{
|
||||
let value = this.dataForm[this.ableRelation[key]]
|
||||
if(Array.isArray(value)){
|
||||
this.dataForm[this.ableRelation[key]] = []
|
||||
}else{
|
||||
this.dataForm[this.ableRelation[key]] = undefined
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
for (let key in this.interfaceRes) {
|
||||
if (key != faceMode) {
|
||||
let faceReList = this.interfaceRes[key]
|
||||
for (let i = 0; i < faceReList.length; i++) {
|
||||
let relationField = faceReList[i].relationField
|
||||
let sourceType = faceReList[i].sourceType
|
||||
if (relationField == model && sourceType == 1) {
|
||||
let options = 'get' + key + 'Options';
|
||||
if(this[options]){
|
||||
this[options]()
|
||||
}
|
||||
this.changeData(key, index)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
changeDataFormData(type, data, model,index,defaultValue ,edit) {
|
||||
if(!edit) {
|
||||
if (type == 2) {
|
||||
for (let i = 0; i < this.dataForm[data].length; i++) {
|
||||
if (index == -1) {
|
||||
this.dataForm[data][i][model] = defaultValue
|
||||
} else if (index == i) {
|
||||
this.dataForm[data][i][model] = defaultValue
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this.dataForm[data] = defaultValue
|
||||
}
|
||||
}
|
||||
},
|
||||
clickIcon(label,tipLabel) {
|
||||
this.content = tipLabel
|
||||
this.title = label
|
||||
this.show = true
|
||||
},
|
||||
exist() {
|
||||
let title = [];
|
||||
let _ruleList = this.ruleList
|
||||
for (let k in _ruleList) {
|
||||
let childData = this.dataForm[k]
|
||||
childData.forEach((item, index) => {
|
||||
for (let model in _ruleList[k]) {
|
||||
if (item[model] instanceof Array) {
|
||||
if (item[model].length == 0) {
|
||||
title.push(_ruleList[k][model])
|
||||
}
|
||||
} else if (!item[model] && item[model]!==0) {
|
||||
title.push(_ruleList[k][model])
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
let _regList = this.regList
|
||||
for (let k in _regList) {
|
||||
let childData = this.dataForm[k]
|
||||
for(let n in _regList[k]){
|
||||
for(let i=0;i<_regList[k][n].length;i++){
|
||||
const element = _regList[k][n][i]
|
||||
if (element.pattern) {
|
||||
element.pattern = element.pattern.toString()
|
||||
let start = element.pattern.indexOf('/')
|
||||
let stop = element.pattern.lastIndexOf('/')
|
||||
let str = element.pattern.substring(start + 1, stop)
|
||||
let reg = new RegExp(str)
|
||||
element.pattern = reg
|
||||
}
|
||||
childData.forEach((item, index) => {
|
||||
if(item[n] && !element.pattern.test(item[n])){
|
||||
title.push(element.message)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
if (title.length > 0) {
|
||||
return title[0]
|
||||
}
|
||||
},
|
||||
resetForm(){
|
||||
uni.navigateBack()
|
||||
},
|
||||
dataAll(){
|
||||
this.collapse()
|
||||
},
|
||||
dateTime(timeRule, timeType, timeTarget, timeValueData, dataValue) {
|
||||
let timeDataValue = null;
|
||||
let timeValue = Number(timeValueData)
|
||||
if (timeRule) {
|
||||
if (timeType == 1) {
|
||||
timeDataValue = timeValueData?timeValue:null
|
||||
} else if (timeType == 2) {
|
||||
timeDataValue = dataValue
|
||||
} else if (timeType == 3) {
|
||||
timeDataValue = new Date().getTime()
|
||||
} else if (timeType == 4) {
|
||||
let previousDate = '';
|
||||
if (timeTarget == 1 || timeTarget == 2) {
|
||||
previousDate = getDateDay(timeTarget, timeType, timeValue)
|
||||
timeDataValue = new Date(previousDate).getTime()
|
||||
} else if (timeTarget == 3) {
|
||||
previousDate = getBeforeData(timeValue)
|
||||
timeDataValue = new Date(previousDate).getTime()
|
||||
} else {
|
||||
timeDataValue = getBeforeTime(timeTarget, timeValue).getTime()
|
||||
}
|
||||
} else if (timeType == 5) {
|
||||
let previousDate = '';
|
||||
if (timeTarget == 1 || timeTarget == 2) {
|
||||
previousDate = getDateDay(timeTarget, timeType, timeValue)
|
||||
timeDataValue = new Date(previousDate).getTime()
|
||||
} else if (timeTarget == 3) {
|
||||
previousDate = getLaterData(timeValue)
|
||||
timeDataValue = new Date(previousDate).getTime()
|
||||
} else {
|
||||
timeDataValue = getLaterTime(timeTarget, timeValue).getTime()
|
||||
}
|
||||
}
|
||||
}
|
||||
return timeDataValue;
|
||||
},
|
||||
time(timeRule, timeType, timeTarget, timeValue, formatType, dataValue) {
|
||||
let format = formatType == 'HH:mm' ? 'HH:mm:00' : formatType
|
||||
let timeDataValue = null
|
||||
if (timeRule) {
|
||||
if (timeType == 1 && timeValue) {
|
||||
timeDataValue = timeValue || '00:00:00'
|
||||
if (timeDataValue.split(':').length == 3) {
|
||||
timeDataValue = timeDataValue
|
||||
} else {
|
||||
timeDataValue = timeDataValue + ':00'
|
||||
}
|
||||
} else if (timeType == 2) {
|
||||
timeDataValue = dataValue
|
||||
} else if (timeType == 3) {
|
||||
timeDataValue = this.jnpf.toDate(new Date(), format)
|
||||
} else if (timeType == 4) {
|
||||
let previousDate = '';
|
||||
previousDate = getBeforeTime(timeTarget, timeValue)
|
||||
timeDataValue = this.jnpf.toDate(previousDate, format)
|
||||
} else if (timeType == 5) {
|
||||
let previousDate = '';
|
||||
previousDate = getLaterTime(timeTarget, timeValue)
|
||||
timeDataValue = this.jnpf.toDate(previousDate, format)
|
||||
}
|
||||
}
|
||||
return timeDataValue;
|
||||
},
|
||||
initData(){
|
||||
this.$nextTick(function(){
|
||||
if (this.dataForm.f_id) {
|
||||
this.loading = true
|
||||
request({
|
||||
url: '/api/example/Team/'+this.dataForm.f_id,
|
||||
method: 'get',
|
||||
}).then(res => {
|
||||
this.dataInfo(res.data)
|
||||
this.loading = false
|
||||
})
|
||||
}else {
|
||||
this.initDefaultData()
|
||||
}
|
||||
})
|
||||
},
|
||||
beforeSubmit(){
|
||||
const _data =this.dataList()
|
||||
return _data
|
||||
},
|
||||
submitForm(type){
|
||||
var _data = this.dataList()
|
||||
this.$refs.dataForm.validate(valid => {
|
||||
if (!valid) return
|
||||
if (!!this.exist()) return this.$u.toast(
|
||||
this.exist()
|
||||
)
|
||||
this.btnLoading = true
|
||||
if (this.dataForm.f_id) {
|
||||
request({
|
||||
url: '/api/example/Team/' + this.dataForm.f_id,
|
||||
method: 'put',
|
||||
data: _data,
|
||||
}).then(res => {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
complete: () => {
|
||||
setTimeout(() => {
|
||||
if(type!=1){
|
||||
uni.$emit('refresh')
|
||||
uni.navigateBack()
|
||||
}
|
||||
this.btnLoading = false
|
||||
}, 1500)
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
this.btnLoading = false
|
||||
})
|
||||
}else {
|
||||
request({
|
||||
url: '/api/example/Team',
|
||||
method: 'post',
|
||||
data: _data,
|
||||
}).then(res => {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
complete: () => {
|
||||
setTimeout(() => {
|
||||
if(type==1){
|
||||
this.dataForm = JSON.parse(JSON.stringify(this.dataValue))
|
||||
this.initDefaultData()
|
||||
}else{
|
||||
uni.$emit('refresh')
|
||||
uni.navigateBack()
|
||||
}
|
||||
this.btnLoading = false
|
||||
}, 1500)
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
this.btnLoading = false
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
initDefaultData() {
|
||||
},
|
||||
selfInit() {
|
||||
useBaseStore().updateRelationData({})
|
||||
},
|
||||
selfGetInfo(dataForm){
|
||||
this.dataForm.id = this.dataForm.f_id
|
||||
this.dataInfo(dataForm)
|
||||
},
|
||||
dataList(){
|
||||
var _data = this.dataForm;
|
||||
return _data;
|
||||
},
|
||||
dataInfo(dataAll){
|
||||
let dataList = JSON.parse(JSON.stringify(dataAll))
|
||||
this.dataForm=dataList
|
||||
this.isEdit = true
|
||||
this.dataAll()
|
||||
this.isEdit = false
|
||||
this.childIndex=-1
|
||||
this.collapse()
|
||||
setTimeout(() => {
|
||||
uni.$emit('initCollapse')
|
||||
}, 50)
|
||||
},
|
||||
collapse(){
|
||||
setTimeout(()=> {
|
||||
}, 50);
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
</script>
|
||||
<style>
|
||||
page{
|
||||
background-color: #f0f2f6;
|
||||
}
|
||||
</style>
|
||||
@@ -1,617 +0,0 @@
|
||||
<template>
|
||||
<view class="dynamicModel-list-v" >
|
||||
<view class="u-flex top-btn" :class="slide2" v-show="ids.length">
|
||||
<view class="button-left" @click.stop="cancel">
|
||||
<p class="u-m-t-10 u-font-28">{{$t('common.cancelText')}}</p>
|
||||
</view>
|
||||
<view class="button-center">
|
||||
<p class="u-m-t-10 u-font-28">{{$t('component.jnpf.common.selected')}}({{ids.length}})</p>
|
||||
</view>
|
||||
<view class="button-right u-m-t-12" @click.stop="checkAll">
|
||||
<p class="icon-ym icon-ym-app-checkAll " :style="{'color':this.checkedAll ? '#0293fc' : '#303133'}">
|
||||
</p>
|
||||
</view>
|
||||
</view>
|
||||
<view class="head-warp com-dropdown">
|
||||
<u-dropdown class="u-dropdown" ref="uDropdown" type="page" @open="showTop = true" @close="showTop = false">
|
||||
<u-dropdown-item :title="$t('app.apply.sort','排序')" :options="sortOptions">
|
||||
<view class="screen-box">
|
||||
<view class="screen-list" v-if="sortOptions.length">
|
||||
<view class="u-p-l-20 u-p-r-20 list">
|
||||
<scroll-view scroll-y="true" style="height: 100%;">
|
||||
<u-cell-group :border="false">
|
||||
<u-cell-item @click="cellClick(item)" :arrow="false" :title="item.labelI18nCode ? $t(item.labelI18nCode) + ' ' + $t(item.sortType) : item.label"
|
||||
v-for="(item, index) in sortOptions" :key="index" :title-style="{
|
||||
color: sortValue.includes(item.value) ? '#2979ff' : '#606266' }">
|
||||
<u-icon v-if="sortValue.includes(item.value)" name="checkbox-mark"
|
||||
color="#2979ff" size="32" />
|
||||
</u-cell-item>
|
||||
</u-cell-group>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<view class="u-flex screen-btn">
|
||||
<text class="btn btn1" @click="handleSortReset">{{$t('common.cleanText','清空')}}</text>
|
||||
<text class="btn btn2" @click="handleSortSearch">{{$t('common.okText','确定')}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<JnpfEmpty v-else></JnpfEmpty>
|
||||
|
||||
</view>
|
||||
</u-dropdown-item>
|
||||
<u-dropdown-item :title="$t('app.apply.screen','筛选')">
|
||||
<view class="screen-box u-flex-col">
|
||||
<view class="screen-list">
|
||||
<view class="u-p-l-20 u-p-r-20 list">
|
||||
<scroll-view scroll-y="true" :show-scrollbar="true" :enhanced="true" style="height: 100%;">
|
||||
<u-form :label-width="150" class="u-p-1-20 u-p-r-20">
|
||||
<u-form-item label= "关联大赛">
|
||||
<JnpfInput v-model="searchForm.f_competition_id"
|
||||
:placeholder="$t('common.inputText')+ ' ' + '关联大赛'"
|
||||
:key="'searchForm.f_competition_id'"
|
||||
input-align='right' clearable :templateJson="interfaceRes.f_competition_id" selectType="all" />
|
||||
</u-form-item>
|
||||
<u-form-item label= "团队名称">
|
||||
<JnpfInput v-model="searchForm.f_team_name"
|
||||
:placeholder="$t('common.inputText')+ ' ' + '团队名称'"
|
||||
:key="'searchForm.f_team_name'"
|
||||
input-align='right' clearable :templateJson="interfaceRes.f_team_name" selectType="all" />
|
||||
</u-form-item>
|
||||
<u-form-item label= "邀请码">
|
||||
<JnpfInput v-model="searchForm.f_team_code"
|
||||
:placeholder="$t('common.inputText')+ ' ' + '邀请码'"
|
||||
:key="'searchForm.f_team_code'"
|
||||
input-align='right' clearable :templateJson="interfaceRes.f_team_code" selectType="all" />
|
||||
</u-form-item>
|
||||
<u-form-item label= "团队口号">
|
||||
<JnpfInput v-model="searchForm.f_slogan"
|
||||
:placeholder="$t('common.inputText')+ ' ' + '团队口号'"
|
||||
:key="'searchForm.f_slogan'"
|
||||
input-align='right' clearable :templateJson="interfaceRes.f_slogan" selectType="all" />
|
||||
</u-form-item>
|
||||
<u-form-item label= "状态">
|
||||
<JnpfInput v-model="searchForm.f_status"
|
||||
:placeholder="$t('common.inputText')+ ' ' + '状态'"
|
||||
:key="'searchForm.f_status'"
|
||||
input-align='right' clearable :templateJson="interfaceRes.f_status" selectType="all" />
|
||||
</u-form-item>
|
||||
<u-form-item label= "拒绝原因">
|
||||
<JnpfInput v-model="searchForm.f_reject_reason"
|
||||
:placeholder="$t('common.inputText')+ ' ' + '拒绝原因'"
|
||||
:key="'searchForm.f_reject_reason'"
|
||||
input-align='right' clearable :templateJson="interfaceRes.f_reject_reason" selectType="all" />
|
||||
</u-form-item>
|
||||
<u-form-item label= "报名时间">
|
||||
<JnpfInput v-model="searchForm.f_enroll_time"
|
||||
:placeholder="$t('common.inputText')+ ' ' + '报名时间'"
|
||||
:key="'searchForm.f_enroll_time'"
|
||||
input-align='right' clearable :templateJson="interfaceRes.f_enroll_time" selectType="all" />
|
||||
</u-form-item>
|
||||
</u-form>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<view class="u-flex screen-btn">
|
||||
<text @click="reset" class="btn btn1">{{$t('common.resetText')}}</text>
|
||||
<text @click="closeDropdown" class="btn btn2">{{$t('common.searchText')}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
</u-dropdown-item>
|
||||
</u-dropdown>
|
||||
</view>
|
||||
<view class="list-warp">
|
||||
<mescroll-uni ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback" :up="upOption" :fixed="false">
|
||||
<view class="list u-p-b-20 u-p-l-20 u-p-r-20">
|
||||
<view class="list-box">
|
||||
<SwipeItem :list="list" :buttons="options" @action="actionClick" ref="swipeItem" :marginB="20" class="u-m-t-20">
|
||||
<template v-slot="{ item }">
|
||||
<view class="item" @click="goDetail(item)" style="border: 1px solid #fff;">
|
||||
<u-checkbox v-if="isBatchRemove" @change="checkboxChange($event,item)"
|
||||
v-model="item.checked" class="checkbox" @tap.stop shape="circle"/>
|
||||
<view class="u-line-1 item-cell" v-for="(column,i) in columnList" :key="i">
|
||||
<template v-if="column.jnpfKey != 'table'">
|
||||
<text class="item-cell-label">{{column.label}}:</text>
|
||||
<text class="item-cell-content" v-if="['calculate','inputNumber'].includes(column.jnpfKey) && column.thousands">{{toThousands(item[column.prop],column)}}</text>
|
||||
<text class="item-cell-content text-primary" v-else-if="column.jnpfKey == 'relationForm'" @click.stop="relationFormClick(item,column)" >{{item[column.prop]}}</text>
|
||||
<view class="item-cell-content" v-else-if="column.jnpfKey == 'sign'">
|
||||
<JnpfSign v-model="item[column.prop]" align="left" detailed />
|
||||
</view>
|
||||
<view class="item-cell-content" v-else-if="column.jnpfKey == 'signature'">
|
||||
<JnpfSignature v-model="item[column.prop]" align="left" detailed />
|
||||
</view>
|
||||
<view class="item-cell-content" v-else-if="column.jnpfKey == 'uploadImg'" @click.stop>
|
||||
<JnpfUploadImg v-model="item[column.prop]" detailed simple v-if="item[column.prop]&&item[column.prop].length" />
|
||||
</view>
|
||||
<view class="item-cell-content" v-else-if="column.jnpfKey == 'uploadFile'" @click.stop>
|
||||
<JnpfUploadFile v-model="item[column.prop]" detailed v-if="item[column.prop]&&item[column.prop].length" align="left" />
|
||||
</view>
|
||||
<view class="item-cell-content" v-else-if="column.jnpfKey == 'rate'">
|
||||
<JnpfRate v-model="item[column.prop]" :max="column.count" :allowHalf="column.allowHalf" disabled />
|
||||
</view>
|
||||
<view class="item-cell-content item-cell-slider" v-else-if="column.jnpfKey == 'slider'">
|
||||
<JnpfSlider v-model="item[column.prop]" :min="column.min" :max="column.max" :step="column.step" disabled />
|
||||
</view>
|
||||
<view class="item-cell-content" v-else-if="column.jnpfKey == 'input'">
|
||||
<JnpfInput v-model="item[column.prop]" detailed showOverflow :useMask="column.useMask" :maskConfig="column.maskConfig" align='left' />
|
||||
</view>
|
||||
<text class="item-cell-content" v-else>{{item[column.prop]}}</text>
|
||||
</template>
|
||||
<tableCell v-else @click.stop :label="column.label" :childList="item[column.prop]" @cRelationForm="relationFormClick" :children="column.children"
|
||||
ref="tableCell" :pageLen="3"/>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
</SwipeItem>
|
||||
</view>
|
||||
</view>
|
||||
</mescroll-uni>
|
||||
</view>
|
||||
<view v-if="!showTop">
|
||||
<view class="com-addBtn" @click="addPage()" >
|
||||
<u-icon name="plus" size="60" color="#fff" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="u-flex bottom-btn" :class="slide" v-show="isBatchRemove && list.length">
|
||||
<view class="button-preIcon" @click.stop="batchDelete">
|
||||
<p class="icon-ym icon-ym-app-delete u-m-b-8"></p>
|
||||
<p class="u-m-t-10 u-font-24">{{$t('common.batchDelText','批量删除')}}</p>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import resources from '@/libs/resources.js'
|
||||
import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
|
||||
import tableCell from '../dynamicModel/components/tableCell.vue'
|
||||
import {
|
||||
getDictionaryDataSelector,
|
||||
getDataInterfaceRes
|
||||
} from '@/api/common'
|
||||
import {
|
||||
useBaseStore
|
||||
} from '@/store/modules/base'
|
||||
const baseStore = useBaseStore()
|
||||
import request from '@/utils/request'
|
||||
import appColumnList from './columnList'
|
||||
import jnpf from "@/utils/jnpf";
|
||||
import SwipeItem from "@/components/SwipeItem/index"
|
||||
|
||||
const now = new Date()
|
||||
|
||||
export default {
|
||||
mixins: [MescrollMixin],
|
||||
components: {
|
||||
tableCell,
|
||||
SwipeItem
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
slide: '',
|
||||
slide2: '',
|
||||
checkedAll: false,
|
||||
ids: [],
|
||||
isBatchRemove: false,
|
||||
isAuthority:true,
|
||||
icon: resources.message.nodata,
|
||||
sortValue: [],
|
||||
searchForm: {
|
||||
f_competition_id:undefined,
|
||||
f_team_name:undefined,
|
||||
f_team_code:undefined,
|
||||
f_slogan:undefined,
|
||||
f_status:undefined,
|
||||
f_reject_reason:undefined,
|
||||
f_enroll_time:undefined,
|
||||
},
|
||||
downOption: {
|
||||
use: true,
|
||||
auto: false
|
||||
},
|
||||
dataOptions:{
|
||||
},
|
||||
upOption: {
|
||||
page: {
|
||||
num: 0,
|
||||
size: 20,
|
||||
time: null,
|
||||
},
|
||||
empty: {
|
||||
use: true,
|
||||
icon: resources.message.nodata,
|
||||
tip: "暂无数据",
|
||||
fixed: true,
|
||||
zIndex: 5,
|
||||
},
|
||||
textNoMore: '没有更多数据',
|
||||
toTop: {
|
||||
bottom: 250
|
||||
}
|
||||
},
|
||||
list: [],
|
||||
appColumnList:appColumnList,
|
||||
listQuery: {
|
||||
moduleId:'839111280835952709',
|
||||
sidx: '',
|
||||
keyword: '',
|
||||
json: ''
|
||||
},
|
||||
options: [
|
||||
{
|
||||
value: 'remove',
|
||||
text: '删除',
|
||||
text2: 'common.delText' ,
|
||||
style: {
|
||||
backgroundColor: '#dd524d'
|
||||
}
|
||||
}
|
||||
],
|
||||
sortOptions:[
|
||||
],
|
||||
ableAll:{
|
||||
},
|
||||
interfaceRes:{
|
||||
f_competition_id:[
|
||||
],
|
||||
f_team_name:[
|
||||
],
|
||||
f_team_code:[
|
||||
],
|
||||
f_slogan:[
|
||||
],
|
||||
f_status:[
|
||||
],
|
||||
f_reject_reason:[
|
||||
],
|
||||
f_enroll_time:[
|
||||
],
|
||||
},
|
||||
menuId:'',
|
||||
columnList:[],
|
||||
key:new Date(),
|
||||
dataValue:{},
|
||||
userInfo:{},
|
||||
firstInitSearchData:false,
|
||||
tabList: [],
|
||||
tabKey:0,
|
||||
showTop: false,
|
||||
}
|
||||
},
|
||||
onLoad(e){
|
||||
this.userInfo = uni.getStorageSync('userInfo') || {}
|
||||
this.menuId = e.menuId
|
||||
this.setDefaultQuery()
|
||||
this.dataAll()
|
||||
this.getColumnList()
|
||||
},
|
||||
onShow() {
|
||||
this.$nextTick(()=>{
|
||||
this.mescroll.resetUpScroll()
|
||||
})
|
||||
},
|
||||
onUnload() {
|
||||
uni.$off('refresh')
|
||||
},
|
||||
methods:{
|
||||
toThousands(val, column) {
|
||||
if (val) {
|
||||
let valList = val.toString().split('.')
|
||||
let num = Number(valList[0])
|
||||
let newVal = column.thousands ? num.toLocaleString() : num
|
||||
return valList[1] ? newVal + '.' + valList[1] : newVal
|
||||
} else {
|
||||
return val
|
||||
}
|
||||
},
|
||||
dataAll(){
|
||||
},
|
||||
setDefaultQuery() {
|
||||
const defaultSortConfig= []
|
||||
const sortField = defaultSortConfig.map(o => (o.sort === 'desc' ? '-' : '') + o.field)
|
||||
this.listQuery.sidx = sortField.join(',')
|
||||
},
|
||||
//初始化查询的默认数据
|
||||
async initSearchData() {
|
||||
this.dataValue = JSON.parse(JSON.stringify(this.searchForm))
|
||||
},
|
||||
relationFormClick(item,column) {
|
||||
let vModel = column.__vModel__ +"_id"
|
||||
let id = item[vModel]
|
||||
let modelId = column.modelId
|
||||
if (!id || !modelId) return
|
||||
let config = {
|
||||
modelId: modelId,
|
||||
id: id,
|
||||
formTitle: '详情',
|
||||
noShowBtn: 1,
|
||||
noDataLog: 1,
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
const url ='/pages/apply/dynamicModel/detail?config=' + this.jnpf.base64.encode(JSON.stringify(config),"UTF-8")
|
||||
uni.navigateTo({
|
||||
url: url
|
||||
})
|
||||
})
|
||||
},
|
||||
async upCallback(page) {
|
||||
this.cancel()
|
||||
if(!this.firstInitSearchData) {
|
||||
await this.initSearchData()
|
||||
this.firstInitSearchData = true
|
||||
}
|
||||
const query = {
|
||||
currentPage: page.num,
|
||||
pageSize: page.size,
|
||||
menuId : this.menuId,
|
||||
...this.listQuery,
|
||||
...this.searchForm,
|
||||
dataType:0,
|
||||
}
|
||||
request({
|
||||
url: '/api/example/Team/getList',
|
||||
method: 'post',
|
||||
data: query,
|
||||
}).then(res => {
|
||||
let _list = res.data.list;
|
||||
this.mescroll.endSuccess(_list.length);
|
||||
if (page.num == 1) this.list = [];
|
||||
const list = _list.map(o => ({
|
||||
show: false,
|
||||
...o
|
||||
}));
|
||||
this.list = this.list.concat(_list);
|
||||
}).catch(() => {
|
||||
this.mescroll.endSuccess(this.list.length);
|
||||
})
|
||||
},
|
||||
open(index) {
|
||||
this.list[index].show = true;
|
||||
this.list.map((val, idx) => {
|
||||
if (index != idx) this.list[idx].show = false;
|
||||
})
|
||||
},
|
||||
actionClick(item) {
|
||||
if (this.options[item.index].value === 'remove') return this.handleClick(item.index)
|
||||
},
|
||||
handleClick(index) {
|
||||
const item = this.list[index]
|
||||
const _data={ids:[item.id] }
|
||||
request({
|
||||
url: '/api/example/Team/batchRemove',
|
||||
data: _data,
|
||||
method: 'delete'
|
||||
}).then(res => {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
complete: () => {
|
||||
this.$u.toast(res.msg)
|
||||
this.mescroll.resetUpScroll()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
open(index) {
|
||||
this.list[index].show = true;
|
||||
this.list.map((val, idx) => {
|
||||
if (index != idx) this.list[idx].show = false;
|
||||
})
|
||||
},
|
||||
search() {
|
||||
if (this.isPreview == '1') return
|
||||
this.searchTimer && clearTimeout(this.searchTimer)
|
||||
this.searchTimer = setTimeout(() => {
|
||||
this.list = [];
|
||||
this.mescroll.resetUpScroll();
|
||||
}, 300)
|
||||
},
|
||||
goDetail(item) {
|
||||
let id = item.id
|
||||
let btnType = ''
|
||||
let btnList = []
|
||||
btnList.push('btn_edit')
|
||||
btnList.push('btn_detail')
|
||||
if(btnList.length==0) return
|
||||
this.jumPage(id,btnList)
|
||||
},
|
||||
addPage() {
|
||||
this.jumPage()
|
||||
},
|
||||
jumPage(id, btnList) {
|
||||
let idVal = id ? "&id=" + id : ''
|
||||
let idList = []
|
||||
for(let i=0;i<this.list.length;i++){
|
||||
idList.push(this.list[i].id)
|
||||
}
|
||||
let idListVal = "&idList="+idList
|
||||
if (!id){
|
||||
uni.navigateTo({
|
||||
url: "./form?menuId=" + this.menuId + "&jurisdictionType=btn_add"
|
||||
})
|
||||
} else if(btnList.includes('btn_detail')){
|
||||
uni.navigateTo({
|
||||
url: "./detail?menuId=" + this.menuId + "&btnList=" + btnList + idVal+idListVal
|
||||
})
|
||||
} else if(btnList.includes('btn_edit')){
|
||||
uni.navigateTo({
|
||||
url: "./form?menuId=" + this.menuId + "&jurisdictionType=btn_edit&btnList=" + btnList + idVal+idListVal
|
||||
})
|
||||
}
|
||||
},
|
||||
checkboxChange(e, item) {
|
||||
if (e.value) {
|
||||
this.ids.push(item.id)
|
||||
} else {
|
||||
this.ids = this.ids.filter(o => o !== item.id)
|
||||
}
|
||||
if (this.ids.length){
|
||||
this.isBatchRemove = true
|
||||
}
|
||||
},
|
||||
batchDelete() {
|
||||
const item = this.ids
|
||||
if (!item.length) {
|
||||
return this.$u.toast("请选择一条数据")
|
||||
}
|
||||
const _data={ ids:item }
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '删除后数据无法恢复',
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
request({
|
||||
url: '/api/example/Team/batchRemove',
|
||||
data: _data,
|
||||
method: 'delete'
|
||||
}).then(res => {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
complete: () => {
|
||||
this.cancel()
|
||||
this.$u.toast(res.msg)
|
||||
this.mescroll.resetUpScroll()
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
openBatchOperate() {
|
||||
this.isBatchRemove = !this.isBatchRemove
|
||||
if (this.isBatchRemove) {
|
||||
this.slide = 'slide-up'
|
||||
this.slide2 = 'slide-up2'
|
||||
}
|
||||
},
|
||||
checkAll() {
|
||||
this.checkedAll = !this.checkedAll
|
||||
this.isBatchRemove = true
|
||||
this.ids = []
|
||||
this.list = this.list.map(o => ({
|
||||
...o,
|
||||
checked: this.checkedAll,
|
||||
}))
|
||||
this.list.forEach(o=>{
|
||||
if(this.checkedAll) this.ids.push(o.id)
|
||||
})
|
||||
},
|
||||
cancel() {
|
||||
this.list = this.list.map(o => ({
|
||||
...o,
|
||||
checked: false
|
||||
}))
|
||||
this.checkedAll = false
|
||||
this.ids = []
|
||||
},
|
||||
getColumnList() {
|
||||
let columnPermissionList = []
|
||||
let _appColumnList =this.appColumnList
|
||||
for (let i = 0; i < _appColumnList.length; i++) {
|
||||
columnPermissionList.push(_appColumnList[i])
|
||||
}
|
||||
this.columnList = this.transformColumnList(columnPermissionList, this.dataOptions)
|
||||
},
|
||||
transformColumnList(columnList, dataOptions) {
|
||||
let list = []
|
||||
for (let i = 0; i < columnList.length; i++) {
|
||||
let e = columnList[i]
|
||||
if(e.jnpfKey != 'calculate'){
|
||||
let columProp = e.prop
|
||||
let label = e.label
|
||||
let option = null
|
||||
let options = columProp + "Options"
|
||||
if (!columProp.includes('-')) {
|
||||
columProp = columProp
|
||||
e.label = e.labelI18nCode ? this.$t(e.labelI18nCode):label
|
||||
e.prop = columProp
|
||||
e.option = option
|
||||
list.push(e)
|
||||
} else {
|
||||
e.vModel = columProp.split('-')[1]
|
||||
e.childLabel = e.fullNameI18nCode && e.fullNameI18nCode[1] ? this.$t(e.fullNameI18nCode[1]): e.label.split('-')[1]
|
||||
options = e.vModel + "Options"
|
||||
let prop = columProp.split('-')[0]
|
||||
let label = e.fullNameI18nCode && e.fullNameI18nCode[0] ? this.$t(e.fullNameI18nCode[0]): e.label.split('-')[0]
|
||||
let newItem = {
|
||||
align: "center",
|
||||
jnpfKey: "table",
|
||||
prop,
|
||||
label,
|
||||
children: []
|
||||
}
|
||||
if (!list.some(o => o.prop === prop)) list.push(newItem)
|
||||
for (let i = 0; i < list.length; i++) {
|
||||
if (list[i].prop === prop) {
|
||||
e.prop = e.prop
|
||||
e.vModel = e.vModel
|
||||
e.option = option
|
||||
list[i].children.push(e)
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return list
|
||||
},
|
||||
cellClick(item) {
|
||||
const findIndex = this.sortValue.findIndex(o => o === item.value);
|
||||
if (findIndex < 0) {
|
||||
const findLikeIndex = this.sortValue.findIndex(o => o.indexOf(item.sidx) > -1);
|
||||
if (findLikeIndex > -1) this.sortValue.splice(findLikeIndex, 1)
|
||||
this.sortValue.push(item.value)
|
||||
} else {
|
||||
this.sortValue.splice(findIndex, 1)
|
||||
}
|
||||
},
|
||||
handleSortReset() {
|
||||
this.sortValue = []
|
||||
},
|
||||
handleSortSearch() {
|
||||
if (this.sortValue.length) {
|
||||
this.listQuery.sidx = this.sortValue.join(',')
|
||||
} else {
|
||||
this.setDefaultQuery()
|
||||
}
|
||||
this.$refs.uDropdown.close();
|
||||
this.$nextTick(() => {
|
||||
this.list = [];
|
||||
this.mescroll.resetUpScroll();
|
||||
})
|
||||
},
|
||||
reset() {
|
||||
this.searchForm = JSON.parse(JSON.stringify(this.dataValue))
|
||||
this.key = new Date()
|
||||
},
|
||||
closeDropdown() {
|
||||
this.$refs.uDropdown.close();
|
||||
this.$nextTick(() => {
|
||||
this.list = [];
|
||||
this.mescroll.resetUpScroll();
|
||||
})
|
||||
},
|
||||
dataList(data){
|
||||
let _list =data.list
|
||||
return _list;
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background-color: #f0f2f6;
|
||||
height: 100%;
|
||||
/* #ifdef MP-ALIPAY */
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
/* #endif */
|
||||
}
|
||||
:deep(.u-cell) {
|
||||
padding: 0rpx;
|
||||
height: 112rpx;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -1,212 +0,0 @@
|
||||
<script lang="ts" setup>
|
||||
import { getDetailInfo } from './helper/api';
|
||||
import { getConfigData } from '#/api/onlineDev/visualDev';
|
||||
import { reactive, toRefs, nextTick, ref, computed, unref ,toRaw} from 'vue';
|
||||
import { BasicModal, useModal } from '@jnpf/ui/modal';
|
||||
// 有关联表单详情
|
||||
import RelationDetail from '#/views/common/dynamicModel/list/detail/index.vue';
|
||||
// 表单权限
|
||||
import { useMessage,usePermission } from '@jnpf/hooks';
|
||||
import { CaretRightOutlined } from '@ant-design/icons-vue';
|
||||
import { buildUUID } from '@jnpf/utils';
|
||||
import { $t } from '#/locales';
|
||||
import { getDataChange } from '#/api/onlineDev/visualDev';
|
||||
import { getDataInterfaceDataInfoByIds } from '#/api/systemData/dataInterface';
|
||||
import { JnpfExtraRelationInfo } from '#/components/Jnpf';
|
||||
|
||||
interface State {
|
||||
dataForm: any;
|
||||
title: string;
|
||||
maskConfig: any;
|
||||
interfaceRes: any;
|
||||
locationScope: any;
|
||||
carousel:any;
|
||||
extraOptions: any;
|
||||
extraData: any;
|
||||
|
||||
}
|
||||
|
||||
defineOptions({ name: 'Detail' });
|
||||
const { createMessage, createConfirm } = useMessage();
|
||||
const [registerModal, { openModal, setModalProps, closeModal }] = useModal();
|
||||
|
||||
const relationDetailRef = ref<any>(null);
|
||||
const state = reactive<State>({
|
||||
dataForm:{},
|
||||
title: $t('common.detailText','详情'),
|
||||
maskConfig:{
|
||||
f_team_name: {},
|
||||
f_team_code: {},
|
||||
f_slogan: {},
|
||||
}
|
||||
,
|
||||
interfaceRes: {"f_team_name":[],"f_reject_reason":[],"f_competition_id":[],"f_team_code":[],"f_slogan":[],"f_status":[],"f_enroll_time":[]},
|
||||
locationScope:{
|
||||
}
|
||||
,
|
||||
carousel:{
|
||||
}
|
||||
,
|
||||
extraOptions: {
|
||||
f_competition_id:[],
|
||||
}
|
||||
,
|
||||
extraData: {
|
||||
f_competition_id:{},
|
||||
}
|
||||
,
|
||||
});
|
||||
const { title, dataForm, maskConfig } = toRefs(state);
|
||||
// 表单权限
|
||||
const { hasFormP } = usePermission();
|
||||
|
||||
defineExpose({ init });
|
||||
|
||||
function init(data) {
|
||||
state.dataForm.id = data.id;
|
||||
openModal();
|
||||
nextTick(() => {
|
||||
setTimeout(initData, 0);
|
||||
});
|
||||
}
|
||||
function initData() {
|
||||
changeLoading(true);
|
||||
if (state.dataForm.id) {
|
||||
getData(state.dataForm.id);
|
||||
} else {
|
||||
closeModal();
|
||||
}
|
||||
}
|
||||
function getData(id) {
|
||||
getDetailInfo(id).then((res) => {
|
||||
state.dataForm = res.data || {};
|
||||
nextTick(() => {
|
||||
getf_competition_idExtraInfo();
|
||||
changeLoading(false);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function toDetail(modelId, id, propsValue) {
|
||||
if (!id) return;
|
||||
getConfigData(modelId).then((res) => {
|
||||
if (!res.data || !res.data.formData) return;
|
||||
const formConf = JSON.parse(res.data.formData);
|
||||
formConf.popupType = 'general';
|
||||
formConf.hasPrintBtn = false;
|
||||
formConf.customBtns = [];
|
||||
const data = { id, formConf, modelId, propsValue};
|
||||
relationDetailRef.value?.init(data);
|
||||
});
|
||||
}
|
||||
function setFormProps(data) {
|
||||
setModalProps(data);
|
||||
}
|
||||
function changeLoading(loading) {
|
||||
setFormProps({ loading });
|
||||
}
|
||||
|
||||
function getParamList(key) {
|
||||
let templateJson: any[] = state.interfaceRes[key];
|
||||
if (!templateJson || !templateJson.length || !state.dataForm) return templateJson;
|
||||
for (let i = 0; i < templateJson.length; i++) {
|
||||
if (templateJson[i].relationField && templateJson[i].sourceType == 1) {
|
||||
templateJson[i].defaultValue = state.dataForm[templateJson[i].relationField + '_id'] || '';
|
||||
}
|
||||
}
|
||||
return templateJson;
|
||||
}
|
||||
function getf_competition_idExtraInfo(){
|
||||
if (!state.dataForm.f_competition_id_id) return;
|
||||
let query: any = {
|
||||
id: state.dataForm.f_competition_id_id,
|
||||
};
|
||||
getDataChange('', query).then(res => {
|
||||
if (!res.data || !res.data.data) return;
|
||||
const data = JSON.parse(res.data.data);
|
||||
state.extraData.f_competition_id = data;
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<template>
|
||||
<BasicModal v-bind="$attrs" @register="registerModal" :title="title" width="600px"
|
||||
:minHeight="100" :showOkBtn="false" can-fullscreen>
|
||||
<template #insertFooter>
|
||||
</template>
|
||||
<!-- 表单 -->
|
||||
<a-row class="dynamic-form ">
|
||||
<a-form :colon="false" size="110" layout= "horizontal"
|
||||
labelAlign= "right"
|
||||
:labelCol="{ style: { width: '100px' } }" :model="dataForm" ref="formRef">
|
||||
<a-row :gutter="15">
|
||||
<!-- 具体表单 -->
|
||||
<a-col :span="24" class="ant-col-item" >
|
||||
<a-form-item
|
||||
name="f_competition_id" >
|
||||
<template #label>关联大赛
|
||||
</template> <p class="link-text leading-[32px]" @click="toDetail('', dataForm.f_competition_id_id,'${html.propsValue}')">{{ dataForm.f_competition_id }}</p>
|
||||
<JnpfExtraRelationInfo :extraOptions="state.extraOptions.f_competition_id" :data="state.extraData.f_competition_id"
|
||||
v-if="state.extraOptions.f_competition_id?.length && state.extraData.f_competition_id && JSON.stringify(state.extraData.f_competition_id) !== '{}'" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24" class="ant-col-item" >
|
||||
<a-form-item
|
||||
name="f_team_name" >
|
||||
<template #label>团队名称
|
||||
</template> <JnpfInput v-model:value="dataForm.f_team_name"
|
||||
disabled
|
||||
detailed >
|
||||
</JnpfInput>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24" class="ant-col-item" >
|
||||
<a-form-item
|
||||
name="f_team_code" >
|
||||
<template #label>邀请码
|
||||
</template> <JnpfInput v-model:value="dataForm.f_team_code"
|
||||
disabled
|
||||
detailed >
|
||||
</JnpfInput>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24" class="ant-col-item" >
|
||||
<a-form-item
|
||||
name="f_slogan" >
|
||||
<template #label>团队口号
|
||||
</template> <JnpfInput v-model:value="dataForm.f_slogan"
|
||||
disabled
|
||||
detailed >
|
||||
</JnpfInput>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24" class="ant-col-item" >
|
||||
<a-form-item
|
||||
name="f_status" >
|
||||
<template #label>状态
|
||||
</template> <p>{{dataForm.f_status}}</p>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24" class="ant-col-item" >
|
||||
<a-form-item
|
||||
name="f_reject_reason" >
|
||||
<template #label>拒绝原因
|
||||
</template> <p>{{dataForm.f_reject_reason}}</p>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24" class="ant-col-item" >
|
||||
<a-form-item
|
||||
name="f_enroll_time" >
|
||||
<template #label>报名时间
|
||||
</template> <p>{{dataForm.f_enroll_time}}</p>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<!-- 表单结束 -->
|
||||
</a-row>
|
||||
</a-form>
|
||||
</a-row>
|
||||
</BasicModal>
|
||||
<!-- 有关联表单详情:开始 -->
|
||||
<RelationDetail ref="relationDetailRef" />
|
||||
<!-- 有关联表单详情:结束 -->
|
||||
</template>
|
||||
|
||||
@@ -1,432 +0,0 @@
|
||||
<script lang="ts" setup>
|
||||
import { create, update, getInfo } from './helper/api';
|
||||
import { reactive, toRefs, nextTick, ref, unref, computed,toRaw, inject } from 'vue';
|
||||
import { BasicModal, useModal } from '@jnpf/ui/modal';
|
||||
import { useMessage ,usePermission} from '@jnpf/hooks';
|
||||
import { $t } from '#/locales';
|
||||
import { useUserStore } from '@vben/stores';
|
||||
import type { FormInstance } from 'ant-design-vue';
|
||||
import { thousandsFormat , getDateTimeUnit, getTimeUnit,buildUUID} from '@jnpf/utils';
|
||||
import { getDictionaryDataSelector } from '#/api/systemData/dictionary';
|
||||
import { getDataInterfaceRes } from '#/api/systemData/dataInterface';
|
||||
import dayjs from 'dayjs';
|
||||
// 表单权限
|
||||
import { cloneDeep } from 'lodash-es';
|
||||
import { CaretRightOutlined } from '@ant-design/icons-vue';
|
||||
|
||||
|
||||
interface State {
|
||||
dataForm: any;
|
||||
tableRows: any;
|
||||
dataRule: any;
|
||||
optionsObj: any;
|
||||
childIndex: any;
|
||||
isEdit: any;
|
||||
interfaceRes: any;
|
||||
//可选范围默认值
|
||||
ableAll: any;
|
||||
//掩码配置
|
||||
maskConfig:any;
|
||||
//定位属性
|
||||
locationScope:any;
|
||||
//轮播图
|
||||
carousel:any;
|
||||
extraOptions: any;
|
||||
title: string;
|
||||
continueText: string; allList: any[];
|
||||
currIndex: number;
|
||||
isContinue: boolean;
|
||||
submitType: number;
|
||||
showContinueBtn: boolean;
|
||||
}
|
||||
|
||||
const emit = defineEmits(['reload']);
|
||||
const getLeftTreeActiveInfo: (() => any) | null = inject('getLeftTreeActiveInfo', null);
|
||||
const userStore = useUserStore();
|
||||
const userInfo:any = userStore.getUserInfo;
|
||||
const { createMessage, createConfirm } = useMessage();
|
||||
const [registerModal, { openModal, setModalProps }] = useModal();
|
||||
const formRef = ref<FormInstance>();
|
||||
const state = reactive<State>({
|
||||
dataForm: {
|
||||
f_competition_id:undefined,
|
||||
f_team_name:undefined,
|
||||
f_team_code:undefined,
|
||||
f_slogan:undefined,
|
||||
f_status:undefined,
|
||||
f_reject_reason:undefined,
|
||||
f_enroll_time:undefined,
|
||||
},
|
||||
|
||||
tableRows:{
|
||||
},
|
||||
|
||||
dataRule: {
|
||||
f_competition_id: [
|
||||
{
|
||||
required: true,
|
||||
message: $t('sys.validate.textRequiredSuffix','不能为空'),
|
||||
trigger: 'blur'
|
||||
},
|
||||
],
|
||||
f_team_name: [
|
||||
{
|
||||
required: true,
|
||||
message: $t('sys.validate.textRequiredSuffix','不能为空'),
|
||||
trigger: 'blur'
|
||||
},
|
||||
],
|
||||
f_status: [
|
||||
{
|
||||
required: true,
|
||||
message: $t('sys.validate.arrayRequiredPrefix ','请至少选择一个'),
|
||||
trigger: 'change'
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
optionsObj:{
|
||||
f_competition_idcolumnOptions:[],
|
||||
},
|
||||
|
||||
childIndex: -1,
|
||||
isEdit: false,
|
||||
interfaceRes: {"f_team_name":[],"f_reject_reason":[],"f_competition_id":[],"f_team_code":[],"f_slogan":[],"f_status":[],"f_enroll_time":[]},
|
||||
//可选范围默认值
|
||||
ableAll:{
|
||||
},
|
||||
|
||||
//掩码配置
|
||||
maskConfig:{
|
||||
f_team_name: {},
|
||||
f_team_code: {},
|
||||
f_slogan: {},
|
||||
},
|
||||
|
||||
//定位属性
|
||||
locationScope:{
|
||||
},
|
||||
|
||||
//轮播图
|
||||
carousel:{
|
||||
},
|
||||
|
||||
extraOptions:{
|
||||
f_competition_id:[],
|
||||
},
|
||||
|
||||
title: "",
|
||||
continueText: "", allList: [],
|
||||
currIndex: 0,
|
||||
isContinue: false,
|
||||
submitType: 0,
|
||||
showContinueBtn: true ,
|
||||
});
|
||||
const { title, continueText, showContinueBtn, dataRule, dataForm, optionsObj, ableAll, maskConfig,submitType } = toRefs(state);
|
||||
|
||||
const getPrevDisabled = computed(() => state.currIndex === 0);
|
||||
const getNextDisabled = computed(() => state.currIndex === state.allList.length - 1);
|
||||
// 表单权限
|
||||
const { hasFormP } = usePermission();
|
||||
|
||||
defineExpose({ init });
|
||||
|
||||
function init(data) {
|
||||
state.submitType = 0;
|
||||
state.isContinue = false;
|
||||
state.title = !data.id ? $t('common.add2Text','新增') : $t('common.editText','编辑');
|
||||
state.continueText = !data.id ? $t('common.continueAndAddText','确定并新增') : $t('common.continueText','确定并继续'); setFormProps({ continueLoading: false });
|
||||
state.dataForm.id = data.id;
|
||||
openModal();
|
||||
state.allList = data.allList;
|
||||
state.currIndex = state.allList.length && data.id ? state.allList.findIndex((item) => item.id === data.id) : 0;
|
||||
nextTick(() => {
|
||||
getForm().resetFields();
|
||||
setTimeout(initData, 0);
|
||||
});
|
||||
}
|
||||
function initData() {
|
||||
changeLoading(true);
|
||||
if (state.dataForm.id) {
|
||||
getData(state.dataForm.id);
|
||||
} else {
|
||||
//初始化options
|
||||
|
||||
// 设置默认值
|
||||
state.dataForm={
|
||||
f_competition_id:undefined,
|
||||
f_team_name:undefined,
|
||||
f_team_code:undefined,
|
||||
f_slogan:undefined,
|
||||
f_status:undefined,
|
||||
f_reject_reason:undefined,
|
||||
f_enroll_time:undefined,
|
||||
};
|
||||
if (getLeftTreeActiveInfo) state.dataForm = {...state.dataForm, ...(getLeftTreeActiveInfo() || {}) };
|
||||
state.childIndex = -1;
|
||||
changeLoading(false);
|
||||
}
|
||||
}
|
||||
function getForm() {
|
||||
const form = unref(formRef);
|
||||
if (!form) {
|
||||
throw new Error('form is null!');
|
||||
}
|
||||
return form;
|
||||
}
|
||||
function getData(id) {
|
||||
getInfo(id).then((res) => {
|
||||
state.dataForm = res.data || {};
|
||||
|
||||
state.childIndex = -1;
|
||||
changeLoading(false);
|
||||
});
|
||||
}
|
||||
async function handleSubmit(type) {
|
||||
try {
|
||||
const values = await getForm()?.validate();
|
||||
if (!values) return;
|
||||
|
||||
|
||||
setFormProps({ confirmLoading: true });
|
||||
const formMethod = state.dataForm.id ? update : create;
|
||||
formMethod(state.dataForm)
|
||||
.then((res) => {
|
||||
createMessage.success(res.msg);
|
||||
setFormProps({ confirmLoading: false });
|
||||
if (state.submitType == 1) {
|
||||
initData();
|
||||
state.isContinue = true;
|
||||
} else {
|
||||
setFormProps({ open: false });
|
||||
emit('reload');
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
setFormProps({ confirmLoading: false });
|
||||
});
|
||||
} catch (_) {}
|
||||
}
|
||||
function handlePrev() {
|
||||
state.currIndex--;
|
||||
handleGetNewInfo();
|
||||
}
|
||||
function handleNext() {
|
||||
state.currIndex++;
|
||||
handleGetNewInfo();
|
||||
}
|
||||
function handleGetNewInfo() {
|
||||
changeLoading(true);
|
||||
getForm().resetFields();
|
||||
const id = state.allList[state.currIndex].id;
|
||||
getData(id);
|
||||
}
|
||||
function setFormProps(data) {
|
||||
setModalProps(data);
|
||||
}
|
||||
function changeLoading(loading) {
|
||||
setModalProps({ loading });
|
||||
}
|
||||
async function onClose() {
|
||||
if (state.isContinue) emit('reload');
|
||||
return true;
|
||||
}
|
||||
|
||||
function changeData(model, index) {
|
||||
state.isEdit = false
|
||||
state.childIndex = index
|
||||
for (let key in state.interfaceRes) {
|
||||
if (key != model) {
|
||||
let faceReList = state.interfaceRes[key]
|
||||
for (let i = 0; i < faceReList.length; i++) {
|
||||
let relationField = faceReList[i].relationField;
|
||||
if(relationField){
|
||||
let modelAll = relationField.split('-');
|
||||
let faceMode = '';
|
||||
let faceMode2 = modelAll.length == 2?modelAll[0].substring(0, modelAll[0].length-4) +modelAll[1]:""
|
||||
for (let i = 0; i < modelAll.length; i++) {
|
||||
faceMode += modelAll[i];
|
||||
}
|
||||
if (faceMode == model || faceMode2 == model ) {
|
||||
let options = 'get' + key + 'Options';
|
||||
eval(options)(true);
|
||||
changeData(key, index)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
function changeDataFormData(type, data, model,index,defaultValue) {
|
||||
if(!state.isEdit) {
|
||||
if (type == 2) {
|
||||
for (let i = 0; i < state.dataForm[data].length; i++) {
|
||||
if (index == -1) {
|
||||
state.dataForm[data][i][model] = defaultValue
|
||||
} else if (index == i) {
|
||||
state.dataForm[data][i][model] = defaultValue
|
||||
}
|
||||
}
|
||||
} else {
|
||||
state.dataForm[model] = defaultValue
|
||||
}
|
||||
}
|
||||
}
|
||||
// 校验超出条数限制
|
||||
function checkNumLimit(config,listLength) {
|
||||
if (config.isNumLimit && listLength >= config.numLimit) {
|
||||
createMessage.warning(config.tableTitle+'超出条数限制');
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
function getRelationDate(timeRule, timeType, timeTarget, timeValueData, dataValue) {
|
||||
let timeDataValue: any = null;
|
||||
let timeValue = Number(timeValueData);
|
||||
if (timeRule) {
|
||||
if (timeType == 1) {
|
||||
timeDataValue = timeValue;
|
||||
} else if (timeType == 2) {
|
||||
timeDataValue = dataValue;
|
||||
} else if (timeType == 3) {
|
||||
timeDataValue = new Date().getTime();
|
||||
} else if (timeType == 4 || timeType == 5) {
|
||||
const type = getTimeUnit(timeTarget);
|
||||
const method = timeType == 4 ? 'subtract' : 'add';
|
||||
timeDataValue = dayjs()[method](timeValue, type).valueOf();
|
||||
}
|
||||
}
|
||||
return timeDataValue;
|
||||
}
|
||||
function getRelationTime(timeRule, timeType, timeTarget, timeValue, formatType, dataValue) {
|
||||
let format = formatType == 'HH:mm' ? 'HH:mm:00' : formatType;
|
||||
let timeDataValue: any = null;
|
||||
if (timeRule) {
|
||||
if (timeType == 1) {
|
||||
timeDataValue = timeValue || '00:00:00';
|
||||
if (timeDataValue.split(':').length == 3) {
|
||||
timeDataValue = timeDataValue;
|
||||
} else {
|
||||
timeDataValue = timeDataValue + ':00';
|
||||
}
|
||||
} else if (timeType == 2) {
|
||||
timeDataValue = dataValue;
|
||||
} else if (timeType == 3) {
|
||||
timeDataValue = dayjs().format(format);
|
||||
} else if (timeType == 4 || timeType == 5) {
|
||||
const type = getTimeUnit(timeTarget + 3);
|
||||
const method = timeType == 4 ? 'subtract' : 'add';
|
||||
timeDataValue = dayjs()[method](timeValue, type).format(format);
|
||||
}
|
||||
}
|
||||
return timeDataValue;
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<BasicModal v-bind="$attrs" @register="registerModal" width="600px"
|
||||
:minHeight="100"
|
||||
:cancelText="$t('common.cancelText','取消')"
|
||||
:okText="$t('common.okText','确定')"
|
||||
@ok="handleSubmit" :closeFunc="onClose">
|
||||
<template #title>
|
||||
<a-space :size="10">
|
||||
<div class="text-16px font-medium">{{ title }}</div>
|
||||
<a-space-compact size="small" block v-if="dataForm.id">
|
||||
<a-tooltip :title="$t('common.prevRecord')">
|
||||
<a-button size="small" :disabled="getPrevDisabled" @click="handlePrev">
|
||||
<i class="icon-ym icon-ym-caret-left text-10px"></i>
|
||||
</a-button>
|
||||
</a-tooltip>
|
||||
<a-tooltip :title="$t('common.nextRecord')">
|
||||
<a-button size="small" :disabled="getNextDisabled" @click="handleNext">
|
||||
<i class="icon-ym icon-ym-caret-right text-10px"></i>
|
||||
</a-button>
|
||||
</a-tooltip>
|
||||
</a-space-compact>
|
||||
</a-space>
|
||||
</template>
|
||||
<template #insertFooter>
|
||||
<div class="float-left mt-5px">
|
||||
<JnpfCheckboxSingle v-model:value="submitType" :label="continueText" />
|
||||
</div>
|
||||
</template>
|
||||
<a-row class="dynamic-form ">
|
||||
<a-form :colon="false" size="110" layout= "horizontal"
|
||||
labelAlign= "right"
|
||||
:labelCol="{ style: { width: '100px' } }" :model="dataForm" :rules="dataRule" ref="formRef">
|
||||
<a-row :gutter="15">
|
||||
<!-- 具体表单 -->
|
||||
<a-col :span="24" class="ant-col-item" >
|
||||
<a-form-item
|
||||
name="f_competition_id" >
|
||||
<template #label>关联大赛
|
||||
</template> <JnpfRelationForm v-model:value="dataForm.f_competition_id" @change="changeData('f_competition_id',-1)"
|
||||
:templateJson="state.interfaceRes.f_competition_id" :field="'f_competition_id'" modelId =""
|
||||
:columnOptions="optionsObj.f_competition_idcolumnOptions" relationField="${html.relationField}" popupWidth="${html.popupWidth}" propsValue="${html.propsValue}"
|
||||
:queryType="0" :extraOptions = "state.extraOptions.f_competition_id"
|
||||
>
|
||||
</JnpfRelationForm>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24" class="ant-col-item" >
|
||||
<a-form-item
|
||||
name="f_team_name" >
|
||||
<template #label>团队名称
|
||||
</template> <JnpfInput v-model:value="dataForm.f_team_name" @change="changeData('f_team_name',-1)"
|
||||
>
|
||||
</JnpfInput>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24" class="ant-col-item" >
|
||||
<a-form-item
|
||||
name="f_team_code" >
|
||||
<template #label>邀请码
|
||||
</template> <JnpfInput v-model:value="dataForm.f_team_code" @change="changeData('f_team_code',-1)"
|
||||
>
|
||||
</JnpfInput>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24" class="ant-col-item" >
|
||||
<a-form-item
|
||||
name="f_slogan" >
|
||||
<template #label>团队口号
|
||||
</template> <JnpfInput v-model:value="dataForm.f_slogan" @change="changeData('f_slogan',-1)"
|
||||
>
|
||||
</JnpfInput>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24" class="ant-col-item" >
|
||||
<a-form-item
|
||||
name="f_status" >
|
||||
<template #label>状态
|
||||
</template> <JnpfSelect v-model:value="dataForm.f_status" @change="changeData('f_status',-1)"
|
||||
:templateJson="state.interfaceRes.f_status" :options="optionsObj.f_statusOptions" :fieldNames="optionsObj.f_statusProps"
|
||||
>
|
||||
</JnpfSelect>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24" class="ant-col-item" >
|
||||
<a-form-item
|
||||
name="f_reject_reason" >
|
||||
<template #label>拒绝原因
|
||||
</template> <JnpfInputTextarea v-model:value="dataForm.f_reject_reason" @change="changeData('f_reject_reason',-1)"
|
||||
>
|
||||
</JnpfInputTextarea>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24" class="ant-col-item" >
|
||||
<a-form-item
|
||||
name="f_enroll_time" >
|
||||
<template #label>报名时间
|
||||
</template> <JnpfDatePicker v-model:value="dataForm.f_enroll_time" @change="changeData('f_enroll_time',-1)"
|
||||
>
|
||||
</JnpfDatePicker>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<!-- 表单结束 -->
|
||||
</a-row>
|
||||
</a-form>
|
||||
</a-row>
|
||||
</BasicModal>
|
||||
</template>
|
||||
@@ -1,34 +0,0 @@
|
||||
import { defHttp } from '#/api/request';
|
||||
|
||||
// 获取列表
|
||||
export function getList(data) {
|
||||
return defHttp.post({ url: '/api/example/Team/getList', data });
|
||||
}
|
||||
// 新建
|
||||
export function create(data) {
|
||||
return defHttp.post({ url:'/api/example/Team', data });
|
||||
}
|
||||
// 修改
|
||||
export function update(data) {
|
||||
return defHttp.put({ url: '/api/example/Team/'+ data.id, data });
|
||||
}
|
||||
// 详情(无转换数据)
|
||||
export function getInfo(id) {
|
||||
return defHttp.get({ url: '/api/example/Team/' + id });
|
||||
}
|
||||
// 获取(转换数据)
|
||||
export function getDetailInfo(id) {
|
||||
return defHttp.get({ url: '/api/example/Team/detail/' + id });
|
||||
}
|
||||
// 删除
|
||||
export function del(id) {
|
||||
return defHttp.delete({ url: '/api/example/Team/' + id });
|
||||
}
|
||||
// 批量删除数据
|
||||
export function batchDelete(data) {
|
||||
return defHttp.delete({ url: '/api/example/Team/batchRemove', data });
|
||||
}
|
||||
// 导出
|
||||
export function exportData(data) {
|
||||
return defHttp.post({ url: '/api/example/Team/Actions/Export', data });
|
||||
}
|
||||
@@ -1,332 +0,0 @@
|
||||
const columnList = [
|
||||
{
|
||||
"suffixIcon":"",
|
||||
"useScan":false,
|
||||
"fullNameI18nCode":[
|
||||
""
|
||||
],
|
||||
"align":"left",
|
||||
"headerAlign":"left",
|
||||
"showCount":false,
|
||||
"__config__":{
|
||||
"jnpfKey":"input",
|
||||
"label":"关联大赛",
|
||||
"labelI18nCode":null
|
||||
},
|
||||
"readonly":false,
|
||||
"prop":"f_competition_id",
|
||||
"__vModel__":"f_competition_id",
|
||||
"disabled":false,
|
||||
"id":"f_competition_id",
|
||||
"placeholder":"请输入",
|
||||
"addonBefore":"",
|
||||
"clearable":true,
|
||||
"jnpfKey":"input",
|
||||
"fullName":"关联大赛",
|
||||
"label":"关联大赛",
|
||||
"sortable":false,
|
||||
"addonAfter":"",
|
||||
"maskConfig":{
|
||||
"prefixType":1,
|
||||
"useUnrealMask":false,
|
||||
"maskType":1,
|
||||
"unrealMaskLength":1,
|
||||
"prefixLimit":0,
|
||||
"suffixLimit":0,
|
||||
"filler":"*",
|
||||
"prefixSpecifyChar":"",
|
||||
"suffixType":1,
|
||||
"ignoreChar":"",
|
||||
"suffixSpecifyChar":""
|
||||
},
|
||||
"width":null,
|
||||
"showPassword":false,
|
||||
"useMask":false,
|
||||
"fixed":"none",
|
||||
"prefixIcon":"",
|
||||
"labelI18nCode":""
|
||||
},
|
||||
{
|
||||
"suffixIcon":"",
|
||||
"useScan":false,
|
||||
"fullNameI18nCode":[
|
||||
""
|
||||
],
|
||||
"align":"left",
|
||||
"headerAlign":"left",
|
||||
"showCount":false,
|
||||
"__config__":{
|
||||
"jnpfKey":"input",
|
||||
"label":"团队名称",
|
||||
"labelI18nCode":null
|
||||
},
|
||||
"readonly":false,
|
||||
"prop":"f_team_name",
|
||||
"__vModel__":"f_team_name",
|
||||
"disabled":false,
|
||||
"id":"f_team_name",
|
||||
"placeholder":"请输入",
|
||||
"addonBefore":"",
|
||||
"clearable":true,
|
||||
"jnpfKey":"input",
|
||||
"fullName":"团队名称",
|
||||
"label":"团队名称",
|
||||
"sortable":false,
|
||||
"addonAfter":"",
|
||||
"maskConfig":{
|
||||
"prefixType":1,
|
||||
"useUnrealMask":false,
|
||||
"maskType":1,
|
||||
"unrealMaskLength":1,
|
||||
"prefixLimit":0,
|
||||
"suffixLimit":0,
|
||||
"filler":"*",
|
||||
"prefixSpecifyChar":"",
|
||||
"suffixType":1,
|
||||
"ignoreChar":"",
|
||||
"suffixSpecifyChar":""
|
||||
},
|
||||
"width":null,
|
||||
"showPassword":false,
|
||||
"useMask":false,
|
||||
"fixed":"none",
|
||||
"prefixIcon":"",
|
||||
"labelI18nCode":""
|
||||
},
|
||||
{
|
||||
"suffixIcon":"",
|
||||
"useScan":false,
|
||||
"fullNameI18nCode":[
|
||||
""
|
||||
],
|
||||
"align":"left",
|
||||
"headerAlign":"left",
|
||||
"showCount":false,
|
||||
"__config__":{
|
||||
"jnpfKey":"input",
|
||||
"label":"邀请码",
|
||||
"labelI18nCode":null
|
||||
},
|
||||
"readonly":false,
|
||||
"prop":"f_team_code",
|
||||
"__vModel__":"f_team_code",
|
||||
"disabled":false,
|
||||
"id":"f_team_code",
|
||||
"placeholder":"请输入",
|
||||
"addonBefore":"",
|
||||
"clearable":true,
|
||||
"jnpfKey":"input",
|
||||
"fullName":"邀请码",
|
||||
"label":"邀请码",
|
||||
"sortable":false,
|
||||
"addonAfter":"",
|
||||
"maskConfig":{
|
||||
"prefixType":1,
|
||||
"useUnrealMask":false,
|
||||
"maskType":1,
|
||||
"unrealMaskLength":1,
|
||||
"prefixLimit":0,
|
||||
"suffixLimit":0,
|
||||
"filler":"*",
|
||||
"prefixSpecifyChar":"",
|
||||
"suffixType":1,
|
||||
"ignoreChar":"",
|
||||
"suffixSpecifyChar":""
|
||||
},
|
||||
"width":null,
|
||||
"showPassword":false,
|
||||
"useMask":false,
|
||||
"fixed":"none",
|
||||
"prefixIcon":"",
|
||||
"labelI18nCode":""
|
||||
},
|
||||
{
|
||||
"suffixIcon":"",
|
||||
"useScan":false,
|
||||
"fullNameI18nCode":[
|
||||
""
|
||||
],
|
||||
"align":"left",
|
||||
"headerAlign":"left",
|
||||
"showCount":false,
|
||||
"__config__":{
|
||||
"jnpfKey":"input",
|
||||
"label":"团队口号",
|
||||
"labelI18nCode":null
|
||||
},
|
||||
"readonly":false,
|
||||
"prop":"f_slogan",
|
||||
"__vModel__":"f_slogan",
|
||||
"disabled":false,
|
||||
"id":"f_slogan",
|
||||
"placeholder":"请输入",
|
||||
"addonBefore":"",
|
||||
"clearable":true,
|
||||
"jnpfKey":"input",
|
||||
"fullName":"团队口号",
|
||||
"label":"团队口号",
|
||||
"sortable":false,
|
||||
"addonAfter":"",
|
||||
"maskConfig":{
|
||||
"prefixType":1,
|
||||
"useUnrealMask":false,
|
||||
"maskType":1,
|
||||
"unrealMaskLength":1,
|
||||
"prefixLimit":0,
|
||||
"suffixLimit":0,
|
||||
"filler":"*",
|
||||
"prefixSpecifyChar":"",
|
||||
"suffixType":1,
|
||||
"ignoreChar":"",
|
||||
"suffixSpecifyChar":""
|
||||
},
|
||||
"width":null,
|
||||
"showPassword":false,
|
||||
"useMask":false,
|
||||
"fixed":"none",
|
||||
"prefixIcon":"",
|
||||
"labelI18nCode":""
|
||||
},
|
||||
{
|
||||
"suffixIcon":"",
|
||||
"useScan":false,
|
||||
"fullNameI18nCode":[
|
||||
""
|
||||
],
|
||||
"align":"left",
|
||||
"headerAlign":"left",
|
||||
"showCount":false,
|
||||
"__config__":{
|
||||
"jnpfKey":"input",
|
||||
"label":"状态",
|
||||
"labelI18nCode":null
|
||||
},
|
||||
"readonly":false,
|
||||
"prop":"f_status",
|
||||
"__vModel__":"f_status",
|
||||
"disabled":false,
|
||||
"id":"f_status",
|
||||
"placeholder":"请输入",
|
||||
"addonBefore":"",
|
||||
"clearable":true,
|
||||
"jnpfKey":"input",
|
||||
"fullName":"状态",
|
||||
"label":"状态",
|
||||
"sortable":false,
|
||||
"addonAfter":"",
|
||||
"maskConfig":{
|
||||
"prefixType":1,
|
||||
"useUnrealMask":false,
|
||||
"maskType":1,
|
||||
"unrealMaskLength":1,
|
||||
"prefixLimit":0,
|
||||
"suffixLimit":0,
|
||||
"filler":"*",
|
||||
"prefixSpecifyChar":"",
|
||||
"suffixType":1,
|
||||
"ignoreChar":"",
|
||||
"suffixSpecifyChar":""
|
||||
},
|
||||
"width":null,
|
||||
"showPassword":false,
|
||||
"useMask":false,
|
||||
"fixed":"none",
|
||||
"prefixIcon":"",
|
||||
"labelI18nCode":""
|
||||
},
|
||||
{
|
||||
"suffixIcon":"",
|
||||
"useScan":false,
|
||||
"fullNameI18nCode":[
|
||||
""
|
||||
],
|
||||
"align":"left",
|
||||
"headerAlign":"left",
|
||||
"showCount":false,
|
||||
"__config__":{
|
||||
"jnpfKey":"input",
|
||||
"label":"拒绝原因",
|
||||
"labelI18nCode":null
|
||||
},
|
||||
"readonly":false,
|
||||
"prop":"f_reject_reason",
|
||||
"__vModel__":"f_reject_reason",
|
||||
"disabled":false,
|
||||
"id":"f_reject_reason",
|
||||
"placeholder":"请输入",
|
||||
"addonBefore":"",
|
||||
"clearable":true,
|
||||
"jnpfKey":"input",
|
||||
"fullName":"拒绝原因",
|
||||
"label":"拒绝原因",
|
||||
"sortable":false,
|
||||
"addonAfter":"",
|
||||
"maskConfig":{
|
||||
"prefixType":1,
|
||||
"useUnrealMask":false,
|
||||
"maskType":1,
|
||||
"unrealMaskLength":1,
|
||||
"prefixLimit":0,
|
||||
"suffixLimit":0,
|
||||
"filler":"*",
|
||||
"prefixSpecifyChar":"",
|
||||
"suffixType":1,
|
||||
"ignoreChar":"",
|
||||
"suffixSpecifyChar":""
|
||||
},
|
||||
"width":null,
|
||||
"showPassword":false,
|
||||
"useMask":false,
|
||||
"fixed":"none",
|
||||
"prefixIcon":"",
|
||||
"labelI18nCode":""
|
||||
},
|
||||
{
|
||||
"suffixIcon":"",
|
||||
"useScan":false,
|
||||
"fullNameI18nCode":[
|
||||
""
|
||||
],
|
||||
"align":"left",
|
||||
"headerAlign":"left",
|
||||
"showCount":false,
|
||||
"__config__":{
|
||||
"jnpfKey":"input",
|
||||
"label":"报名时间",
|
||||
"labelI18nCode":null
|
||||
},
|
||||
"readonly":false,
|
||||
"prop":"f_enroll_time",
|
||||
"__vModel__":"f_enroll_time",
|
||||
"disabled":false,
|
||||
"id":"f_enroll_time",
|
||||
"placeholder":"请输入",
|
||||
"addonBefore":"",
|
||||
"clearable":true,
|
||||
"jnpfKey":"input",
|
||||
"fullName":"报名时间",
|
||||
"label":"报名时间",
|
||||
"sortable":false,
|
||||
"addonAfter":"",
|
||||
"maskConfig":{
|
||||
"prefixType":1,
|
||||
"useUnrealMask":false,
|
||||
"maskType":1,
|
||||
"unrealMaskLength":1,
|
||||
"prefixLimit":0,
|
||||
"suffixLimit":0,
|
||||
"filler":"*",
|
||||
"prefixSpecifyChar":"",
|
||||
"suffixType":1,
|
||||
"ignoreChar":"",
|
||||
"suffixSpecifyChar":""
|
||||
},
|
||||
"width":null,
|
||||
"showPassword":false,
|
||||
"useMask":false,
|
||||
"fixed":"none",
|
||||
"prefixIcon":"",
|
||||
"labelI18nCode":""
|
||||
}
|
||||
]
|
||||
export default columnList
|
||||
@@ -1,686 +0,0 @@
|
||||
<script lang="ts" setup>
|
||||
|
||||
import { getList, del, exportData, batchDelete } from './helper/api';
|
||||
import { getConfigData,getViewList } from '#/api/onlineDev/visualDev';
|
||||
import { getDictionaryDataSelector } from '#/api/systemData/dictionary';
|
||||
import { getDataInterfaceRes } from '#/api/systemData/dataInterface';
|
||||
import { getOrgByOrganizeCondition,getOrganizeSelector } from '#/api/permission/organize';
|
||||
import { ref, reactive, onMounted, toRefs, computed, unref, nextTick, toRaw, provide } from 'vue';
|
||||
import { useMessage, usePermission } from '@jnpf/hooks';
|
||||
import { $t } from '#/locales';
|
||||
import { useOrganizeStore } from '#/store';
|
||||
import { useAccessStore,useUserStore } from '@vben/stores';
|
||||
import { BasicModal, useModal } from '@jnpf/ui/modal';
|
||||
import { usePopup } from '@jnpf/ui/popup';
|
||||
import { ScrollContainer,BasicLeftTree,type TreeActionType } from '@jnpf/ui';
|
||||
import { BasicForm, useForm } from '@jnpf/ui/form';
|
||||
import { BasicVxeTable, useVxeTable, TableAction, type ActionItem, type TableActionType, type SorterResult } from '@jnpf/ui/vxeTable';
|
||||
import Form from './Form.vue';
|
||||
import Detail from './Detail.vue';
|
||||
// 有关联表单详情:开始
|
||||
import RelationDetail from '#/views/common/dynamicModel/list/detail/index.vue';
|
||||
// 有关联表单详情:结束
|
||||
import ChildTableColumn from '#/views/common/dynamicModel/list/components/ChildTableColumn.vue';
|
||||
import { ExportModal } from '#/components/CommonModal';
|
||||
import { downloadByUrl } from '@jnpf/utils';
|
||||
import { ImportModal} from '#/components/CommonModal';
|
||||
// 打印模板多条生成PrintSelect
|
||||
import PrintSelect from '#/components/PrintDesign/printSelect/index.vue';
|
||||
import PrintBrowse from '#/components/PrintDesign/printBrowse/index.vue';
|
||||
import { useRoute,useRouter } from 'vue-router';
|
||||
import { FilterOutlined } from '@ant-design/icons-vue';
|
||||
import { getSearchFormSchemas } from '#/components/FormGenerator/src/helper/transform';
|
||||
import { cloneDeep,omit } from 'lodash-es';
|
||||
import columnList from './helper/columnList';
|
||||
import searchList from './helper/searchList';
|
||||
import superQueryJson from './helper/superQueryJson';
|
||||
import { dyOptionsList, systemComponentsList ,ocrList,slotsList, overflowInvalidList} from '#/components/FormGenerator/src/helper/config';
|
||||
import { thousandsFormat} from '@jnpf/utils';
|
||||
import { getParamList} from '#/utils/jnpf';
|
||||
|
||||
import ViewSetting from '#/views/common/dynamicModel/list/components/ViewSetting.vue';
|
||||
import ViewList from '#/views/common/dynamicModel/list/components/ViewList.vue';
|
||||
|
||||
interface State {
|
||||
config: any;
|
||||
columnList: any[];
|
||||
printListOptions: any[];
|
||||
columnBtnsList: any[];
|
||||
customBtnsList: any[];
|
||||
treeFieldNames: any;
|
||||
leftTreeData: any[];
|
||||
leftTreeLoading: boolean;
|
||||
treeActiveId: string;
|
||||
treeActiveNodePath: any;
|
||||
columns: any[];
|
||||
allColumns: any[];
|
||||
complexColumns: any[];
|
||||
childColumnList: any[];
|
||||
mergeList: any[];
|
||||
exportList: any[];
|
||||
cacheList: any[];
|
||||
currFlow: any;
|
||||
isCustomCopy: boolean;
|
||||
candidateType: number;
|
||||
currRow: any;
|
||||
workFlowFormData: any;
|
||||
expandObj: any;
|
||||
columnSettingList: any[];
|
||||
searchSchemas: any[];
|
||||
treeRelationObj: any;
|
||||
treeQueryJson: any;
|
||||
leftTreeActiveInfo: any;
|
||||
keyword: string;
|
||||
viewList: any[];
|
||||
currentView: any;
|
||||
}
|
||||
|
||||
const route = useRoute();
|
||||
const { hasBtnP } = usePermission();
|
||||
const { createMessage, createConfirm } = useMessage();
|
||||
const organizeStore = useOrganizeStore();
|
||||
const userStore = useUserStore();
|
||||
const accessStore = useAccessStore();
|
||||
const { permissionList } = accessStore;
|
||||
const userInfo = userStore.getUserInfo;
|
||||
|
||||
const [registerExportModal, { openModal: openExportModal, closeModal: closeExportModal, setModalProps: setExportModalProps }] = useModal();
|
||||
const [registerImportModal, { openModal: openImportModal }] = useModal();
|
||||
const [registerSuperQueryModal, { openModal: openSuperQuery }] = useModal();
|
||||
const formRef = ref<any>(null);
|
||||
const tableRef = ref<Nullable<TableActionType>>(null);
|
||||
const detailRef = ref<any>(null);
|
||||
const relationDetailRef = ref<any>(null);
|
||||
|
||||
const state = reactive<State>({
|
||||
config: {},
|
||||
columnList: [],
|
||||
printListOptions: [],
|
||||
columnBtnsList: [],
|
||||
customBtnsList: [],
|
||||
treeFieldNames: {
|
||||
children: 'children' ,
|
||||
title: 'fullName' ,
|
||||
key: 'id' ,
|
||||
isLeaf: 'isLeaf',
|
||||
},
|
||||
leftTreeData: [],
|
||||
leftTreeLoading: false,
|
||||
treeActiveId: '',
|
||||
treeActiveNodePath: [],
|
||||
columns: [],
|
||||
allColumns: [],
|
||||
complexColumns: [], // 复杂表头
|
||||
childColumnList: [],
|
||||
mergeList: [],
|
||||
exportList: [],
|
||||
cacheList: [],
|
||||
currFlow: {},
|
||||
isCustomCopy: false,
|
||||
candidateType: 1,
|
||||
currRow: {},
|
||||
workFlowFormData: {},
|
||||
expandObj: {},
|
||||
columnSettingList: [],
|
||||
searchSchemas: [],
|
||||
treeRelationObj: null,
|
||||
treeQueryJson: {},
|
||||
leftTreeActiveInfo: {},
|
||||
keyword: '',
|
||||
viewList: [],
|
||||
currentView: {},
|
||||
});
|
||||
const defaultSearchInfo = {
|
||||
menuId: route.meta.modelId as string,
|
||||
moduleId:'839111280835952709',
|
||||
superQueryJson: '',
|
||||
dataType:0,
|
||||
};
|
||||
const searchInfo = reactive({
|
||||
...cloneDeep(defaultSearchInfo),
|
||||
});
|
||||
const { childColumnList, searchSchemas, viewList, currentView,allColumns} = toRefs(state);
|
||||
const [registerSearchForm, { updateSchema, resetFields, submit: searchFormSubmit, setFieldsValue}] = useForm({
|
||||
baseColProps: { span: 6 },
|
||||
showActionButtonGroup: true,
|
||||
showAdvancedButton: true,
|
||||
compact: true,
|
||||
});
|
||||
const [registerTable, { reload, setLoading, getFetchParams, getSelectRows, getSelectRowKeys, redoHeight,clearSelectedRowKeys }] = useVxeTable({
|
||||
api: getList,
|
||||
immediate: false,
|
||||
tableSetting: { setting: false },
|
||||
clickToRowSelect: false,
|
||||
afterFetch: (data) => {
|
||||
const list = data.map((o) => ({...o,...state.expandObj}));
|
||||
state.cacheList = cloneDeep(list);
|
||||
return list;
|
||||
},
|
||||
});
|
||||
|
||||
provide('getLeftTreeActiveInfo', () => state.leftTreeActiveInfo);
|
||||
|
||||
const getHasBatchBtn = computed(() => {
|
||||
let btnsList: any[] =[]
|
||||
return !!btnsList.length
|
||||
});
|
||||
|
||||
|
||||
const getColumns = computed(() => {
|
||||
const columns = state.complexColumns;
|
||||
return setListValue(state.currentView?.columnList, columns, 'prop');
|
||||
});
|
||||
const getSearchList = computed(() => {
|
||||
const searchSchemas = cloneDeep(state.searchSchemas).map(o => ({ ...o, show: true }));
|
||||
const schemas = setListValue(state.currentView?.searchList, searchSchemas, 'field');
|
||||
buildSearchOptions(schemas);
|
||||
return schemas;
|
||||
});
|
||||
const getTableBindValue = computed(() => {
|
||||
let columns = unref(getColumns).map((o) => {
|
||||
const obj = { ...omit(o, ['type', 'format']) };
|
||||
if (obj?.children?.length) {
|
||||
obj.children = obj.children.map((e) => ({ ...omit(e, ['type', 'format']) }));
|
||||
}
|
||||
return obj;
|
||||
});
|
||||
const defaultSortConfig:any[]= [];
|
||||
const sortField = defaultSortConfig.map(o => (o.sort === 'desc' ? '-' : '') + o.field);
|
||||
const data: any = {
|
||||
pagination: { pageSize: 20 }, //有分页
|
||||
searchInfo: unref(searchInfo),
|
||||
defSort: { sidx: sortField.join(',') },
|
||||
sortConfig: { multiple: true },
|
||||
sortFn: (sortInfo: SorterResult | SorterResult[]) => {
|
||||
if (Array.isArray(sortInfo)) {
|
||||
const sortList = sortInfo.map((o) => (o.order === 'desc' ? '-' : '') + o.field);
|
||||
return { sidx: sortList.join(',') };
|
||||
} else {
|
||||
const { field, order } = sortInfo;
|
||||
return field && order ? { sidx: (order === 'desc' ? '-' : '') + field } : {};
|
||||
}
|
||||
},
|
||||
showOverflow: false,
|
||||
columns,
|
||||
|
||||
border: true,
|
||||
actionColumn: {
|
||||
width: 150,
|
||||
title: $t('component.table.action'),
|
||||
dataIndex: 'action',
|
||||
},
|
||||
showFooter:false,
|
||||
columnConfig: {
|
||||
resizable: true,
|
||||
},
|
||||
};
|
||||
if (unref(getHasBatchBtn)) {
|
||||
const rowSelection: any = { type: 'checkbox' };
|
||||
data.rowSelection = rowSelection;
|
||||
}
|
||||
// 有子表且子表分组展示
|
||||
if(state.childColumnList.length)data.spanMethod = spanMethod;
|
||||
return data;
|
||||
});
|
||||
|
||||
async function init() {
|
||||
state.config = {};
|
||||
searchInfo.menuId = route.meta.modelId as string;
|
||||
state.columnList = columnList;
|
||||
setLoading(true);
|
||||
getSearchSchemas();
|
||||
getColumnList();
|
||||
await initViewList();
|
||||
nextTick(() => {
|
||||
unref(getSearchList)?.length ? searchFormSubmit() : handleSearchSubmit({});
|
||||
});
|
||||
}
|
||||
function getSearchSchemas() {
|
||||
|
||||
const schemas = getSearchFormSchemas(searchList );
|
||||
state.searchSchemas = schemas;
|
||||
}
|
||||
function buildSearchOptions(schemas){
|
||||
schemas.forEach((cur) => {
|
||||
const config = cur.__config__;
|
||||
if (dyOptionsList.includes(config.jnpfKey)) {
|
||||
if (config.dataType === 'dictionary') {
|
||||
if (!config.dictionaryType) return;
|
||||
getDictionaryDataSelector(config.dictionaryType).then((res) => {
|
||||
updateSchema([{ field: cur.field, componentProps: { options: res.data.list } }]);
|
||||
});
|
||||
}
|
||||
if (config.dataType === 'dynamic') {
|
||||
if (!config.propsUrl) return;
|
||||
const query = { paramList: getParamList(config.templateJson) };
|
||||
getDataInterfaceRes(config.propsUrl, query).then((res) => {
|
||||
const data = Array.isArray(res.data) ? res.data : [];
|
||||
updateSchema([{ field: cur.field, componentProps: { options: data } }]);
|
||||
});
|
||||
}
|
||||
}
|
||||
cur.defaultValue = cur.value;
|
||||
});
|
||||
}
|
||||
function getColumnList() {
|
||||
// 没有开启列表权限
|
||||
let columnList = state.columnList;
|
||||
state.exportList = columnList;
|
||||
let columns = columnList.map((o) => {
|
||||
const item: any = {
|
||||
...o,
|
||||
title: o.labelI18nCode ? $t(o.labelI18nCode, o.label) : o.label,
|
||||
prop: o.prop,
|
||||
dataIndex: o.prop,
|
||||
align: o.align,
|
||||
fixed: o.fixed == 'none' ? false : o.fixed,
|
||||
width: o.width || '',
|
||||
minWidth: o.width || 100,
|
||||
}
|
||||
// 行内编辑和部分控件加插槽
|
||||
if ((slotsList.includes(item.jnpfKey)) && !item.dataIndex.includes('-')) {
|
||||
item.slots = { default: item.prop };
|
||||
}
|
||||
item.showOverflow = !!(true && !overflowInvalidList.includes(item.jnpfKey) );
|
||||
return item;
|
||||
});
|
||||
state.allColumns = columns;
|
||||
//添加复杂表头
|
||||
columns = getComplexColumns(columns);
|
||||
state.columns = columns.filter((o) => !o.prop.includes('-'));
|
||||
//子表表头
|
||||
getChildComplexColumns(columns);
|
||||
}
|
||||
|
||||
|
||||
//复杂表头
|
||||
function getComplexColumns(columns) {
|
||||
//这里生成复杂表头的配置
|
||||
let complexHeaderList: any[] = [];
|
||||
if (!complexHeaderList.length) return columns;
|
||||
let childColumns: any[] = [];
|
||||
let firstChildColumns: string[] = [];
|
||||
for (let i = 0; i < complexHeaderList.length; i++) {
|
||||
const e = complexHeaderList[i];
|
||||
e.label = e.fullName;
|
||||
e.labelI18nCode = e.fullNameI18nCode;
|
||||
e.title = e.fullNameI18nCode ? $t(e.fullNameI18nCode, e.fullName) : e.fullName;
|
||||
e.dataIndex = e.id;
|
||||
e.prop = e.id;
|
||||
e.children = [];
|
||||
e.jnpfKey = 'complexHeader';
|
||||
if (e.childColumns?.length) {
|
||||
childColumns.push(...e.childColumns);
|
||||
for (let k = 0; k < e.childColumns.length; k++) {
|
||||
const item = e.childColumns[k];
|
||||
for (let j = 0; j < columns.length; j++) {
|
||||
const o = columns[j];
|
||||
if (o.prop == item && o.fixed !== 'left' && o.fixed !== 'right') e.children.push({...omit(o, ['fixed']) });
|
||||
}
|
||||
}
|
||||
}
|
||||
if (e.children.length) firstChildColumns.push(e.children[0].prop);
|
||||
}
|
||||
complexHeaderList = complexHeaderList.filter(o => o.children.length);
|
||||
let list: any[] = [];
|
||||
for (let i = 0; i < columns.length; i++) {
|
||||
const e = columns[i];
|
||||
if (!childColumns.includes(e.prop) || e.fixed === 'left' || e.fixed === 'right') {
|
||||
list.push(e);
|
||||
} else {
|
||||
if (firstChildColumns.includes(e.prop)) {
|
||||
const item = complexHeaderList.find(o => o.childColumns.includes(e.prop));
|
||||
list.push(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
//子表表头
|
||||
function getChildComplexColumns(columnList) {
|
||||
let list: any[] = [];
|
||||
for (let i = 0; i < columnList.length; i++) {
|
||||
const e = columnList[i];
|
||||
if (!e.prop.includes('-')) {
|
||||
list.push(e);
|
||||
} else {
|
||||
let prop = e.prop.split('-')[0];
|
||||
let label = e.label.split('-')[0];
|
||||
let childLabel = e.label.replace(label + '-', '');
|
||||
if (e.fullNameI18nCode && Array.isArray(e.fullNameI18nCode) && e.fullNameI18nCode[0]) label = $t(e.fullNameI18nCode[0], label);
|
||||
let newItem = {
|
||||
align: 'center',
|
||||
jnpfKey: 'table',
|
||||
prop,
|
||||
label,
|
||||
title: label,
|
||||
dataIndex: prop,
|
||||
children: [],
|
||||
};
|
||||
e.dataIndex = e.prop;
|
||||
e.title = e.labelI18nCode ? $t(e.labelI18nCode, childLabel) : childLabel;
|
||||
if (!Object.prototype.hasOwnProperty.call(state.expandObj, `${prop}Expand`)) state.expandObj[prop+`Expand`] = false;
|
||||
if (!list.some((o) => o.prop === prop)) list.push(newItem);
|
||||
for (let i = 0; i < list.length; i++) {
|
||||
if (list[i].prop === prop) {
|
||||
const childItem = !list[i].children.length?{ ...e, slots: { default: list[i].dataIndex }, showOverflow: false, className: 'child-table-box' }:e
|
||||
list[i].children.push({ ...omit(childItem, ['fixed']) });
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// 行内分组展示
|
||||
getMergeList(list);
|
||||
|
||||
state.complexColumns = list;
|
||||
state.childColumnList = list.filter((o) => o.jnpfKey === 'table');
|
||||
// 子表分组展示宽度取100
|
||||
for (let i = 0; i < state.childColumnList.length; i++) {
|
||||
const e = state.childColumnList[i];
|
||||
if (e.children?.length) e.children = e.children.map(o => {
|
||||
const item = { ...o };
|
||||
item.width = o.width || '';
|
||||
item.minWidth = o.width || 100;
|
||||
return item;
|
||||
});
|
||||
}
|
||||
}
|
||||
function getMergeList(list) {
|
||||
list.forEach((item) => {
|
||||
if (item.jnpfKey === 'table' && item.children?.length) {
|
||||
item.children.forEach((child, index) => {
|
||||
state.mergeList.push({
|
||||
prop: child.prop,
|
||||
rowspan: index == 0 ? 1 : 0,
|
||||
colspan: index == 0 ? item.children.length : 0,
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
function toggleExpand(row, field) {
|
||||
row[field] = !row[field];
|
||||
}
|
||||
// 关联表单查看详情
|
||||
function toDetail(modelId, id, propsValue) {
|
||||
if (!id) return;
|
||||
getConfigData(modelId).then((res) => {
|
||||
if (!res.data || !res.data.formData) return;
|
||||
const formConf = JSON.parse(res.data.formData);
|
||||
formConf.popupType = 'general';
|
||||
formConf.hasPrintBtn = false;
|
||||
formConf.customBtns = [];
|
||||
const data = { id, formConf, modelId, propsValue};
|
||||
relationDetailRef.value?.init(data);
|
||||
});
|
||||
}
|
||||
function handleColumnChange(data) {
|
||||
state.columnSettingList = data;
|
||||
}
|
||||
function getTableActions(record): ActionItem[] {
|
||||
return [
|
||||
{
|
||||
label: $t('common.editText','编辑') ,
|
||||
onClick: updateHandle.bind(null, record),
|
||||
},
|
||||
{
|
||||
label: $t('common.delText','删除') ,
|
||||
color: 'error',
|
||||
modelConfirm: {
|
||||
onOk: handleDelete.bind(null, record.id),
|
||||
},
|
||||
},
|
||||
{
|
||||
label: $t('common.detailText','详情') ,
|
||||
onClick: goDetail.bind(null, record),
|
||||
},
|
||||
];
|
||||
}
|
||||
// 编辑
|
||||
function updateHandle(record) {
|
||||
// 不带工作流
|
||||
const data = {
|
||||
id: record.id,
|
||||
menuId: searchInfo.menuId,
|
||||
allList: state.cacheList,
|
||||
};
|
||||
formRef.value?.init(data);
|
||||
}
|
||||
// 删除
|
||||
function handleDelete(id) {
|
||||
const query={ids:[id] }
|
||||
batchDelete(query).then((res) => {
|
||||
createMessage.success(res.msg);
|
||||
clearSelectedRowKeys();
|
||||
reload();
|
||||
});
|
||||
}
|
||||
// 查看详情
|
||||
function goDetail(record) {
|
||||
// 不带流程
|
||||
const data = {
|
||||
id: record.id,
|
||||
};
|
||||
detailRef.value?.init(data);
|
||||
}
|
||||
// 新增
|
||||
function addHandle() {
|
||||
// 不带流程新增
|
||||
const data = {
|
||||
id: '',
|
||||
menuId: searchInfo.menuId,
|
||||
allList: state.cacheList,
|
||||
};
|
||||
formRef.value?.init(data);
|
||||
}
|
||||
function handleSearchReset() {
|
||||
searchFormSubmit();
|
||||
}
|
||||
function handleSearchSubmit(data) {
|
||||
clearSelectedRowKeys();
|
||||
let obj = {
|
||||
...defaultSearchInfo,
|
||||
superQueryJson: searchInfo.superQueryJson,
|
||||
...data,
|
||||
};
|
||||
Object.keys(searchInfo).map(key => {
|
||||
delete searchInfo[key];
|
||||
return key;
|
||||
});
|
||||
for (let [key, value] of Object.entries(obj)) {
|
||||
searchInfo[key.replaceAll('-', '_')] = value;
|
||||
}
|
||||
console.log(searchInfo);
|
||||
reload({ page: 1 });
|
||||
}
|
||||
function updateSearchFormValue() {
|
||||
if (!state.treeActiveId) return searchFormSubmit();
|
||||
let queryJson: any = {};
|
||||
let leftTreeActiveInfo: any = {};
|
||||
const isMultiple = !state.treeRelationObj ? false : state.treeRelationObj.searchMultiple;
|
||||
//多级左侧树,需要拼父级->转为查询参数
|
||||
if (state.treeRelationObj && state.treeRelationObj.jnpfKey && ['cascader', 'areaSelect'].includes(state.treeRelationObj.jnpfKey)) {
|
||||
let currValue = [];
|
||||
currValue = state.treeActiveNodePath.map(o => o[state.treeFieldNames.key]);
|
||||
queryJson = { '': isMultiple ? [currValue] : currValue };
|
||||
leftTreeActiveInfo = { '': state.treeRelationObj.multiple ? [currValue] : currValue };
|
||||
} else {
|
||||
queryJson = { '': isMultiple ? [state.treeActiveId] : state.treeActiveId };
|
||||
leftTreeActiveInfo = { '': state.treeRelationObj.multiple ? [state.treeActiveId] : state.treeActiveId };
|
||||
}
|
||||
state.leftTreeActiveInfo = leftTreeActiveInfo;
|
||||
if(unref(getSearchList)?.length){
|
||||
// 有搜索列表
|
||||
setFieldsValue(queryJson);
|
||||
searchFormSubmit();
|
||||
}else{
|
||||
// 无搜索列表
|
||||
handleSearchSubmit(queryJson);
|
||||
}
|
||||
}
|
||||
async function initViewList(currentId = '') {
|
||||
const query = {
|
||||
menuId: route.meta.modelId,
|
||||
};
|
||||
await getViewList(query).then(res => {
|
||||
const columns : any[]= state.complexColumns;
|
||||
const searchList: any[] = state.searchSchemas.map(o => ({ label: o.label, id: o.field, show: o.show, labelI18nCode: o.labelI18nCode }));
|
||||
const columnList: any[] = columns.map(o => ({ label: o.label, id: o.prop, show: true, fixed: o.fixed || 'none', labelI18nCode: o.labelI18nCode }));
|
||||
state.viewList = (res.data || []).map(o => {
|
||||
if (o.type == 0) return { ...o, searchList, columnList };
|
||||
return { ...o, searchList: o.searchList ? JSON.parse(o.searchList) : [], columnList: o.columnList ? JSON.parse(o.columnList) : [] };
|
||||
});
|
||||
if (currentId) {
|
||||
state.currentView = state.viewList.filter(o => o.id === currentId)[0] || state.viewList[0];
|
||||
} else {
|
||||
state.currentView = state.viewList.filter(o => o.status === 1)[0] || state.viewList[0];
|
||||
}
|
||||
});
|
||||
}
|
||||
function handleViewClick(item) {
|
||||
state.currentView = item;
|
||||
}
|
||||
function setListValue(data: any[] = [], defaultData: any[] = [], key) {
|
||||
let list: any[] = [];
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
for (let j = 0; j < defaultData.length; j++) {
|
||||
if (data[i].show && data[i].id == defaultData[j][key]) list.push(defaultData[j]);
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
function spanMethod({ column }) {
|
||||
for (let i = 0; i < state.mergeList.length; i++) {
|
||||
if (column.property == state.mergeList[i].prop) {
|
||||
return { rowspan: state.mergeList[i].rowspan, colspan: state.mergeList[i].colspan };
|
||||
}
|
||||
}
|
||||
}
|
||||
function handleColumnResizableChange({ resizeColumn, resizeWidth }) {
|
||||
if (!resizeColumn.field || !resizeColumn.field.includes('-')) return;
|
||||
const tableVModel = resizeColumn.field.split('-')[0];
|
||||
setTimeout(() => {
|
||||
for (let i = 0; i < state.childColumnList.length; i++) {
|
||||
const element = state.childColumnList[i];
|
||||
if (element.prop == tableVModel) {
|
||||
for (let j = 0; j < element.children.length; j++) {
|
||||
const item = element.children[j];
|
||||
if (item.prop == resizeColumn.field) {
|
||||
item.width = resizeWidth;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}, 0);
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
init();
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="jnpf-content-wrapper">
|
||||
<div class="jnpf-content-wrapper-center">
|
||||
<div class="jnpf-content-wrapper-search-box" v-if="getSearchList.length">
|
||||
<BasicForm @register="registerSearchForm" :schemas="getSearchList"
|
||||
@advanced-change="redoHeight" @submit="handleSearchSubmit" @reset="handleSearchReset"
|
||||
class="search-form">
|
||||
</BasicForm>
|
||||
</div>
|
||||
<div class="jnpf-content-wrapper-content jnpf-content-wrapper-list">
|
||||
<BasicVxeTable @register="registerTable" v-bind="getTableBindValue" ref="tableRef"
|
||||
@columns-change="handleColumnChange" @column-resizable-change="handleColumnResizableChange" >
|
||||
<template #tableTitle>
|
||||
<a-button type="primary" preIcon="icon-ym icon-ym-btn-add"
|
||||
@click="addHandle()"> {{$t('common.add2Text','新增')}}</a-button>
|
||||
</template>
|
||||
<template #toolbarAfter>
|
||||
<ViewList :menuId="searchInfo.menuId" :viewList="viewList" @itemClick="handleViewClick" @reload="initViewList" />
|
||||
<ViewSetting :menuId="searchInfo.menuId" :viewList="viewList" :currentView="currentView" @reload="initViewList" />
|
||||
</template>
|
||||
<template #[column.prop]="{ record }" v-for="column in allColumns" :key="column.prop">
|
||||
<template v-if="!record.top">
|
||||
<template v-if="column.jnpfKey === 'inputNumber'">
|
||||
<jnpf-input-number v-model:value="record[column.prop]" :precision="column.precision" :thousands="column.thousands" disabled detailed />
|
||||
</template>
|
||||
<template v-else-if="column.jnpfKey === 'calculate'">
|
||||
<jnpf-calculate
|
||||
v-model:value="record[column.prop]"
|
||||
:is-storage="column.isStorage"
|
||||
:precision="column.precision"
|
||||
:thousands="column.thousands"
|
||||
:type="column.type"
|
||||
:date-cal-config="column.dateCalConfig"
|
||||
:round-type="column.roundType"
|
||||
detailed />
|
||||
</template>
|
||||
<template v-else-if="column.jnpfKey === 'sign'">
|
||||
<jnpf-sign v-model:value="record[column.prop]" detailed />
|
||||
</template>
|
||||
<template v-else-if="column.jnpfKey === 'signature'">
|
||||
<jnpf-signature v-model:value="record[column.prop]" detailed />
|
||||
</template>
|
||||
<template v-else-if="column.jnpfKey === 'rate'">
|
||||
<jnpf-rate v-model:value="record[column.prop]" :count="column.count" :allow-half="column.allowHalf" disabled />
|
||||
</template>
|
||||
<template v-else-if="column.jnpfKey === 'slider'">
|
||||
<jnpf-slider v-model:value="record[column.prop]" :min="column.min" :max="column.max" :step="column.step" disabled />
|
||||
</template>
|
||||
<template v-else-if="column.jnpfKey === 'uploadImg'">
|
||||
<jnpf-upload-img v-model:value="record[column.prop]" disabled detailed simple v-if="record[column.prop]?.length" />
|
||||
</template>
|
||||
<template v-else-if="column.jnpfKey === 'uploadFile'">
|
||||
<jnpf-upload-file v-model:value="record[column.prop]" disabled detailed simple v-if="record[column.prop]?.length" />
|
||||
</template>
|
||||
<template v-else-if="ocrList.includes(column.jnpfKey)">
|
||||
<jnpf-ocr v-model:value="record[column.prop]" disabled v-if="record[column.prop]" />
|
||||
</template>
|
||||
<template v-else-if="column.jnpfKey === 'input'">
|
||||
<jnpf-input
|
||||
v-model:value="record[column.prop]"
|
||||
:use-mask="column.useMask"
|
||||
:mask-config="column.maskConfig"
|
||||
:show-overflow="true"
|
||||
detailed />
|
||||
</template>
|
||||
<template v-else-if="column.jnpfKey === 'relationForm'">
|
||||
<p class="link-text" @click="toDetail(column.modelId, record[`${column.prop}_id`], column.propsValue)">
|
||||
{{ record[column.prop] || record[column.prop] }}
|
||||
</p>
|
||||
</template>
|
||||
<template v-else-if="systemComponentsList.includes(column.jnpfKey)">
|
||||
{{ record[`${column.prop}_name`] || record[column.prop] }}
|
||||
</template>
|
||||
<template v-else>
|
||||
{{ record[column.prop] }}
|
||||
</template>
|
||||
</template>
|
||||
<template v-else>
|
||||
{{ record[column.prop] }}
|
||||
</template>
|
||||
</template>
|
||||
<template #[item.dataIndex]="{ record }" v-for="(item, index) in childColumnList" :key="item.dataIndex">
|
||||
<ChildTableColumn
|
||||
:data="record[item.prop]"
|
||||
:head="item.children"
|
||||
@toggle-expand="toggleExpand(record, `${item.prop}Expand`)"
|
||||
@to-detail="toDetail"
|
||||
:expand="record[`${item.prop}Expand`]"
|
||||
:show-overflow="true "
|
||||
:key="index" />
|
||||
</template>
|
||||
<template #action="{ record }">
|
||||
<TableAction :actions="getTableActions(record)" v-if="!record.top"/>
|
||||
</template>
|
||||
</BasicVxeTable>
|
||||
</div>
|
||||
</div>
|
||||
<Form ref="formRef" @reload="reload" />
|
||||
<Detail ref="detailRef" />
|
||||
<RelationDetail ref="relationDetailRef" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -1,423 +0,0 @@
|
||||
const searchList = [
|
||||
{
|
||||
"suffixIcon":"",
|
||||
"useScan":false,
|
||||
"fullNameI18nCode":[
|
||||
[
|
||||
""
|
||||
]
|
||||
],
|
||||
"align":"left",
|
||||
"headerAlign":"left",
|
||||
"showCount":false,
|
||||
"__config__":{
|
||||
"jnpfKey":"input",
|
||||
"defaultValue":"",
|
||||
"dictionaryType":null,
|
||||
"dataType":null,
|
||||
"label":"关联大赛",
|
||||
"propsUrl":null,
|
||||
"templateJson":null,
|
||||
"labelI18nCode":null
|
||||
},
|
||||
"readonly":false,
|
||||
"prop":"f_competition_id",
|
||||
"__vModel__":"f_competition_id",
|
||||
"searchMultiple":false,
|
||||
"disabled":false,
|
||||
"id":"f_competition_id",
|
||||
"addonBefore":"",
|
||||
"value":[],
|
||||
"clearable":true,
|
||||
"searchType":1,
|
||||
"jnpfKey":"input",
|
||||
"noShow":false,
|
||||
"placeholderI18nCode":"",
|
||||
"fullName":"关联大赛",
|
||||
"label":"关联大赛",
|
||||
"sortable":false,
|
||||
"addonAfter":"",
|
||||
"sourceType":2,
|
||||
"maskConfig":{
|
||||
"prefixType":1,
|
||||
"useUnrealMask":false,
|
||||
"maskType":1,
|
||||
"unrealMaskLength":1,
|
||||
"prefixLimit":0,
|
||||
"suffixLimit":0,
|
||||
"filler":"*",
|
||||
"prefixSpecifyChar":"",
|
||||
"suffixType":1,
|
||||
"ignoreChar":"",
|
||||
"suffixSpecifyChar":""
|
||||
},
|
||||
"width":null,
|
||||
"showPassword":false,
|
||||
"useMask":false,
|
||||
"isKeyword":false,
|
||||
"fixed":"none",
|
||||
"prefixIcon":"",
|
||||
"labelI18nCode":""
|
||||
},
|
||||
{
|
||||
"suffixIcon":"",
|
||||
"useScan":false,
|
||||
"fullNameI18nCode":[
|
||||
[
|
||||
""
|
||||
]
|
||||
],
|
||||
"align":"left",
|
||||
"headerAlign":"left",
|
||||
"showCount":false,
|
||||
"__config__":{
|
||||
"jnpfKey":"input",
|
||||
"defaultValue":"",
|
||||
"dictionaryType":null,
|
||||
"dataType":null,
|
||||
"label":"团队名称",
|
||||
"propsUrl":null,
|
||||
"templateJson":null,
|
||||
"labelI18nCode":null
|
||||
},
|
||||
"readonly":false,
|
||||
"prop":"f_team_name",
|
||||
"__vModel__":"f_team_name",
|
||||
"searchMultiple":false,
|
||||
"disabled":false,
|
||||
"id":"f_team_name",
|
||||
"addonBefore":"",
|
||||
"value":[],
|
||||
"clearable":true,
|
||||
"searchType":1,
|
||||
"jnpfKey":"input",
|
||||
"noShow":false,
|
||||
"placeholderI18nCode":"",
|
||||
"fullName":"团队名称",
|
||||
"label":"团队名称",
|
||||
"sortable":false,
|
||||
"addonAfter":"",
|
||||
"sourceType":2,
|
||||
"maskConfig":{
|
||||
"prefixType":1,
|
||||
"useUnrealMask":false,
|
||||
"maskType":1,
|
||||
"unrealMaskLength":1,
|
||||
"prefixLimit":0,
|
||||
"suffixLimit":0,
|
||||
"filler":"*",
|
||||
"prefixSpecifyChar":"",
|
||||
"suffixType":1,
|
||||
"ignoreChar":"",
|
||||
"suffixSpecifyChar":""
|
||||
},
|
||||
"width":null,
|
||||
"showPassword":false,
|
||||
"useMask":false,
|
||||
"isKeyword":false,
|
||||
"fixed":"none",
|
||||
"prefixIcon":"",
|
||||
"labelI18nCode":""
|
||||
},
|
||||
{
|
||||
"suffixIcon":"",
|
||||
"useScan":false,
|
||||
"fullNameI18nCode":[
|
||||
[
|
||||
""
|
||||
]
|
||||
],
|
||||
"align":"left",
|
||||
"headerAlign":"left",
|
||||
"showCount":false,
|
||||
"__config__":{
|
||||
"jnpfKey":"input",
|
||||
"defaultValue":"",
|
||||
"dictionaryType":null,
|
||||
"dataType":null,
|
||||
"label":"邀请码",
|
||||
"propsUrl":null,
|
||||
"templateJson":null,
|
||||
"labelI18nCode":null
|
||||
},
|
||||
"readonly":false,
|
||||
"prop":"f_team_code",
|
||||
"__vModel__":"f_team_code",
|
||||
"searchMultiple":false,
|
||||
"disabled":false,
|
||||
"id":"f_team_code",
|
||||
"addonBefore":"",
|
||||
"value":[],
|
||||
"clearable":true,
|
||||
"searchType":1,
|
||||
"jnpfKey":"input",
|
||||
"noShow":false,
|
||||
"placeholderI18nCode":"",
|
||||
"fullName":"邀请码",
|
||||
"label":"邀请码",
|
||||
"sortable":false,
|
||||
"addonAfter":"",
|
||||
"sourceType":2,
|
||||
"maskConfig":{
|
||||
"prefixType":1,
|
||||
"useUnrealMask":false,
|
||||
"maskType":1,
|
||||
"unrealMaskLength":1,
|
||||
"prefixLimit":0,
|
||||
"suffixLimit":0,
|
||||
"filler":"*",
|
||||
"prefixSpecifyChar":"",
|
||||
"suffixType":1,
|
||||
"ignoreChar":"",
|
||||
"suffixSpecifyChar":""
|
||||
},
|
||||
"width":null,
|
||||
"showPassword":false,
|
||||
"useMask":false,
|
||||
"isKeyword":false,
|
||||
"fixed":"none",
|
||||
"prefixIcon":"",
|
||||
"labelI18nCode":""
|
||||
},
|
||||
{
|
||||
"suffixIcon":"",
|
||||
"useScan":false,
|
||||
"fullNameI18nCode":[
|
||||
[
|
||||
""
|
||||
]
|
||||
],
|
||||
"align":"left",
|
||||
"headerAlign":"left",
|
||||
"showCount":false,
|
||||
"__config__":{
|
||||
"jnpfKey":"input",
|
||||
"defaultValue":"",
|
||||
"dictionaryType":null,
|
||||
"dataType":null,
|
||||
"label":"团队口号",
|
||||
"propsUrl":null,
|
||||
"templateJson":null,
|
||||
"labelI18nCode":null
|
||||
},
|
||||
"readonly":false,
|
||||
"prop":"f_slogan",
|
||||
"__vModel__":"f_slogan",
|
||||
"searchMultiple":false,
|
||||
"disabled":false,
|
||||
"id":"f_slogan",
|
||||
"addonBefore":"",
|
||||
"value":[],
|
||||
"clearable":true,
|
||||
"searchType":1,
|
||||
"jnpfKey":"input",
|
||||
"noShow":false,
|
||||
"placeholderI18nCode":"",
|
||||
"fullName":"团队口号",
|
||||
"label":"团队口号",
|
||||
"sortable":false,
|
||||
"addonAfter":"",
|
||||
"sourceType":2,
|
||||
"maskConfig":{
|
||||
"prefixType":1,
|
||||
"useUnrealMask":false,
|
||||
"maskType":1,
|
||||
"unrealMaskLength":1,
|
||||
"prefixLimit":0,
|
||||
"suffixLimit":0,
|
||||
"filler":"*",
|
||||
"prefixSpecifyChar":"",
|
||||
"suffixType":1,
|
||||
"ignoreChar":"",
|
||||
"suffixSpecifyChar":""
|
||||
},
|
||||
"width":null,
|
||||
"showPassword":false,
|
||||
"useMask":false,
|
||||
"isKeyword":false,
|
||||
"fixed":"none",
|
||||
"prefixIcon":"",
|
||||
"labelI18nCode":""
|
||||
},
|
||||
{
|
||||
"suffixIcon":"",
|
||||
"useScan":false,
|
||||
"fullNameI18nCode":[
|
||||
[
|
||||
""
|
||||
]
|
||||
],
|
||||
"align":"left",
|
||||
"headerAlign":"left",
|
||||
"showCount":false,
|
||||
"__config__":{
|
||||
"jnpfKey":"input",
|
||||
"defaultValue":"",
|
||||
"dictionaryType":null,
|
||||
"dataType":null,
|
||||
"label":"状态",
|
||||
"propsUrl":null,
|
||||
"templateJson":null,
|
||||
"labelI18nCode":null
|
||||
},
|
||||
"readonly":false,
|
||||
"prop":"f_status",
|
||||
"__vModel__":"f_status",
|
||||
"searchMultiple":false,
|
||||
"disabled":false,
|
||||
"id":"f_status",
|
||||
"addonBefore":"",
|
||||
"value":[],
|
||||
"clearable":true,
|
||||
"searchType":1,
|
||||
"jnpfKey":"input",
|
||||
"noShow":false,
|
||||
"placeholderI18nCode":"",
|
||||
"fullName":"状态",
|
||||
"label":"状态",
|
||||
"sortable":false,
|
||||
"addonAfter":"",
|
||||
"sourceType":2,
|
||||
"maskConfig":{
|
||||
"prefixType":1,
|
||||
"useUnrealMask":false,
|
||||
"maskType":1,
|
||||
"unrealMaskLength":1,
|
||||
"prefixLimit":0,
|
||||
"suffixLimit":0,
|
||||
"filler":"*",
|
||||
"prefixSpecifyChar":"",
|
||||
"suffixType":1,
|
||||
"ignoreChar":"",
|
||||
"suffixSpecifyChar":""
|
||||
},
|
||||
"width":null,
|
||||
"showPassword":false,
|
||||
"useMask":false,
|
||||
"isKeyword":false,
|
||||
"fixed":"none",
|
||||
"prefixIcon":"",
|
||||
"labelI18nCode":""
|
||||
},
|
||||
{
|
||||
"suffixIcon":"",
|
||||
"useScan":false,
|
||||
"fullNameI18nCode":[
|
||||
[
|
||||
""
|
||||
]
|
||||
],
|
||||
"align":"left",
|
||||
"headerAlign":"left",
|
||||
"showCount":false,
|
||||
"__config__":{
|
||||
"jnpfKey":"input",
|
||||
"defaultValue":"",
|
||||
"dictionaryType":null,
|
||||
"dataType":null,
|
||||
"label":"拒绝原因",
|
||||
"propsUrl":null,
|
||||
"templateJson":null,
|
||||
"labelI18nCode":null
|
||||
},
|
||||
"readonly":false,
|
||||
"prop":"f_reject_reason",
|
||||
"__vModel__":"f_reject_reason",
|
||||
"searchMultiple":false,
|
||||
"disabled":false,
|
||||
"id":"f_reject_reason",
|
||||
"addonBefore":"",
|
||||
"value":[],
|
||||
"clearable":true,
|
||||
"searchType":1,
|
||||
"jnpfKey":"input",
|
||||
"noShow":false,
|
||||
"placeholderI18nCode":"",
|
||||
"fullName":"拒绝原因",
|
||||
"label":"拒绝原因",
|
||||
"sortable":false,
|
||||
"addonAfter":"",
|
||||
"sourceType":2,
|
||||
"maskConfig":{
|
||||
"prefixType":1,
|
||||
"useUnrealMask":false,
|
||||
"maskType":1,
|
||||
"unrealMaskLength":1,
|
||||
"prefixLimit":0,
|
||||
"suffixLimit":0,
|
||||
"filler":"*",
|
||||
"prefixSpecifyChar":"",
|
||||
"suffixType":1,
|
||||
"ignoreChar":"",
|
||||
"suffixSpecifyChar":""
|
||||
},
|
||||
"width":null,
|
||||
"showPassword":false,
|
||||
"useMask":false,
|
||||
"isKeyword":false,
|
||||
"fixed":"none",
|
||||
"prefixIcon":"",
|
||||
"labelI18nCode":""
|
||||
},
|
||||
{
|
||||
"suffixIcon":"",
|
||||
"useScan":false,
|
||||
"fullNameI18nCode":[
|
||||
[
|
||||
""
|
||||
]
|
||||
],
|
||||
"align":"left",
|
||||
"headerAlign":"left",
|
||||
"showCount":false,
|
||||
"__config__":{
|
||||
"jnpfKey":"input",
|
||||
"defaultValue":"",
|
||||
"dictionaryType":null,
|
||||
"dataType":null,
|
||||
"label":"报名时间",
|
||||
"propsUrl":null,
|
||||
"templateJson":null,
|
||||
"labelI18nCode":null
|
||||
},
|
||||
"readonly":false,
|
||||
"prop":"f_enroll_time",
|
||||
"__vModel__":"f_enroll_time",
|
||||
"searchMultiple":false,
|
||||
"disabled":false,
|
||||
"id":"f_enroll_time",
|
||||
"addonBefore":"",
|
||||
"value":[],
|
||||
"clearable":true,
|
||||
"searchType":1,
|
||||
"jnpfKey":"input",
|
||||
"noShow":false,
|
||||
"placeholderI18nCode":"",
|
||||
"fullName":"报名时间",
|
||||
"label":"报名时间",
|
||||
"sortable":false,
|
||||
"addonAfter":"",
|
||||
"sourceType":2,
|
||||
"maskConfig":{
|
||||
"prefixType":1,
|
||||
"useUnrealMask":false,
|
||||
"maskType":1,
|
||||
"unrealMaskLength":1,
|
||||
"prefixLimit":0,
|
||||
"suffixLimit":0,
|
||||
"filler":"*",
|
||||
"prefixSpecifyChar":"",
|
||||
"suffixType":1,
|
||||
"ignoreChar":"",
|
||||
"suffixSpecifyChar":""
|
||||
},
|
||||
"width":null,
|
||||
"showPassword":false,
|
||||
"useMask":false,
|
||||
"isKeyword":false,
|
||||
"fixed":"none",
|
||||
"prefixIcon":"",
|
||||
"labelI18nCode":""
|
||||
}
|
||||
]
|
||||
export default searchList
|
||||
@@ -1,157 +0,0 @@
|
||||
const superQueryJson = [
|
||||
{
|
||||
"clearable":true,
|
||||
"showCount":false,
|
||||
"__config__":{
|
||||
"relationTable":null,
|
||||
"jnpfKey":"input",
|
||||
"dictionaryType":null,
|
||||
"dataType":null,
|
||||
"label":"关联大赛",
|
||||
"propsUrl":null,
|
||||
"templateJson":null,
|
||||
"tableName":""
|
||||
},
|
||||
"useScan":false,
|
||||
"suffixIcon":"",
|
||||
"fullName":"关联大赛",
|
||||
"fullNameI18nCode":[
|
||||
""
|
||||
],
|
||||
"id":"f_competition_id",
|
||||
"addonAfter":""
|
||||
},
|
||||
{
|
||||
"clearable":true,
|
||||
"showCount":false,
|
||||
"__config__":{
|
||||
"relationTable":null,
|
||||
"jnpfKey":"input",
|
||||
"dictionaryType":null,
|
||||
"dataType":null,
|
||||
"label":"团队名称",
|
||||
"propsUrl":null,
|
||||
"templateJson":null,
|
||||
"tableName":""
|
||||
},
|
||||
"useScan":false,
|
||||
"suffixIcon":"",
|
||||
"fullName":"团队名称",
|
||||
"fullNameI18nCode":[
|
||||
""
|
||||
],
|
||||
"id":"f_team_name",
|
||||
"addonAfter":""
|
||||
},
|
||||
{
|
||||
"clearable":true,
|
||||
"showCount":false,
|
||||
"__config__":{
|
||||
"relationTable":null,
|
||||
"jnpfKey":"input",
|
||||
"dictionaryType":null,
|
||||
"dataType":null,
|
||||
"label":"邀请码",
|
||||
"propsUrl":null,
|
||||
"templateJson":null,
|
||||
"tableName":""
|
||||
},
|
||||
"useScan":false,
|
||||
"suffixIcon":"",
|
||||
"fullName":"邀请码",
|
||||
"fullNameI18nCode":[
|
||||
""
|
||||
],
|
||||
"id":"f_team_code",
|
||||
"addonAfter":""
|
||||
},
|
||||
{
|
||||
"clearable":true,
|
||||
"showCount":false,
|
||||
"__config__":{
|
||||
"relationTable":null,
|
||||
"jnpfKey":"input",
|
||||
"dictionaryType":null,
|
||||
"dataType":null,
|
||||
"label":"团队口号",
|
||||
"propsUrl":null,
|
||||
"templateJson":null,
|
||||
"tableName":""
|
||||
},
|
||||
"useScan":false,
|
||||
"suffixIcon":"",
|
||||
"fullName":"团队口号",
|
||||
"fullNameI18nCode":[
|
||||
""
|
||||
],
|
||||
"id":"f_slogan",
|
||||
"addonAfter":""
|
||||
},
|
||||
{
|
||||
"clearable":true,
|
||||
"showCount":false,
|
||||
"__config__":{
|
||||
"relationTable":null,
|
||||
"jnpfKey":"input",
|
||||
"dictionaryType":null,
|
||||
"dataType":null,
|
||||
"label":"状态",
|
||||
"propsUrl":null,
|
||||
"templateJson":null,
|
||||
"tableName":""
|
||||
},
|
||||
"useScan":false,
|
||||
"suffixIcon":"",
|
||||
"fullName":"状态",
|
||||
"fullNameI18nCode":[
|
||||
""
|
||||
],
|
||||
"id":"f_status",
|
||||
"addonAfter":""
|
||||
},
|
||||
{
|
||||
"clearable":true,
|
||||
"showCount":false,
|
||||
"__config__":{
|
||||
"relationTable":null,
|
||||
"jnpfKey":"input",
|
||||
"dictionaryType":null,
|
||||
"dataType":null,
|
||||
"label":"拒绝原因",
|
||||
"propsUrl":null,
|
||||
"templateJson":null,
|
||||
"tableName":""
|
||||
},
|
||||
"useScan":false,
|
||||
"suffixIcon":"",
|
||||
"fullName":"拒绝原因",
|
||||
"fullNameI18nCode":[
|
||||
""
|
||||
],
|
||||
"id":"f_reject_reason",
|
||||
"addonAfter":""
|
||||
},
|
||||
{
|
||||
"clearable":true,
|
||||
"showCount":false,
|
||||
"__config__":{
|
||||
"relationTable":null,
|
||||
"jnpfKey":"input",
|
||||
"dictionaryType":null,
|
||||
"dataType":null,
|
||||
"label":"报名时间",
|
||||
"propsUrl":null,
|
||||
"templateJson":null,
|
||||
"tableName":""
|
||||
},
|
||||
"useScan":false,
|
||||
"suffixIcon":"",
|
||||
"fullName":"报名时间",
|
||||
"fullNameI18nCode":[
|
||||
""
|
||||
],
|
||||
"id":"f_enroll_time",
|
||||
"addonAfter":""
|
||||
}
|
||||
]
|
||||
export default superQueryJson
|
||||
Reference in new issue
Block a user