Author | SHA1 | Message | Date |
---|---|---|---|
|
55bb0068c6 |
Merge branch 'master' of http://175.178.51.79:3000/Augcl/popularize-admin
# Conflicts: # admin-pc/.env.development # admin-pc/.env.production |
3 weeks ago |
|
a636fa07d2 | 修复 | 3 weeks ago |
@ -1,4 +1,4 @@ | |||
NODE_ENV=production | |||
VUE_APP_API_BASE_URL=http://localhost:8001/popularize-admin/ | |||
VUE_APP_API_BASE_URL=https://popularize-admin.hhlm1688.com/popularize-admin/ | |||
VUE_APP_CAS_BASE_URL=http://localhost:8888/cas | |||
VUE_APP_ONLINE_BASE_URL=http://fileview.jeecg.com/onlinePreview |
@ -1,88 +1,93 @@ | |||
/** init domain config */ | |||
import './config' | |||
import Vue from 'vue' | |||
import App from './App.vue' | |||
import Storage from 'vue-ls' | |||
import router from './router' | |||
import store from './store/' | |||
import { VueAxios } from "@/utils/request" | |||
require('@jeecg/antd-online-mini') | |||
require('@jeecg/antd-online-mini/dist/OnlineForm.css') | |||
import Antd, { version } from 'ant-design-vue' | |||
console.log('ant-design-vue version:', version) | |||
import Viser from 'viser-vue' | |||
import 'ant-design-vue/dist/antd.less'; // or 'ant-design-vue/dist/antd.less' | |||
import '@/permission' // permission control | |||
import '@/utils/filter' // base filter | |||
import Print from 'vue-print-nb-jeecg' | |||
/*import '@babel/polyfill'*/ | |||
import preview from 'vue-photo-preview' | |||
import 'vue-photo-preview/dist/skin.css' | |||
import SSO from '@/cas/sso.js' | |||
import { | |||
ACCESS_TOKEN, | |||
DEFAULT_COLOR, | |||
DEFAULT_THEME, | |||
DEFAULT_LAYOUT_MODE, | |||
DEFAULT_COLOR_WEAK, | |||
SIDEBAR_TYPE, | |||
DEFAULT_FIXED_HEADER, | |||
DEFAULT_FIXED_HEADER_HIDDEN, | |||
DEFAULT_FIXED_SIDEMENU, | |||
DEFAULT_CONTENT_WIDTH_TYPE, | |||
DEFAULT_MULTI_PAGE | |||
} from "@/store/mutation-types" | |||
import config from '@/defaultSettings' | |||
import JDictSelectTag from './components/dict/index.js' | |||
import hasPermission from '@/utils/hasPermission' | |||
import vueBus from '@/utils/vueBus'; | |||
import JeecgComponents from '@/components/jeecg/index' | |||
import '@/assets/less/JAreaLinkage.less' | |||
import VueAreaLinkage from 'vue-area-linkage' | |||
import '@/components/jeecg/JVxeTable/install' | |||
import '@/components/JVxeCells/install' | |||
//表单验证 | |||
import { rules } from '@/utils/rules' | |||
Vue.prototype.rules = rules | |||
Vue.config.productionTip = false | |||
Vue.use(Storage, config.storageOptions) | |||
Vue.use(Antd) | |||
Vue.use(VueAxios, router) | |||
Vue.use(Viser) | |||
Vue.use(hasPermission) | |||
Vue.use(JDictSelectTag) | |||
Vue.use(Print) | |||
Vue.use(preview) | |||
Vue.use(vueBus); | |||
Vue.use(JeecgComponents); | |||
Vue.use(VueAreaLinkage); | |||
SSO.init(() => { | |||
main() | |||
}) | |||
function main() { | |||
new Vue({ | |||
router, | |||
store, | |||
mounted () { | |||
store.commit('SET_SIDEBAR_TYPE', Vue.ls.get(SIDEBAR_TYPE, true)) | |||
store.commit('TOGGLE_THEME', Vue.ls.get(DEFAULT_THEME, config.navTheme)) | |||
store.commit('TOGGLE_LAYOUT_MODE', Vue.ls.get(DEFAULT_LAYOUT_MODE, config.layout)) | |||
store.commit('TOGGLE_FIXED_HEADER', Vue.ls.get(DEFAULT_FIXED_HEADER, config.fixedHeader)) | |||
store.commit('TOGGLE_FIXED_SIDERBAR', Vue.ls.get(DEFAULT_FIXED_SIDEMENU, config.fixSiderbar)) | |||
store.commit('TOGGLE_CONTENT_WIDTH', Vue.ls.get(DEFAULT_CONTENT_WIDTH_TYPE, config.contentWidth)) | |||
store.commit('TOGGLE_FIXED_HEADER_HIDDEN', Vue.ls.get(DEFAULT_FIXED_HEADER_HIDDEN, config.autoHideHeader)) | |||
store.commit('TOGGLE_WEAK', Vue.ls.get(DEFAULT_COLOR_WEAK, config.colorWeak)) | |||
store.commit('TOGGLE_COLOR', Vue.ls.get(DEFAULT_COLOR, config.primaryColor)) | |||
store.commit('SET_TOKEN', Vue.ls.get(ACCESS_TOKEN)) | |||
store.commit('SET_MULTI_PAGE',Vue.ls.get(DEFAULT_MULTI_PAGE,config.multipage)) | |||
}, | |||
render: h => h(App) | |||
}).$mount('#app') | |||
/** init domain config */ | |||
import './config' | |||
import Vue from 'vue' | |||
import App from './App.vue' | |||
import Storage from 'vue-ls' | |||
import router from './router' | |||
import store from './store/' | |||
import { VueAxios } from "@/utils/request" | |||
import { VueJsonp } from 'vue-jsonp' | |||
Vue.use(VueJsonp) | |||
require('@jeecg/antd-online-mini') | |||
require('@jeecg/antd-online-mini/dist/OnlineForm.css') | |||
import Antd, { version } from 'ant-design-vue' | |||
console.log('ant-design-vue version:', version) | |||
import Viser from 'viser-vue' | |||
import 'ant-design-vue/dist/antd.less'; // or 'ant-design-vue/dist/antd.less' | |||
import '@/permission' // permission control | |||
import '@/utils/filter' // base filter | |||
import Print from 'vue-print-nb-jeecg' | |||
/*import '@babel/polyfill'*/ | |||
import preview from 'vue-photo-preview' | |||
import 'vue-photo-preview/dist/skin.css' | |||
import SSO from '@/cas/sso.js' | |||
import { | |||
ACCESS_TOKEN, | |||
DEFAULT_COLOR, | |||
DEFAULT_THEME, | |||
DEFAULT_LAYOUT_MODE, | |||
DEFAULT_COLOR_WEAK, | |||
SIDEBAR_TYPE, | |||
DEFAULT_FIXED_HEADER, | |||
DEFAULT_FIXED_HEADER_HIDDEN, | |||
DEFAULT_FIXED_SIDEMENU, | |||
DEFAULT_CONTENT_WIDTH_TYPE, | |||
DEFAULT_MULTI_PAGE | |||
} from "@/store/mutation-types" | |||
import config from '@/defaultSettings' | |||
import JDictSelectTag from './components/dict/index.js' | |||
import hasPermission from '@/utils/hasPermission' | |||
import vueBus from '@/utils/vueBus'; | |||
import JeecgComponents from '@/components/jeecg/index' | |||
import '@/assets/less/JAreaLinkage.less' | |||
import VueAreaLinkage from 'vue-area-linkage' | |||
import '@/components/jeecg/JVxeTable/install' | |||
import '@/components/JVxeCells/install' | |||
//表单验证 | |||
import { rules } from '@/utils/rules' | |||
Vue.prototype.rules = rules | |||
Vue.config.productionTip = false | |||
Vue.use(Storage, config.storageOptions) | |||
Vue.use(Antd) | |||
Vue.use(VueAxios, router) | |||
Vue.use(Viser) | |||
Vue.use(hasPermission) | |||
Vue.use(JDictSelectTag) | |||
Vue.use(Print) | |||
Vue.use(preview) | |||
Vue.use(vueBus); | |||
Vue.use(JeecgComponents); | |||
Vue.use(VueAreaLinkage); | |||
SSO.init(() => { | |||
main() | |||
}) | |||
function main() { | |||
new Vue({ | |||
router, | |||
store, | |||
mounted () { | |||
store.commit('SET_SIDEBAR_TYPE', Vue.ls.get(SIDEBAR_TYPE, true)) | |||
store.commit('TOGGLE_THEME', Vue.ls.get(DEFAULT_THEME, config.navTheme)) | |||
store.commit('TOGGLE_LAYOUT_MODE', Vue.ls.get(DEFAULT_LAYOUT_MODE, config.layout)) | |||
store.commit('TOGGLE_FIXED_HEADER', Vue.ls.get(DEFAULT_FIXED_HEADER, config.fixedHeader)) | |||
store.commit('TOGGLE_FIXED_SIDERBAR', Vue.ls.get(DEFAULT_FIXED_SIDEMENU, config.fixSiderbar)) | |||
store.commit('TOGGLE_CONTENT_WIDTH', Vue.ls.get(DEFAULT_CONTENT_WIDTH_TYPE, config.contentWidth)) | |||
store.commit('TOGGLE_FIXED_HEADER_HIDDEN', Vue.ls.get(DEFAULT_FIXED_HEADER_HIDDEN, config.autoHideHeader)) | |||
store.commit('TOGGLE_WEAK', Vue.ls.get(DEFAULT_COLOR_WEAK, config.colorWeak)) | |||
store.commit('TOGGLE_COLOR', Vue.ls.get(DEFAULT_COLOR, config.primaryColor)) | |||
store.commit('SET_TOKEN', Vue.ls.get(ACCESS_TOKEN)) | |||
store.commit('SET_MULTI_PAGE',Vue.ls.get(DEFAULT_MULTI_PAGE,config.multipage)) | |||
}, | |||
render: h => h(App) | |||
}).$mount('#app') | |||
} |
@ -0,0 +1,377 @@ | |||
<template> | |||
<a-card :bordered="false"> | |||
<!-- 查询区域 --> | |||
<div class="table-page-search-wrapper"> | |||
<a-form layout="inline" @keyup.enter.native="searchQuery"> | |||
<a-row :gutter="24"> | |||
<a-col :xl="6" :lg="7" :md="8" :sm="24"> | |||
<a-form-item label="中文-活动标题"> | |||
<a-input placeholder="请输入中文-活动标题" v-model="queryParam.title"></a-input> | |||
</a-form-item> | |||
</a-col> | |||
<a-col :xl="6" :lg="7" :md="8" :sm="24"> | |||
<a-form-item label="英文-活动标题"> | |||
<a-input placeholder="请输入英文-活动标题" v-model="queryParam.enTitle"></a-input> | |||
</a-form-item> | |||
</a-col> | |||
<template v-if="toggleSearchStatus"> | |||
<a-col :xl="6" :lg="7" :md="8" :sm="24"> | |||
<a-form-item label="活动类型"> | |||
<j-dict-select-tag placeholder="请选择活动类型" v-model="queryParam.type" dictCode="no_type"/> | |||
</a-form-item> | |||
</a-col> | |||
<a-col :xl="6" :lg="7" :md="8" :sm="24"> | |||
<a-form-item label="活动时间"> | |||
<j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择活动时间" v-model="queryParam.startTime"></j-date> | |||
</a-form-item> | |||
</a-col> | |||
<a-col :xl="6" :lg="7" :md="8" :sm="24"> | |||
<a-form-item label="中文-活动地址"> | |||
<a-input placeholder="请输入中文-活动地址" v-model="queryParam.address"></a-input> | |||
</a-form-item> | |||
</a-col> | |||
<a-col :xl="6" :lg="7" :md="8" :sm="24"> | |||
<a-form-item label="英文-活动地址"> | |||
<a-input placeholder="请输入英文-活动地址" v-model="queryParam.enAddress"></a-input> | |||
</a-form-item> | |||
</a-col> | |||
<a-col :xl="6" :lg="7" :md="8" :sm="24"> | |||
<a-form-item label="主理人"> | |||
<j-search-select-tag placeholder="请选择主理人" v-model="queryParam.adminUser" dict="han_hai_member,nick_name,id"/> | |||
</a-form-item> | |||
</a-col> | |||
<a-col :xl="6" :lg="7" :md="8" :sm="24"> | |||
<a-form-item label="是否上架"> | |||
<j-switch placeholder="请选择是否上架" v-model="queryParam.isOpen" query></j-switch> | |||
</a-form-item> | |||
</a-col> | |||
<a-col :xl="6" :lg="7" :md="8" :sm="24"> | |||
<a-form-item label="活动状态"> | |||
<j-dict-select-tag placeholder="请选择活动状态" v-model="queryParam.state" dictCode="no_state"/> | |||
</a-form-item> | |||
</a-col> | |||
</template> | |||
<a-col :xl="6" :lg="7" :md="8" :sm="24"> | |||
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> | |||
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button> | |||
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button> | |||
<a @click="handleToggleSearch" style="margin-left: 8px"> | |||
{{ toggleSearchStatus ? '收起' : '展开' }} | |||
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/> | |||
</a> | |||
</span> | |||
</a-col> | |||
</a-row> | |||
</a-form> | |||
</div> | |||
<!-- 查询区域-END --> | |||
<!-- 操作按钮区域 --> | |||
<div class="table-operator"> | |||
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button> | |||
<!-- <a-button type="primary" icon="download" @click="handleExportXls('活动信息表')">导出</a-button>--> | |||
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">--> | |||
<!-- <a-button type="primary" icon="import">导入</a-button>--> | |||
<!-- </a-upload>--> | |||
<!-- <!– 高级查询区域 –>--> | |||
<!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>--> | |||
<a-dropdown v-if="selectedRowKeys.length > 0"> | |||
<a-menu slot="overlay"> | |||
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item> | |||
</a-menu> | |||
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button> | |||
</a-dropdown> | |||
</div> | |||
<!-- table区域-begin --> | |||
<div> | |||
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> | |||
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 | |||
<a style="margin-left: 24px" @click="onClearSelected">清空</a> | |||
</div> | |||
<a-table | |||
ref="table" | |||
size="middle" | |||
:scroll="{x:true}" | |||
bordered | |||
rowKey="id" | |||
:columns="columns" | |||
:dataSource="dataSource" | |||
:pagination="ipagination" | |||
:loading="loading" | |||
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" | |||
class="j-table-force-nowrap" | |||
@change="handleTableChange"> | |||
<template slot="htmlSlot" slot-scope="text"> | |||
<div v-html="text"></div> | |||
</template> | |||
<template slot="imgSlot" slot-scope="text,record"> | |||
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span> | |||
<img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/> | |||
</template> | |||
<template slot="fileSlot" slot-scope="text"> | |||
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> | |||
<a-button | |||
v-else | |||
:ghost="true" | |||
type="primary" | |||
icon="download" | |||
size="small" | |||
@click="downloadFile(text)"> | |||
下载 | |||
</a-button> | |||
</template> | |||
<span slot="action" slot-scope="text, record"> | |||
<a @click="handleEdit(record)">编辑</a> | |||
<a-divider type="vertical" /> | |||
<a-dropdown> | |||
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a> | |||
<a-menu slot="overlay"> | |||
<a-menu-item> | |||
<a @click="handleDetail(record)">详情</a> | |||
</a-menu-item> | |||
<a-menu-item> | |||
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> | |||
<a>删除</a> | |||
</a-popconfirm> | |||
</a-menu-item> | |||
</a-menu> | |||
</a-dropdown> | |||
</span> | |||
</a-table> | |||
</div> | |||
<popularize-activity-modal ref="modalForm" @ok="modalFormOk"></popularize-activity-modal> | |||
</a-card> | |||
</template> | |||
<script> | |||
import '@/assets/less/TableExpand.less' | |||
import { mixinDevice } from '@/utils/mixin' | |||
import { JeecgListMixin } from '@/mixins/JeecgListMixin' | |||
import PopularizeActivityModal from './modules/PopularizeActivityModal' | |||
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil' | |||
export default { | |||
name: 'PopularizeActivityList', | |||
mixins:[JeecgListMixin, mixinDevice], | |||
components: { | |||
PopularizeActivityModal | |||
}, | |||
data () { | |||
return { | |||
description: '活动信息表管理页面', | |||
// 表头 | |||
columns: [ | |||
{ | |||
title: '#', | |||
dataIndex: '', | |||
key:'rowIndex', | |||
width:60, | |||
align:"center", | |||
customRender:function (t,r,index) { | |||
return parseInt(index)+1; | |||
} | |||
}, | |||
{ | |||
title:'创建人', | |||
align:"center", | |||
dataIndex: 'createBy' | |||
}, | |||
{ | |||
title:'创建日期', | |||
align:"center", | |||
sorter: true, | |||
dataIndex: 'createTime' | |||
}, | |||
{ | |||
title:'中文-活动标题', | |||
align:"center", | |||
dataIndex: 'title' | |||
}, | |||
{ | |||
title:'英文-活动标题', | |||
align:"center", | |||
dataIndex: 'enTitle' | |||
}, | |||
{ | |||
title:'活动类型', | |||
align:"center", | |||
dataIndex: 'type_dictText' | |||
}, | |||
{ | |||
title:'活动封面', | |||
align:"center", | |||
dataIndex: 'image', | |||
scopedSlots: {customRender: 'imgSlot'} | |||
}, | |||
{ | |||
title:'活动时间', | |||
align:"center", | |||
dataIndex: 'startTime' | |||
}, | |||
{ | |||
title:'中文-活动地址', | |||
align:"center", | |||
dataIndex: 'address' | |||
}, | |||
{ | |||
title:'英文-活动地址', | |||
align:"center", | |||
dataIndex: 'enAddress' | |||
}, | |||
{ | |||
title:'活动人数', | |||
align:"center", | |||
dataIndex: 'sum' | |||
}, | |||
{ | |||
title:'报名人数', | |||
align:"center", | |||
dataIndex: 'num' | |||
}, | |||
{ | |||
title:'报名费用', | |||
align:"center", | |||
dataIndex: 'price' | |||
}, | |||
{ | |||
title:'主理人', | |||
align:"center", | |||
dataIndex: 'adminUser_dictText' | |||
}, | |||
// { | |||
// title:'签到人数', | |||
// align:"center", | |||
// dataIndex: 'openNum' | |||
// }, | |||
{ | |||
title:'签到人数', | |||
align:"center", | |||
dataIndex: 'doNum' | |||
}, | |||
{ | |||
title:'是否上架', | |||
align:"center", | |||
dataIndex: 'isOpen', | |||
customRender: (text) => (text ? filterMultiDictText(this.dictOptions['isOpen'], text) : ''), | |||
}, | |||
{ | |||
title:'活动状态', | |||
align:"center", | |||
dataIndex: 'state_dictText' | |||
}, | |||
{ | |||
title:'早鸟票', | |||
align:"center", | |||
dataIndex: 'birdPrice' | |||
}, | |||
{ | |||
title:'单人票', | |||
align:"center", | |||
dataIndex: 'personPrice' | |||
}, | |||
{ | |||
title:'尊享票', | |||
align:"center", | |||
dataIndex: 'expensivePrice' | |||
}, | |||
{ | |||
title:'经度', | |||
align:"center", | |||
dataIndex: 'longitude' | |||
}, | |||
{ | |||
title:'纬度', | |||
align:"center", | |||
dataIndex: 'latitude' | |||
}, | |||
{ | |||
title:'活动需知', | |||
align:"center", | |||
dataIndex: 'orderDetails', | |||
scopedSlots: {customRender: 'htmlSlot'} | |||
}, | |||
{ | |||
title:'活动城市', | |||
align:"center", | |||
dataIndex: 'cityId_dictText' | |||
}, | |||
{ | |||
title: '操作', | |||
dataIndex: 'action', | |||
align:"center", | |||
fixed:"right", | |||
width:147, | |||
scopedSlots: { customRender: 'action' } | |||
} | |||
], | |||
url: { | |||
list: "/popularizeActivity/popularizeActivity/list", | |||
delete: "/popularizeActivity/popularizeActivity/delete", | |||
deleteBatch: "/popularizeActivity/popularizeActivity/deleteBatch", | |||
exportXlsUrl: "/popularizeActivity/popularizeActivity/exportXls", | |||
importExcelUrl: "popularizeActivity/popularizeActivity/importExcel", | |||
}, | |||
dictOptions:{}, | |||
superFieldList:[], | |||
} | |||
}, | |||
created() { | |||
this.$set(this.dictOptions, 'isOpen', [{text:'是',value:'Y'},{text:'否',value:'N'}]) | |||
this.getSuperFieldList(); | |||
}, | |||
computed: { | |||
importExcelUrl: function(){ | |||
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; | |||
}, | |||
}, | |||
methods: { | |||
initDictConfig(){ | |||
}, | |||
getSuperFieldList(){ | |||
let fieldList=[]; | |||
fieldList.push({type:'string',value:'createBy',text:'创建人',dictCode:''}) | |||
fieldList.push({type:'datetime',value:'createTime',text:'创建日期'}) | |||
fieldList.push({type:'Text',value:'title',text:'中文-活动标题',dictCode:''}) | |||
fieldList.push({type:'Text',value:'enTitle',text:'英文-活动标题',dictCode:''}) | |||
fieldList.push({type:'string',value:'type',text:'活动类型',dictCode:'no_type'}) | |||
fieldList.push({type:'Text',value:'image',text:'活动封面',dictCode:''}) | |||
fieldList.push({type:'datetime',value:'startTime',text:'活动时间'}) | |||
fieldList.push({type:'Text',value:'address',text:'中文-活动地址',dictCode:''}) | |||
fieldList.push({type:'Text',value:'enAddress',text:'英文-活动地址',dictCode:''}) | |||
fieldList.push({type:'int',value:'sum',text:'活动人数',dictCode:''}) | |||
fieldList.push({type:'int',value:'num',text:'报名人数',dictCode:''}) | |||
fieldList.push({type:'BigDecimal',value:'price',text:'报名费用',dictCode:''}) | |||
fieldList.push({type:'sel_search',value:'adminUser',text:'主理人',dictTable:"han_hai_member", dictText:'nick_name', dictCode:'id'}) | |||
fieldList.push({type:'int',value:'openNum',text:'签到人数',dictCode:''}) | |||
fieldList.push({type:'switch',value:'isOpen',text:'是否上架'}) | |||
fieldList.push({type:'int',value:'state',text:'活动状态',dictCode:'no_state'}) | |||
fieldList.push({type:'Text',value:'details',text:'活动详情',dictCode:''}) | |||
fieldList.push({type:'Text',value:'enDetails',text:'英文-活动详情',dictCode:''}) | |||
fieldList.push({type:'Text',value:'precautions',text:'中文-注意事项',dictCode:''}) | |||
fieldList.push({type:'Text',value:'enPrecautions',text:'英文-注意事项',dictCode:''}) | |||
fieldList.push({type:'BigDecimal',value:'birdPrice',text:'早鸟票',dictCode:''}) | |||
fieldList.push({type:'BigDecimal',value:'personPrice',text:'单人票',dictCode:''}) | |||
fieldList.push({type:'BigDecimal',value:'expensivePrice',text:'尊享票',dictCode:''}) | |||
fieldList.push({type:'string',value:'longitude',text:'经度',dictCode:''}) | |||
fieldList.push({type:'string',value:'latitude',text:'纬度',dictCode:''}) | |||
fieldList.push({type:'Text',value:'orderDetails',text:'活动需知',dictCode:''}) | |||
fieldList.push({type:'sel_search',value:'cityId',text:'活动城市',dictTable:"popularize_city", dictText:'city', dictCode:'id'}) | |||
fieldList.push({type:'int',value:'doNum',text:'签到人数',dictCode:''}) | |||
this.superFieldList = fieldList | |||
} | |||
} | |||
} | |||
</script> | |||
<style scoped> | |||
@import '~@assets/less/common.less'; | |||
</style> |
@ -0,0 +1,250 @@ | |||
<template> | |||
<a-spin :spinning="confirmLoading"> | |||
<j-form-container :disabled="formDisabled"> | |||
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> | |||
<a-row> | |||
<a-col :span="24"> | |||
<a-form-model-item label="中文-活动标题" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="title"> | |||
<a-input v-model="model.title" placeholder="请输入中文-活动标题" ></a-input> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="英文-活动标题" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enTitle"> | |||
<a-input v-model="model.enTitle" placeholder="请输入英文-活动标题" ></a-input> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="活动类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="type"> | |||
<j-dict-select-tag type="list" v-model="model.type" dictCode="no_type" placeholder="请选择活动类型" /> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="活动封面" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="image"> | |||
<j-image-upload isMultiple v-model="model.image" ></j-image-upload> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="活动时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="startTime"> | |||
<j-date placeholder="请选择活动时间" v-model="model.startTime" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" /> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="中文-活动地址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="address"> | |||
<a-input v-model="model.address" placeholder="请输入中文-活动地址" ></a-input> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="英文-活动地址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enAddress"> | |||
<a-input v-model="model.enAddress" placeholder="请输入英文-活动地址" ></a-input> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="活动人数" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sum"> | |||
<a-input-number v-model="model.sum" placeholder="请输入活动人数" style="width: 100%" /> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="报名人数" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="num"> | |||
<a-input-number v-model="model.num" placeholder="请输入报名人数" style="width: 100%" disabled/> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="报名费用" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="price"> | |||
<a-input-number v-model="model.price" placeholder="请输入报名费用" style="width: 100%" /> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="主理人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="adminUser"> | |||
<j-search-select-tag v-model="model.adminUser" dict="han_hai_member,nick_name,id" /> | |||
</a-form-model-item> | |||
</a-col> | |||
<!-- <a-col :span="24">--> | |||
<!-- <a-form-model-item label="签到人数" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="openNum">--> | |||
<!-- <a-input-number v-model="model.openNum" placeholder="请输入签到人数" style="width: 100%" />--> | |||
<!-- </a-form-model-item>--> | |||
<!-- </a-col>--> | |||
<a-col :span="24"> | |||
<a-form-model-item label="签到人数" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="doNum"> | |||
<a-input-number v-model="model.doNum" placeholder="请输入签到人数" style="width: 100%" disabled/> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="是否上架" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="isOpen"> | |||
<j-switch v-model="model.isOpen" ></j-switch> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="活动状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="state"> | |||
<j-dict-select-tag type="list" v-model="model.state" dictCode="no_state" placeholder="请选择活动状态" /> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="活动详情" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="details"> | |||
<j-editor v-model="model.details" /> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="英文-活动详情" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enDetails"> | |||
<j-editor v-model="model.enDetails" /> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="中文-注意事项" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="precautions"> | |||
<j-editor v-model="model.precautions" /> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="英文-注意事项" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enPrecautions"> | |||
<j-editor v-model="model.enPrecautions" /> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="早鸟票" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="birdPrice"> | |||
<a-input-number v-model="model.birdPrice" placeholder="请输入早鸟票" style="width: 100%" /> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="单人票" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="personPrice"> | |||
<a-input-number v-model="model.personPrice" placeholder="请输入单人票" style="width: 100%" /> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="尊享票" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="expensivePrice"> | |||
<a-input-number v-model="model.expensivePrice" placeholder="请输入尊享票" style="width: 100%" /> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="经度" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="longitude"> | |||
<a-input v-model="model.longitude" placeholder="请输入经度" disabled ></a-input> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="纬度" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="latitude"> | |||
<a-input v-model="model.latitude" placeholder="请输入纬度" disabled ></a-input> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="地图选择位置" :labelCol="labelCol" :wrapperCol="wrapperCol"> | |||
<TencentMapPicker | |||
:latitude="model.latitude" | |||
:longitude="model.longitude" | |||
@onLocationSelected="handleLocationSelected" | |||
/> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="活动需知" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="orderDetails"> | |||
<j-editor v-model="model.orderDetails" /> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="活动城市" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="cityId"> | |||
<j-search-select-tag v-model="model.cityId" dict="popularize_city,city,id" /> | |||
</a-form-model-item> | |||
</a-col> | |||
</a-row> | |||
</a-form-model> | |||
</j-form-container> | |||
</a-spin> | |||
</template> | |||
<script> | |||
import { httpAction, getAction } from '@/api/manage' | |||
import { validateDuplicateValue } from '@/utils/util' | |||
import TencentMapPicker from './TencentMapPicker.vue'; | |||
export default { | |||
name: 'PopularizeActivityForm', | |||
components: { | |||
TencentMapPicker | |||
}, | |||
props: { | |||
//表单禁用 | |||
disabled: { | |||
type: Boolean, | |||
default: false, | |||
required: false | |||
} | |||
}, | |||
data () { | |||
return { | |||
model:{ | |||
}, | |||
labelCol: { | |||
xs: { span: 24 }, | |||
sm: { span: 5 }, | |||
}, | |||
wrapperCol: { | |||
xs: { span: 24 }, | |||
sm: { span: 16 }, | |||
}, | |||
confirmLoading: false, | |||
validatorRules: { | |||
adminUser: [ | |||
{ required: true, message: '请输入主理人!'}, | |||
], | |||
}, | |||
url: { | |||
add: "/popularizeActivity/popularizeActivity/add", | |||
edit: "/popularizeActivity/popularizeActivity/edit", | |||
queryById: "/popularizeActivity/popularizeActivity/queryById" | |||
} | |||
} | |||
}, | |||
computed: { | |||
formDisabled(){ | |||
return this.disabled | |||
}, | |||
}, | |||
created () { | |||
//备份model原始值 | |||
this.modelDefault = JSON.parse(JSON.stringify(this.model)); | |||
}, | |||
methods: { | |||
handleLocationSelected({latitude, longitude}) { | |||
console.log('event11',latitude, longitude) | |||
this.model.latitude = latitude; | |||
this.model.longitude = longitude; | |||
}, | |||
add () { | |||
this.edit(this.modelDefault); | |||
}, | |||
edit (record) { | |||
this.model = Object.assign({}, record); | |||
this.visible = true; | |||
}, | |||
submitForm () { | |||
const that = this; | |||
// 触发表单验证 | |||
this.$refs.form.validate(valid => { | |||
if (valid) { | |||
that.confirmLoading = true; | |||
let httpurl = ''; | |||
let method = ''; | |||
if(!this.model.id){ | |||
httpurl+=this.url.add; | |||
method = 'post'; | |||
}else{ | |||
httpurl+=this.url.edit; | |||
method = 'put'; | |||
} | |||
httpAction(httpurl,this.model,method).then((res)=>{ | |||
if(res.success){ | |||
that.$message.success(res.message); | |||
that.$emit('ok'); | |||
}else{ | |||
that.$message.warning(res.message); | |||
} | |||
}).finally(() => { | |||
that.confirmLoading = false; | |||
}) | |||
} | |||
}) | |||
}, | |||
} | |||
} | |||
</script> |
@ -0,0 +1,234 @@ | |||
<template> | |||
<div> | |||
<div class="map-box"> | |||
<div class="map" ref="map" style="height: 400px" ></div> | |||
<div class="map-search"> | |||
<div> | |||
<a-input-search id="place" v-model="searchValue" placeholder="请输入详细地址" enter-button @search="searchAddress(searchValue)" /> | |||
</div> | |||
<div> | |||
<ul v-if="kwData.length"> | |||
<li v-for="(item, index) in kwData" :key="index" @click="selectKeyword(item)">{{ item.address }}</li> | |||
</ul> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
</template> | |||
<script> | |||
export default { | |||
name: 'TencentMapPicker', | |||
props: { | |||
latitude: { | |||
type: Number|String, | |||
default: 0 | |||
}, | |||
longitude: { | |||
type: Number|String, | |||
default: 0 | |||
} | |||
}, | |||
watch: { | |||
latitude(newVal, oldVal) { | |||
console.info(`newVal`,newVal,`oldVal`,oldVal) | |||
if (newVal) { | |||
this.form.latitude = newVal | |||
// this.$nextTick(()=>{ | |||
// this.map.setCenter(new window.TMap.LatLng(this.form.latitude, this.form.longitude)); | |||
// }) | |||
} | |||
}, | |||
longitude(newVal, oldVal) { | |||
console.info(`newVal`,newVal,`oldVal`,oldVal) | |||
if (newVal) { | |||
this.form.longitude = newVal | |||
// this.$nextTick(()=>{ | |||
// this.map.setCenter(new window.TMap.LatLng(this.form.latitude, this.form.longitude)); | |||
// }) | |||
} | |||
} | |||
}, | |||
data() { | |||
return { | |||
searchValue: '', //地图搜索 | |||
form: { | |||
longitude: 116.397128, | |||
latitude: 39.916527 | |||
}, | |||
kwData:[] | |||
} | |||
}, | |||
mounted() { | |||
let that = this | |||
if (that.script) return; | |||
that.script = document.createElement('script'); | |||
that.script.type = 'text/javascript'; | |||
that.script.src = `//map.qq.com/api/gljs?v=1.exp&libraries=service&key=DGFBZ-JU76M-34A63-6BU47-2FLJH-XLBCN`; | |||
document.head.appendChild(that.script); | |||
that.script.onload = () => { | |||
window.initMap = that.initMap; | |||
that.$nextTick(() => { | |||
that.initMap(); | |||
}); | |||
}; | |||
}, | |||
methods: { | |||
// 地图 | |||
initMap() { | |||
// 搜索类 | |||
this.searchEr = new window.TMap.service.Search({ pageSize: 15 }); | |||
// 地图主类 | |||
this.map = new window.TMap.Map(this.$refs.map, { | |||
backgroundColor: '#f7f7f7', | |||
mapStyleId: 'style1', | |||
zoom: 14, | |||
mapTypeControlOptions: { | |||
mapTypeIds: [], | |||
}, | |||
draggableCursor: 'crosshair', | |||
center: new window.TMap.LatLng(this.form.latitude, this.form.longitude), | |||
}); | |||
// 图层类 | |||
this.markerLayer = new window.TMap.MultiMarker({ | |||
map: this.map, | |||
geometries: [], | |||
}); | |||
// 地址逆解析 | |||
this.geocoder = new window.TMap.service.Geocoder(); | |||
const setMarker = () => { | |||
const latlng = new window.TMap.LatLng(this.form.latitude, this.form.longitude); | |||
this.markerLayer.setGeometries([]); | |||
let geometries = this.markerLayer.getGeometries(); | |||
geometries.push({ | |||
id: '-1', | |||
position: latlng, | |||
}); | |||
this.markerLayer.updateGeometries(geometries); | |||
}; | |||
this.map.on('click', (e) => { | |||
this.form.longitude = e.latLng.getLng(); // 经度 | |||
this.form.latitude = e.latLng.getLat(); // 纬度 | |||
setMarker(); | |||
this.getAddressFormat(); | |||
}); | |||
if (this.form.longitude) { | |||
this.map.setCenter(new window.TMap.LatLng(this.form.latitude, this.form.longitude)); | |||
setMarker(); | |||
} | |||
}, | |||
selectKeyword(event){ | |||
this.map.setCenter(new window.TMap.LatLng(event.location.lat, event.location.lng)); | |||
this.kwData = [] | |||
}, | |||
// 地图搜索 | |||
searchAddress(keyword = '') { | |||
if (!keyword) return; | |||
this.$jsonp('https://apis.map.qq.com/ws/place/v1/suggestion', { | |||
key: 'DGFBZ-JU76M-34A63-6BU47-2FLJH-XLBCN', | |||
output: 'jsonp', | |||
keyword: keyword, | |||
}).then((res) => { | |||
console.log(`res`,res) | |||
if (res.status === 0) { | |||
this.kwData = res.data | |||
} else { | |||
this.kwData = [] | |||
} | |||
}).catch((e) => { | |||
console.log(e) | |||
}) | |||
this.markerLayer.setGeometries([]); | |||
this.searchEr.searchRectangle({ | |||
keyword, | |||
bounds: this.map.getBounds(), | |||
}) | |||
.then((result) => { | |||
console.info(`result`,result) | |||
const { location = {} } = result.data[0] || {}; | |||
const { lat = 39.916527, lng = 116.397128 } = location; | |||
this.map.setCenter(new window.TMap.LatLng(lat, lng)); | |||
result.data.forEach((item, index) => { | |||
let geometries = this.markerLayer.getGeometries(); | |||
// 点标注数据数组 | |||
geometries.push({ | |||
id: String(index), | |||
position: item.location, | |||
}); | |||
// 绘制地点标注 | |||
this.markerLayer.updateGeometries(geometries); | |||
}); | |||
}); | |||
}, | |||
getAddressFormat() { | |||
const { longitude, latitude } = this.form; | |||
this.geocoder | |||
.getAddress({ | |||
location: new window.TMap.LatLng(latitude, longitude), | |||
}) | |||
.then((res) => { | |||
const { | |||
formatted_addresses: { recommend = '' }, | |||
} = res.result || {}; | |||
this.searchValue = recommend | |||
this.form.hotelDetailAddress = recommend; | |||
this.$emit('onLocationSelected', this.form); | |||
console.log(this.form); | |||
}); | |||
}, | |||
} | |||
} | |||
</script> | |||
<style scoped> | |||
.map-box { | |||
position: relative; | |||
} | |||
.map-search { | |||
z-index: 1000; | |||
display: flex; | |||
flex-direction: column; | |||
position: absolute; | |||
top: 20px; | |||
left: 20px; | |||
width: 300px; | |||
} | |||
button { | |||
border-radius: 0; | |||
} | |||
.icons { | |||
display: flex; | |||
align-items: center; | |||
justify-content: space-between; | |||
} | |||
.time { | |||
margin-top: 15px; | |||
width: 100%; | |||
font-size: 12px; | |||
flex-wrap: wrap; | |||
height: 70%; | |||
} | |||
ul{ | |||
background: white; | |||
list-style-type: none; | |||
padding-left: 0px; | |||
height: 280px; | |||
overflow: scroll; | |||
} | |||
li{ | |||
padding-left: 6px; | |||
font-size: 10px; | |||
text-align: left; | |||
height: 40px; | |||
line-height: 15px; | |||
display: flex; | |||
align-items: center; | |||
} | |||
li:hover{ | |||
cursor: pointer; | |||
background: #f5f5f5; | |||
} | |||
</style> |
@ -0,0 +1,267 @@ | |||
<template> | |||
<a-card :bordered="false"> | |||
<!-- 查询区域 --> | |||
<div class="table-page-search-wrapper"> | |||
<a-form layout="inline" @keyup.enter.native="searchQuery"> | |||
<a-row :gutter="24"> | |||
<a-col :xl="6" :lg="7" :md="8" :sm="24"> | |||
<a-form-item label="状态"> | |||
<j-dict-select-tag placeholder="请选择状态" v-model="queryParam.state" dictCode="no_state_type"/> | |||
</a-form-item> | |||
</a-col> | |||
<a-col :xl="6" :lg="7" :md="8" :sm="24"> | |||
<a-form-item label="姓名"> | |||
<a-input placeholder="请输入姓名" v-model="queryParam.name"></a-input> | |||
</a-form-item> | |||
</a-col> | |||
<template v-if="toggleSearchStatus"> | |||
<a-col :xl="6" :lg="7" :md="8" :sm="24"> | |||
<a-form-item label="电话"> | |||
<a-input placeholder="请输入电话" v-model="queryParam.phone"></a-input> | |||
</a-form-item> | |||
</a-col> | |||
<a-col :xl="6" :lg="7" :md="8" :sm="24"> | |||
<a-form-item label="身份证"> | |||
<a-input placeholder="请输入身份证" v-model="queryParam.cardNo"></a-input> | |||
</a-form-item> | |||
</a-col> | |||
<a-col :xl="6" :lg="7" :md="8" :sm="24"> | |||
<a-form-item label="用户"> | |||
<j-search-select-tag placeholder="请选择用户" v-model="queryParam.userId" dict="han_hai_member,nick_name,id"/> | |||
</a-form-item> | |||
</a-col> | |||
</template> | |||
<a-col :xl="6" :lg="7" :md="8" :sm="24"> | |||
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> | |||
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button> | |||
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button> | |||
<a @click="handleToggleSearch" style="margin-left: 8px"> | |||
{{ toggleSearchStatus ? '收起' : '展开' }} | |||
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/> | |||
</a> | |||
</span> | |||
</a-col> | |||
</a-row> | |||
</a-form> | |||
</div> | |||
<!-- 查询区域-END --> | |||
<!-- 操作按钮区域 --> | |||
<div class="table-operator"> | |||
<!-- <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>--> | |||
<!-- <a-button type="primary" icon="download" @click="handleExportXls('主理人认证')">导出</a-button>--> | |||
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">--> | |||
<!-- <a-button type="primary" icon="import">导入</a-button>--> | |||
<!-- </a-upload>--> | |||
<!-- <!– 高级查询区域 –>--> | |||
<!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>--> | |||
<a-dropdown v-if="selectedRowKeys.length > 0"> | |||
<a-menu slot="overlay"> | |||
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item> | |||
</a-menu> | |||
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button> | |||
</a-dropdown> | |||
</div> | |||
<!-- table区域-begin --> | |||
<div> | |||
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> | |||
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 | |||
<a style="margin-left: 24px" @click="onClearSelected">清空</a> | |||
</div> | |||
<a-table | |||
ref="table" | |||
size="middle" | |||
:scroll="{x:true}" | |||
bordered | |||
rowKey="id" | |||
:columns="columns" | |||
:dataSource="dataSource" | |||
:pagination="ipagination" | |||
:loading="loading" | |||
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" | |||
class="j-table-force-nowrap" | |||
@change="handleTableChange"> | |||
<template slot="htmlSlot" slot-scope="text"> | |||
<div v-html="text"></div> | |||
</template> | |||
<template slot="imgSlot" slot-scope="text,record"> | |||
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span> | |||
<img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/> | |||
</template> | |||
<template slot="fileSlot" slot-scope="text"> | |||
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> | |||
<a-button | |||
v-else | |||
:ghost="true" | |||
type="primary" | |||
icon="download" | |||
size="small" | |||
@click="downloadFile(text)"> | |||
下载 | |||
</a-button> | |||
</template> | |||
<span slot="action" slot-scope="text, record"> | |||
<a @click="handleEdit(record)">审核</a> | |||
<a-divider type="vertical" /> | |||
<a-dropdown> | |||
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a> | |||
<a-menu slot="overlay"> | |||
<a-menu-item> | |||
<a @click="handleDetail(record)">详情</a> | |||
</a-menu-item> | |||
<a-menu-item> | |||
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> | |||
<a>删除</a> | |||
</a-popconfirm> | |||
</a-menu-item> | |||
</a-menu> | |||
</a-dropdown> | |||
</span> | |||
</a-table> | |||
</div> | |||
<popularize-authentication-modal ref="modalForm" @ok="modalFormOk"></popularize-authentication-modal> | |||
</a-card> | |||
</template> | |||
<script> | |||
import '@/assets/less/TableExpand.less' | |||
import { mixinDevice } from '@/utils/mixin' | |||
import { JeecgListMixin } from '@/mixins/JeecgListMixin' | |||
import PopularizeAuthenticationModal from './modules/PopularizeAuthenticationModal' | |||
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil' | |||
export default { | |||
name: 'PopularizeAuthenticationList', | |||
mixins:[JeecgListMixin, mixinDevice], | |||
components: { | |||
PopularizeAuthenticationModal | |||
}, | |||
data () { | |||
return { | |||
description: '主理人认证管理页面', | |||
// 表头 | |||
columns: [ | |||
{ | |||
title: '#', | |||
dataIndex: '', | |||
key:'rowIndex', | |||
width:60, | |||
align:"center", | |||
customRender:function (t,r,index) { | |||
return parseInt(index)+1; | |||
} | |||
}, | |||
{ | |||
title:'创建日期', | |||
align:"center", | |||
sorter: true, | |||
dataIndex: 'createTime' | |||
}, | |||
{ | |||
title:'状态', | |||
align:"center", | |||
dataIndex: 'state_dictText' | |||
}, | |||
{ | |||
title:'姓名', | |||
align:"center", | |||
dataIndex: 'name' | |||
}, | |||
{ | |||
title:'电话', | |||
align:"center", | |||
dataIndex: 'phone' | |||
}, | |||
{ | |||
title:'身份证', | |||
align:"center", | |||
dataIndex: 'cardNo' | |||
}, | |||
{ | |||
title:'简历附件', | |||
align:"center", | |||
dataIndex: 'image', | |||
scopedSlots: {customRender: 'fileSlot'} | |||
}, | |||
{ | |||
title:'用户', | |||
align:"center", | |||
dataIndex: 'userId_dictText' | |||
}, | |||
{ | |||
title:'微信二维码', | |||
align:"center", | |||
dataIndex: 'img', | |||
scopedSlots: {customRender: 'imgSlot'} | |||
}, | |||
{ | |||
title:'主理人分数', | |||
align:"center", | |||
dataIndex: 'num' | |||
}, | |||
{ | |||
title:'图片', | |||
align:"center", | |||
dataIndex: 'images', | |||
scopedSlots: {customRender: 'imgSlot'} | |||
}, | |||
{ | |||
title: '操作', | |||
dataIndex: 'action', | |||
align:"center", | |||
fixed:"right", | |||
width:147, | |||
scopedSlots: { customRender: 'action' } | |||
} | |||
], | |||
url: { | |||
list: "/popularizeAuthentication/popularizeAuthentication/list", | |||
delete: "/popularizeAuthentication/popularizeAuthentication/delete", | |||
deleteBatch: "/popularizeAuthentication/popularizeAuthentication/deleteBatch", | |||
exportXlsUrl: "/popularizeAuthentication/popularizeAuthentication/exportXls", | |||
importExcelUrl: "popularizeAuthentication/popularizeAuthentication/importExcel", | |||
}, | |||
dictOptions:{}, | |||
superFieldList:[], | |||
} | |||
}, | |||
created() { | |||
this.getSuperFieldList(); | |||
}, | |||
computed: { | |||
importExcelUrl: function(){ | |||
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; | |||
}, | |||
}, | |||
methods: { | |||
initDictConfig(){ | |||
}, | |||
getSuperFieldList(){ | |||
let fieldList=[]; | |||
fieldList.push({type:'datetime',value:'createTime',text:'创建日期'}) | |||
fieldList.push({type:'int',value:'state',text:'状态',dictCode:'no_state_type'}) | |||
fieldList.push({type:'string',value:'name',text:'姓名',dictCode:''}) | |||
fieldList.push({type:'string',value:'phone',text:'电话',dictCode:''}) | |||
fieldList.push({type:'string',value:'cardNo',text:'身份证',dictCode:''}) | |||
fieldList.push({type:'Text',value:'image',text:'简历附件',dictCode:''}) | |||
fieldList.push({type:'sel_search',value:'userId',text:'用户',dictTable:"han_hai_member", dictText:'nick_name', dictCode:'id'}) | |||
fieldList.push({type:'Text',value:'img',text:'微信二维码',dictCode:''}) | |||
fieldList.push({type:'int',value:'num',text:'主理人分数',dictCode:''}) | |||
fieldList.push({type:'Text',value:'images',text:'图片',dictCode:''}) | |||
this.superFieldList = fieldList | |||
} | |||
} | |||
} | |||
</script> | |||
<style scoped> | |||
@import '~@assets/less/common.less'; | |||
</style> |
@ -0,0 +1,144 @@ | |||
<template> | |||
<a-spin :spinning="confirmLoading"> | |||
<j-form-container :disabled="formDisabled"> | |||
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> | |||
<a-row> | |||
<a-col :span="24"> | |||
<a-form-model-item label="状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="state"> | |||
<j-dict-select-tag type="list" v-model="model.state" dictCode="no_state_type" placeholder="请选择状态" /> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="姓名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="name"> | |||
<a-input v-model="model.name" placeholder="请输入姓名" disabled></a-input> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="电话" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="phone"> | |||
<a-input v-model="model.phone" placeholder="请输入电话" disabled></a-input> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="身份证" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="cardNo"> | |||
<a-input v-model="model.cardNo" placeholder="请输入身份证" disabled ></a-input> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="简历附件" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="image"> | |||
<j-upload v-model="model.image" disabled ></j-upload> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="用户" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="userId"> | |||
<j-search-select-tag v-model="model.userId" dict="han_hai_member,nick_name,id" disabled/> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="微信二维码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="img"> | |||
<j-image-upload isMultiple v-model="model.img" disabled></j-image-upload> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="主理人分数" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="num"> | |||
<a-input-number v-model="model.num" placeholder="请输入主理人分数" style="width: 100%" disabled/> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="图片" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="images"> | |||
<j-image-upload isMultiple v-model="model.images" disabled></j-image-upload> | |||
</a-form-model-item> | |||
</a-col> | |||
</a-row> | |||
</a-form-model> | |||
</j-form-container> | |||
</a-spin> | |||
</template> | |||
<script> | |||
import { httpAction, getAction } from '@/api/manage' | |||
import { validateDuplicateValue } from '@/utils/util' | |||
export default { | |||
name: 'PopularizeAuthenticationForm', | |||
components: { | |||
}, | |||
props: { | |||
//表单禁用 | |||
disabled: { | |||
type: Boolean, | |||
default: false, | |||
required: false | |||
} | |||
}, | |||
data () { | |||
return { | |||
model:{ | |||
}, | |||
labelCol: { | |||
xs: { span: 24 }, | |||
sm: { span: 5 }, | |||
}, | |||
wrapperCol: { | |||
xs: { span: 24 }, | |||
sm: { span: 16 }, | |||
}, | |||
confirmLoading: false, | |||
validatorRules: { | |||
}, | |||
url: { | |||
add: "/popularizeAuthentication/popularizeAuthentication/add", | |||
edit: "/popularizeAuthentication/popularizeAuthentication/edit", | |||
queryById: "/popularizeAuthentication/popularizeAuthentication/queryById" | |||
} | |||
} | |||
}, | |||
computed: { | |||
formDisabled(){ | |||
return this.disabled | |||
}, | |||
}, | |||
created () { | |||
//备份model原始值 | |||
this.modelDefault = JSON.parse(JSON.stringify(this.model)); | |||
}, | |||
methods: { | |||
add () { | |||
this.edit(this.modelDefault); | |||
}, | |||
edit (record) { | |||
this.model = Object.assign({}, record); | |||
this.visible = true; | |||
}, | |||
submitForm () { | |||
const that = this; | |||
// 触发表单验证 | |||
this.$refs.form.validate(valid => { | |||
if (valid) { | |||
that.confirmLoading = true; | |||
let httpurl = ''; | |||
let method = ''; | |||
if(!this.model.id){ | |||
httpurl+=this.url.add; | |||
method = 'post'; | |||
}else{ | |||
httpurl+=this.url.edit; | |||
method = 'put'; | |||
} | |||
httpAction(httpurl,this.model,method).then((res)=>{ | |||
if(res.success){ | |||
that.$message.success(res.message); | |||
that.$emit('ok'); | |||
}else{ | |||
that.$message.warning(res.message); | |||
} | |||
}).finally(() => { | |||
that.confirmLoading = false; | |||
}) | |||
} | |||
}) | |||
}, | |||
} | |||
} | |||
</script> |
@ -0,0 +1,84 @@ | |||
<template> | |||
<a-drawer | |||
:title="title" | |||
:width="width" | |||
placement="right" | |||
:closable="false" | |||
@close="close" | |||
destroyOnClose | |||
:visible="visible"> | |||
<popularize-activity-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></popularize-activity-form> | |||
<div class="drawer-footer"> | |||
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button> | |||
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button> | |||
</div> | |||
</a-drawer> | |||
</template> | |||
<script> | |||
import PopularizeActivityForm from './PopularizeActivityForm' | |||
export default { | |||
name: 'PopularizeActivityModal', | |||
components: { | |||
PopularizeActivityForm | |||
}, | |||
data () { | |||
return { | |||
title:"操作", | |||
width:800, | |||
visible: false, | |||
disableSubmit: false | |||
} | |||
}, | |||
methods: { | |||
add () { | |||
this.visible=true | |||
this.$nextTick(()=>{ | |||
this.$refs.realForm.add(); | |||
}) | |||
}, | |||
edit (record) { | |||
this.visible=true | |||
this.$nextTick(()=>{ | |||
this.$refs.realForm.edit(record); | |||
}); | |||
}, | |||
close () { | |||
this.$emit('close'); | |||
this.visible = false; | |||
}, | |||
submitCallback(){ | |||
this.$emit('ok'); | |||
this.visible = false; | |||
}, | |||
handleOk () { | |||
this.$refs.realForm.submitForm(); | |||
}, | |||
handleCancel () { | |||
this.close() | |||
} | |||
} | |||
} | |||
</script> | |||
<style lang="less" scoped> | |||
/** Button按钮间距 */ | |||
.ant-btn { | |||
margin-left: 30px; | |||
margin-bottom: 30px; | |||
float: right; | |||
} | |||
.drawer-footer{ | |||
position: absolute; | |||
bottom: -8px; | |||
width: 100%; | |||
border-top: 1px solid #e8e8e8; | |||
padding: 10px 16px; | |||
text-align: right; | |||
left: 0; | |||
background: #fff; | |||
border-radius: 0 0 2px 2px; | |||
} | |||
</style> |
@ -0,0 +1,60 @@ | |||
<template> | |||
<j-modal | |||
:title="title" | |||
:width="width" | |||
:visible="visible" | |||
switchFullscreen | |||
@ok="handleOk" | |||
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }" | |||
@cancel="handleCancel" | |||
cancelText="关闭"> | |||
<popularize-activity-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></popularize-activity-form> | |||
</j-modal> | |||
</template> | |||
<script> | |||
import PopularizeActivityForm from './PopularizeActivityForm' | |||
export default { | |||
name: 'PopularizeActivityModal', | |||
components: { | |||
PopularizeActivityForm | |||
}, | |||
data () { | |||
return { | |||
title:'', | |||
width:800, | |||
visible: false, | |||
disableSubmit: false | |||
} | |||
}, | |||
methods: { | |||
add () { | |||
this.visible=true | |||
this.$nextTick(()=>{ | |||
this.$refs.realForm.add(); | |||
}) | |||
}, | |||
edit (record) { | |||
this.visible=true | |||
this.$nextTick(()=>{ | |||
this.$refs.realForm.edit(record); | |||
}) | |||
}, | |||
close () { | |||
this.$emit('close'); | |||
this.visible = false; | |||
}, | |||
handleOk () { | |||
this.$refs.realForm.submitForm(); | |||
}, | |||
submitCallback(){ | |||
this.$emit('ok'); | |||
this.visible = false; | |||
}, | |||
handleCancel () { | |||
this.close() | |||
} | |||
} | |||
} | |||
</script> |
@ -0,0 +1,84 @@ | |||
<template> | |||
<a-drawer | |||
:title="title" | |||
:width="width" | |||
placement="right" | |||
:closable="false" | |||
@close="close" | |||
destroyOnClose | |||
:visible="visible"> | |||
<popularize-authentication-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></popularize-authentication-form> | |||
<div class="drawer-footer"> | |||
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button> | |||
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button> | |||
</div> | |||
</a-drawer> | |||
</template> | |||
<script> | |||
import PopularizeAuthenticationForm from './PopularizeAuthenticationForm' | |||
export default { | |||
name: 'PopularizeAuthenticationModal', | |||
components: { | |||
PopularizeAuthenticationForm | |||
}, | |||
data () { | |||
return { | |||
title:"操作", | |||
width:800, | |||
visible: false, | |||
disableSubmit: false | |||
} | |||
}, | |||
methods: { | |||
add () { | |||
this.visible=true | |||
this.$nextTick(()=>{ | |||
this.$refs.realForm.add(); | |||
}) | |||
}, | |||
edit (record) { | |||
this.visible=true | |||
this.$nextTick(()=>{ | |||
this.$refs.realForm.edit(record); | |||
}); | |||
}, | |||
close () { | |||
this.$emit('close'); | |||
this.visible = false; | |||
}, | |||
submitCallback(){ | |||
this.$emit('ok'); | |||
this.visible = false; | |||
}, | |||
handleOk () { | |||
this.$refs.realForm.submitForm(); | |||
}, | |||
handleCancel () { | |||
this.close() | |||
} | |||
} | |||
} | |||
</script> | |||
<style lang="less" scoped> | |||
/** Button按钮间距 */ | |||
.ant-btn { | |||
margin-left: 30px; | |||
margin-bottom: 30px; | |||
float: right; | |||
} | |||
.drawer-footer{ | |||
position: absolute; | |||
bottom: -8px; | |||
width: 100%; | |||
border-top: 1px solid #e8e8e8; | |||
padding: 10px 16px; | |||
text-align: right; | |||
left: 0; | |||
background: #fff; | |||
border-radius: 0 0 2px 2px; | |||
} | |||
</style> |
@ -0,0 +1,60 @@ | |||
<template> | |||
<j-modal | |||
:title="title" | |||
:width="width" | |||
:visible="visible" | |||
switchFullscreen | |||
@ok="handleOk" | |||
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }" | |||
@cancel="handleCancel" | |||
cancelText="关闭"> | |||
<popularize-authentication-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></popularize-authentication-form> | |||
</j-modal> | |||
</template> | |||
<script> | |||
import PopularizeAuthenticationForm from './PopularizeAuthenticationForm' | |||
export default { | |||
name: 'PopularizeAuthenticationModal', | |||
components: { | |||
PopularizeAuthenticationForm | |||
}, | |||
data () { | |||
return { | |||
title:'', | |||
width:800, | |||
visible: false, | |||
disableSubmit: false | |||
} | |||
}, | |||
methods: { | |||
add () { | |||
this.visible=true | |||
this.$nextTick(()=>{ | |||
this.$refs.realForm.add(); | |||
}) | |||
}, | |||
edit (record) { | |||
this.visible=true | |||
this.$nextTick(()=>{ | |||
this.$refs.realForm.edit(record); | |||
}) | |||
}, | |||
close () { | |||
this.$emit('close'); | |||
this.visible = false; | |||
}, | |||
handleOk () { | |||
this.$refs.realForm.submitForm(); | |||
}, | |||
submitCallback(){ | |||
this.$emit('ok'); | |||
this.visible = false; | |||
}, | |||
handleCancel () { | |||
this.close() | |||
} | |||
} | |||
} | |||
</script> |