Commit 9dd13ed7b3e228d972dc57c652cb6552da71294c
1 parent
03207d5d
备份
Showing
178 changed files
with
15622 additions
and
65 deletions
Too many changes.
To preserve performance only 100 of 178 files are displayed.
antis-ncc-admin/.env.production
antis-ncc-admin/src/assets/images/ncc1.png
antis-ncc-admin/src/assets/images/ncc2.png
antis-ncc-admin/src/utils/define.js
antis-ncc-admin/src/views/permission/user/Form.vue
| ... | ... | @@ -27,6 +27,16 @@ |
| 27 | 27 | </el-form-item> |
| 28 | 28 | </el-col> |
| 29 | 29 | <el-col :sm="12" :xs="24"> |
| 30 | + <el-form-item label="学校名称" prop="school"> | |
| 31 | + <el-input v-model="dataForm.school" placeholder="学校名称" /> | |
| 32 | + </el-form-item> | |
| 33 | + </el-col> | |
| 34 | + <el-col :sm="12" :xs="24"> | |
| 35 | + <el-form-item label="学号" prop="schoolNumber"> | |
| 36 | + <el-input v-model="dataForm.schoolNumber" placeholder="学号" /> | |
| 37 | + </el-form-item> | |
| 38 | + </el-col> | |
| 39 | + <el-col :sm="12" :xs="24"> | |
| 30 | 40 | <el-form-item label="性别" prop="gender"> |
| 31 | 41 | <el-select v-model="dataForm.gender" placeholder="选择性别"> |
| 32 | 42 | <el-option value="1" label="男"></el-option> |
| ... | ... | @@ -162,6 +172,8 @@ |
| 162 | 172 | urgentContacts: '', |
| 163 | 173 | urgentTelePhone: '', |
| 164 | 174 | postalAddress: '', |
| 175 | + "schoolNumber":"", | |
| 176 | + "school":'' | |
| 165 | 177 | }, |
| 166 | 178 | roleId: [], |
| 167 | 179 | departmentTreeData: [], | ... | ... |
antis-ncc-admin/src/views/permission/user/index.vue
| ... | ... | @@ -68,6 +68,18 @@ |
| 68 | 68 | {{scope.row.postalAddress}}</div> |
| 69 | 69 | </template> |
| 70 | 70 | </el-table-column> |
| 71 | + <el-table-column prop="school" label="学校名称"> | |
| 72 | + <template slot-scope="scope"> | |
| 73 | + <div style="width:100px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis"> | |
| 74 | + {{scope.row.school}}</div> | |
| 75 | + </template> | |
| 76 | + </el-table-column> | |
| 77 | + <el-table-column prop="schoolNumber" label="学号"> | |
| 78 | + <template slot-scope="scope"> | |
| 79 | + <div style="width:100px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis"> | |
| 80 | + {{scope.row.schoolNumber}}</div> | |
| 81 | + </template> | |
| 82 | + </el-table-column> | |
| 71 | 83 | <el-table-column prop="creatorTime" label="创建时间" :formatter="ncc.tableDateFormat" width="120" /> |
| 72 | 84 | <el-table-column prop="sortCode" label="排序" width="70" align="center" /> |
| 73 | 85 | <el-table-column label="状态" width="70" align="center"> | ... | ... |
antis-ncc-admin/src/views/tbArea/Form.vue
| ... | ... | @@ -89,7 +89,7 @@ |
| 89 | 89 | this.$refs['elForm'].resetFields(); |
| 90 | 90 | if (this.dataForm.id) { |
| 91 | 91 | request({ |
| 92 | - url: '/api/Education/TbArea/' + this.dataForm.id, | |
| 92 | + url: '/api/Blind/TbArea/' + this.dataForm.id, | |
| 93 | 93 | method: 'get' |
| 94 | 94 | }).then(res =>{ |
| 95 | 95 | this.dataForm = res.data; |
| ... | ... | @@ -102,7 +102,7 @@ |
| 102 | 102 | if (valid) { |
| 103 | 103 | if (!this.dataForm.id) { |
| 104 | 104 | request({ |
| 105 | - url: `/api/Education/TbArea`, | |
| 105 | + url: `/api/Blind/TbArea`, | |
| 106 | 106 | method: 'post', |
| 107 | 107 | data: this.dataForm, |
| 108 | 108 | }).then((res) => { |
| ... | ... | @@ -118,7 +118,7 @@ |
| 118 | 118 | }) |
| 119 | 119 | } else { |
| 120 | 120 | request({ |
| 121 | - url: '/api/Education/TbArea/' + this.dataForm.id, | |
| 121 | + url: '/api/Blind/TbArea/' + this.dataForm.id, | |
| 122 | 122 | method: 'PUT', |
| 123 | 123 | data: this.dataForm |
| 124 | 124 | }).then((res) => { | ... | ... |
antis-ncc-admin/src/views/tbArea/index.vue
| ... | ... | @@ -99,7 +99,7 @@ |
| 99 | 99 | } |
| 100 | 100 | } |
| 101 | 101 | request({ |
| 102 | - url: `/api/Education/TbArea`, | |
| 102 | + url: `/api/Blind/TbArea`, | |
| 103 | 103 | method: 'GET', |
| 104 | 104 | data: query |
| 105 | 105 | }).then(res => { |
| ... | ... | @@ -113,7 +113,7 @@ |
| 113 | 113 | type: 'warning' |
| 114 | 114 | }).then(() => { |
| 115 | 115 | request({ |
| 116 | - url: `/api/Education/TbArea/${id}`, | |
| 116 | + url: `/api/Blind/TbArea/${id}`, | |
| 117 | 117 | method: 'DELETE' |
| 118 | 118 | }).then(res => { |
| 119 | 119 | this.$message({ |
| ... | ... | @@ -145,7 +145,7 @@ |
| 145 | 145 | type: 'warning' |
| 146 | 146 | }).then(() => { |
| 147 | 147 | request({ |
| 148 | - url: `/api/Education/TbArea/batchRemove`, | |
| 148 | + url: `/api/Blind/TbArea/batchRemove`, | |
| 149 | 149 | method: 'POST', |
| 150 | 150 | data: ids , |
| 151 | 151 | }).then(res => { |
| ... | ... | @@ -174,7 +174,7 @@ |
| 174 | 174 | download(data) { |
| 175 | 175 | let query = { ...data, ...this.listQuery, ...this.query } |
| 176 | 176 | request({ |
| 177 | - url: `/api/Education/TbArea/Actions/Export`, | |
| 177 | + url: `/api/Blind/TbArea/Actions/Export`, | |
| 178 | 178 | method: 'GET', |
| 179 | 179 | data: query |
| 180 | 180 | }).then(res => { | ... | ... |
antis-ncc-admin/src/views/tbAreaLine/ExportBox.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <el-dialog title="导出数据" :close-on-click-modal="false" :visible.sync="visible" | |
| 3 | + class="NCC-dialog NCC-dialog_center" lock-scroll width="600px"> | |
| 4 | + <el-form label-position="top" label-width="80px"> | |
| 5 | + <el-form-item label="数据选择"> | |
| 6 | + <el-radio-group v-model="type"> | |
| 7 | + <el-radio :label="0">当前页面数据</el-radio> | |
| 8 | + <el-radio :label="1">全部页面数据</el-radio> | |
| 9 | + </el-radio-group> | |
| 10 | + </el-form-item> | |
| 11 | + <el-form-item label="导出字段"> | |
| 12 | + <el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" | |
| 13 | + @change="handleCheckAllChange">全选</el-checkbox> | |
| 14 | + <el-checkbox-group v-model="columns" @change="handleCheckedChange"> | |
| 15 | + <el-checkbox v-for="item in columnList" :label="item.prop" :key="item.prop"> | |
| 16 | + {{item.label}} | |
| 17 | + </el-checkbox> | |
| 18 | + </el-checkbox-group> | |
| 19 | + </el-form-item> | |
| 20 | + </el-form> | |
| 21 | + <span slot="footer" class="dialog-footer"> | |
| 22 | + <el-button @click="visible=false">取 消</el-button> | |
| 23 | + <el-button type="primary" @click="downLoad">导 出</el-button> | |
| 24 | + </span> | |
| 25 | + </el-dialog> | |
| 26 | +</template> | |
| 27 | + | |
| 28 | +<script> | |
| 29 | +export default { | |
| 30 | + data() { | |
| 31 | + return { | |
| 32 | + visible: false, | |
| 33 | + btnLoading: false, | |
| 34 | + type: 0, | |
| 35 | + columns: [], | |
| 36 | + checkAll: true, | |
| 37 | + isIndeterminate: false, | |
| 38 | + columnList: [] | |
| 39 | + } | |
| 40 | + }, | |
| 41 | + methods: { | |
| 42 | + init(columnList) { | |
| 43 | + this.visible = true | |
| 44 | + this.columnList = columnList | |
| 45 | + this.columns = columnList.map(o => o.prop) | |
| 46 | + }, | |
| 47 | + handleCheckAllChange(val) { | |
| 48 | + this.columns = val ? this.columnList.map(o => o.prop) : []; | |
| 49 | + this.isIndeterminate = false; | |
| 50 | + }, | |
| 51 | + handleCheckedChange(value) { | |
| 52 | + let checkedCount = value.length; | |
| 53 | + this.checkAll = checkedCount === this.columnList.length; | |
| 54 | + this.isIndeterminate = checkedCount > 0 && checkedCount < this.columnList.length; | |
| 55 | + }, | |
| 56 | + downLoad() { | |
| 57 | + this.$emit('download', { dataType: this.type, selectKey: this.columns.join(',') }) | |
| 58 | + } | |
| 59 | + } | |
| 60 | +} | |
| 61 | +</script> | |
| 62 | +<style lang="scss" scoped> | |
| 63 | +>>> .el-dialog__body { | |
| 64 | + padding: 20px !important; | |
| 65 | +} | |
| 66 | +</style> | |
| 0 | 67 | \ No newline at end of file | ... | ... |
antis-ncc-admin/src/views/tbAreaLine/Form.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <el-dialog :title="!dataForm.id ? '新建' : isDetail ? '详情':'编辑'" :close-on-click-modal="false" :visible.sync="visible" class="NCC-dialog NCC-dialog_center" lock-scroll width="600px"> | |
| 3 | + <el-row :gutter="15" class="" > | |
| 4 | + <el-form ref="elForm" :model="dataForm" size="small" label-width="100px" label-position="right" :disabled="!!isDetail" :rules="rules"> | |
| 5 | + <el-col :span="24"> | |
| 6 | + <el-form-item label="地域" prop="areaId"> | |
| 7 | + <el-select v-model="dataForm.areaId" placeholder="请选择" clearable required :style='{"width":"100%"}' > | |
| 8 | + <el-option v-for="(item, index) in areaIdOptions" :key="index" :label="item.F_Name" :value="item.F_Id" ></el-option> | |
| 9 | + </el-select> | |
| 10 | + </el-form-item> | |
| 11 | + </el-col> | |
| 12 | + <el-col :span="24"> | |
| 13 | + <el-form-item label="线路标题" prop="title"> | |
| 14 | + <el-input v-model="dataForm.title" placeholder="请输入" clearable required :style='{"width":"100%"}' > | |
| 15 | + </el-input> | |
| 16 | + </el-form-item> | |
| 17 | + </el-col> | |
| 18 | + <el-col :span="24"> | |
| 19 | + <el-form-item label="线路概况" prop="remark"> | |
| 20 | + <el-input v-model="dataForm.remark" placeholder="请输入" required show-word-limit :style='{"width":"100%"}' type='textarea' :autosize='{"minRows":4,"maxRows":4}' > | |
| 21 | + </el-input> | |
| 22 | + </el-form-item> | |
| 23 | + </el-col> | |
| 24 | + <el-col :span="24"> | |
| 25 | + <el-form-item label="线路图片" prop="banner"> | |
| 26 | + <NCC-UploadImg v-model="dataForm.banner" required :fileSize="5" sizeUnit="MB" :limit="1" > | |
| 27 | + </NCC-UploadImg> | |
| 28 | + </el-form-item> | |
| 29 | + </el-col> | |
| 30 | + <el-col :span="24" v-if="false" > | |
| 31 | + <el-form-item label="创建时间" prop="creatorTime"> | |
| 32 | + <el-input v-model="dataForm.creatorTime" placeholder="系统自动生成" readonly > | |
| 33 | + </el-input> | |
| 34 | + </el-form-item> | |
| 35 | + </el-col> | |
| 36 | + <el-col :span="24" v-if="false" > | |
| 37 | + <el-form-item label="修改时间" prop="lastModifyTime"> | |
| 38 | + <el-input v-model="dataForm.lastModifyTime" placeholder="系统自动生成" readonly > | |
| 39 | + </el-input> | |
| 40 | + </el-form-item> | |
| 41 | + </el-col> | |
| 42 | + </el-form> | |
| 43 | + </el-row> | |
| 44 | + <span slot="footer" class="dialog-footer"> | |
| 45 | + <el-button @click="visible = false">取 消</el-button> | |
| 46 | + <el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail">确 定</el-button> | |
| 47 | + </span> | |
| 48 | + </el-dialog> | |
| 49 | +</template> | |
| 50 | +<script> | |
| 51 | + import request from '@/utils/request' | |
| 52 | + import { getDictionaryDataSelector } from '@/api/systemData/dictionary' | |
| 53 | + import { previewDataInterface } from '@/api/systemData/dataInterface' | |
| 54 | + export default { | |
| 55 | + components: {}, | |
| 56 | + props: [], | |
| 57 | + data() { | |
| 58 | + return { | |
| 59 | + loading: false, | |
| 60 | + visible: false, | |
| 61 | + isDetail: false, | |
| 62 | + dataForm: { | |
| 63 | + id:'', | |
| 64 | + areaId:undefined, | |
| 65 | + title:undefined, | |
| 66 | + remark:undefined, | |
| 67 | + banner:[], | |
| 68 | + creatorTime:undefined, | |
| 69 | + lastModifyTime:undefined, | |
| 70 | + }, | |
| 71 | + rules: { | |
| 72 | + areaId:[ | |
| 73 | + { | |
| 74 | + required:true, | |
| 75 | + message:'请输入地域', | |
| 76 | + trigger:'change' | |
| 77 | + }, | |
| 78 | + ], | |
| 79 | + title:[ | |
| 80 | + { | |
| 81 | + required:true, | |
| 82 | + message:'请输入线路标题', | |
| 83 | + trigger:'blur' | |
| 84 | + }, | |
| 85 | + ], | |
| 86 | + remark:[ | |
| 87 | + { | |
| 88 | + required:true, | |
| 89 | + message:'请输入线路概况', | |
| 90 | + trigger:'blur' | |
| 91 | + }, | |
| 92 | + ], | |
| 93 | + banner:[ | |
| 94 | + { | |
| 95 | + required:true, | |
| 96 | + message:'请输入线路图片', | |
| 97 | + trigger:'click' | |
| 98 | + }, | |
| 99 | + ], | |
| 100 | + }, | |
| 101 | + areaIdOptions : [], | |
| 102 | + } | |
| 103 | + }, | |
| 104 | + computed: {}, | |
| 105 | + watch: {}, | |
| 106 | + created() { | |
| 107 | + this.getareaIdOptions(); | |
| 108 | + }, | |
| 109 | + mounted() { | |
| 110 | + }, | |
| 111 | + methods: { | |
| 112 | + getareaIdOptions(){ | |
| 113 | + previewDataInterface('393301869759300869').then(res => { | |
| 114 | + this.areaIdOptions = res.data | |
| 115 | + }); | |
| 116 | + }, | |
| 117 | + goBack() { | |
| 118 | + this.$emit('refresh') | |
| 119 | + }, | |
| 120 | + init(id, isDetail) { | |
| 121 | + this.dataForm.id = id || 0; | |
| 122 | + this.visible = true; | |
| 123 | + this.isDetail = isDetail || false; | |
| 124 | + this.$nextTick(() => { | |
| 125 | + this.$refs['elForm'].resetFields(); | |
| 126 | + if (this.dataForm.id) { | |
| 127 | + request({ | |
| 128 | + url: '/api/Blind/TbAreaLine/' + this.dataForm.id, | |
| 129 | + method: 'get' | |
| 130 | + }).then(res =>{ | |
| 131 | + this.dataForm = res.data; | |
| 132 | + if(!this.dataForm.banner)this.dataForm.banner=[]; | |
| 133 | + }) | |
| 134 | + } | |
| 135 | + }) | |
| 136 | + }, | |
| 137 | + dataFormSubmit() { | |
| 138 | + this.$refs['elForm'].validate((valid) => { | |
| 139 | + if (valid) { | |
| 140 | + if (!this.dataForm.id) { | |
| 141 | + request({ | |
| 142 | + url: `/api/Blind/TbAreaLine`, | |
| 143 | + method: 'post', | |
| 144 | + data: this.dataForm, | |
| 145 | + }).then((res) => { | |
| 146 | + this.$message({ | |
| 147 | + message: res.msg, | |
| 148 | + type: 'success', | |
| 149 | + duration: 1000, | |
| 150 | + onClose: () => { | |
| 151 | + this.visible = false, | |
| 152 | + this.$emit('refresh', true) | |
| 153 | + } | |
| 154 | + }) | |
| 155 | + }) | |
| 156 | + } else { | |
| 157 | + request({ | |
| 158 | + url: '/api/Blind/TbAreaLine/' + this.dataForm.id, | |
| 159 | + method: 'PUT', | |
| 160 | + data: this.dataForm | |
| 161 | + }).then((res) => { | |
| 162 | + this.$message({ | |
| 163 | + message: res.msg, | |
| 164 | + type: 'success', | |
| 165 | + duration: 1000, | |
| 166 | + onClose: () => { | |
| 167 | + this.visible = false | |
| 168 | + this.$emit('refresh', true) | |
| 169 | + } | |
| 170 | + }) | |
| 171 | + }) | |
| 172 | + } | |
| 173 | + } | |
| 174 | + }) | |
| 175 | + }, | |
| 176 | + } | |
| 177 | + } | |
| 178 | +</script> | ... | ... |
antis-ncc-admin/src/views/tbAreaLine/index.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <div class="NCC-common-layout"> | |
| 3 | + <div class="NCC-common-layout-center"> | |
| 4 | + <el-row class="NCC-common-search-box" :gutter="16"> | |
| 5 | + <el-form @submit.native.prevent> | |
| 6 | + <el-col :span="6"> | |
| 7 | + <el-form-item label="地域"> | |
| 8 | + <el-select v-model="query.areaId" placeholder="地域" clearable > | |
| 9 | + <el-option v-for="(item, index) in areaIdOptions" :key="index" :label="item.F_Name" :value="item.F_Id" /> | |
| 10 | + </el-select> | |
| 11 | + </el-form-item> | |
| 12 | + </el-col> | |
| 13 | + <el-col :span="6"> | |
| 14 | + <el-form-item label="线路标题"> | |
| 15 | + <el-input v-model="query.title" placeholder="线路标题" clearable /> | |
| 16 | + </el-form-item> | |
| 17 | + </el-col> | |
| 18 | + <el-col :span="6"> | |
| 19 | + <el-form-item label="线路概况"> | |
| 20 | + <el-input v-model="query.remark" placeholder="线路概况" /> | |
| 21 | + </el-form-item> | |
| 22 | + </el-col> | |
| 23 | + <el-col :span="6"> | |
| 24 | + <el-form-item> | |
| 25 | + <el-button type="primary" icon="el-icon-search" @click="search()">查询</el-button> | |
| 26 | + <el-button icon="el-icon-refresh-right" @click="reset()">重置</el-button> | |
| 27 | + </el-form-item> | |
| 28 | + </el-col> | |
| 29 | + </el-form> | |
| 30 | + </el-row> | |
| 31 | + <div class="NCC-common-layout-main NCC-flex-main"> | |
| 32 | + <div class="NCC-common-head"> | |
| 33 | + <div> | |
| 34 | + <el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()">新增</el-button> | |
| 35 | + <el-button type="text" icon="el-icon-download" @click="exportData()">导出</el-button> | |
| 36 | + <el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()">批量删除</el-button> | |
| 37 | + </div> | |
| 38 | + <div class="NCC-common-head-right"> | |
| 39 | + <el-tooltip effect="dark" content="刷新" placement="top"> | |
| 40 | + <el-link icon="icon-ym icon-ym-Refresh NCC-common-head-icon" :underline="false" @click="reset()" /> | |
| 41 | + </el-tooltip> | |
| 42 | + <screenfull isContainer /> | |
| 43 | + </div> | |
| 44 | + </div> | |
| 45 | + <NCC-table v-loading="listLoading" :data="list" has-c @selection-change="handleSelectionChange"> | |
| 46 | + <el-table-column label="地域" prop="Name" align="left"> | |
| 47 | + <template slot-scope="scope">{{ scope.row.area&&scope.row.area.Name}}</template> | |
| 48 | + </el-table-column> | |
| 49 | + <el-table-column prop="title" label="线路标题" align="left" /> | |
| 50 | + <el-table-column prop="remark" label="线路概况" align="left" /> | |
| 51 | + <el-table-column prop="creatorTime" label="创建时间" align="left" :formatter="ncc.tableDateFormat"/> | |
| 52 | + <el-table-column prop="lastModifyTime" label="修改时间" align="left" :formatter="ncc.tableDateFormat"/> | |
| 53 | + <el-table-column label="操作" fixed="right" width="100"> | |
| 54 | + <template slot-scope="scope"> | |
| 55 | + <el-button type="text" @click="addOrUpdateHandle(scope.row.id)" >编辑</el-button> | |
| 56 | + <el-button type="text" @click="handleDel(scope.row.id)" class="NCC-table-delBtn" >删除</el-button> | |
| 57 | + </template> | |
| 58 | + </el-table-column> | |
| 59 | + </NCC-table> | |
| 60 | + <pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initData" /> | |
| 61 | + </div> | |
| 62 | + </div> | |
| 63 | + <NCC-Form v-if="formVisible" ref="NCCForm" @refresh="refresh" /> | |
| 64 | + <ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" /> | |
| 65 | + </div> | |
| 66 | +</template> | |
| 67 | +<script> | |
| 68 | + import request from '@/utils/request' | |
| 69 | + import { getDictionaryDataSelector } from '@/api/systemData/dictionary' | |
| 70 | + import NCCForm from './Form' | |
| 71 | + import ExportBox from './ExportBox' | |
| 72 | + import { previewDataInterface } from '@/api/systemData/dataInterface' | |
| 73 | + export default { | |
| 74 | + components: { NCCForm, ExportBox }, | |
| 75 | + data() { | |
| 76 | + return { | |
| 77 | + showAll: false, | |
| 78 | + query: { | |
| 79 | + areaId:undefined, | |
| 80 | + title:undefined, | |
| 81 | + remark:undefined, | |
| 82 | + }, | |
| 83 | + list: [], | |
| 84 | + listLoading: true, | |
| 85 | + multipleSelection: [], total: 0, | |
| 86 | + listQuery: { | |
| 87 | + currentPage: 1, | |
| 88 | + pageSize: 20, | |
| 89 | + sort: "desc", | |
| 90 | + sidx: "", | |
| 91 | + }, | |
| 92 | + formVisible: false, | |
| 93 | + exportBoxVisible: false, | |
| 94 | + columnList: [ | |
| 95 | + { prop: 'areaId', label: '地域' }, | |
| 96 | + { prop: 'title', label: '线路标题' }, | |
| 97 | + { prop: 'remark', label: '线路概况' }, | |
| 98 | + { prop: 'creatorTime', label: '创建时间' }, | |
| 99 | + { prop: 'lastModifyTime', label: '修改时间' }, | |
| 100 | + ], | |
| 101 | + areaIdOptions : [], | |
| 102 | + } | |
| 103 | + }, | |
| 104 | + computed: {}, | |
| 105 | + created() { | |
| 106 | + this.initData() | |
| 107 | + this.getareaIdOptions(); | |
| 108 | + }, | |
| 109 | + methods: { | |
| 110 | + getareaIdOptions(){ | |
| 111 | + previewDataInterface('393301869759300869').then(res => { | |
| 112 | + this.areaIdOptions = res.data | |
| 113 | + }); | |
| 114 | + }, | |
| 115 | + initData() { | |
| 116 | + this.listLoading = true; | |
| 117 | + let _query = { | |
| 118 | + ...this.listQuery, | |
| 119 | + ...this.query | |
| 120 | + }; | |
| 121 | + let query = {} | |
| 122 | + for (let key in _query) { | |
| 123 | + if (Array.isArray(_query[key])) { | |
| 124 | + query[key] = _query[key].join() | |
| 125 | + } else { | |
| 126 | + query[key] = _query[key] | |
| 127 | + } | |
| 128 | + } | |
| 129 | + request({ | |
| 130 | + url: `/api/Blind/TbAreaLine`, | |
| 131 | + method: 'GET', | |
| 132 | + data: query | |
| 133 | + }).then(res => { | |
| 134 | + this.list = res.data.list | |
| 135 | + this.total = res.data.pagination.total | |
| 136 | + this.listLoading = false | |
| 137 | + }) | |
| 138 | + }, | |
| 139 | + handleDel(id) { | |
| 140 | + this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', { | |
| 141 | + type: 'warning' | |
| 142 | + }).then(() => { | |
| 143 | + request({ | |
| 144 | + url: `/api/Blind/TbAreaLine/${id}`, | |
| 145 | + method: 'DELETE' | |
| 146 | + }).then(res => { | |
| 147 | + this.$message({ | |
| 148 | + type: 'success', | |
| 149 | + message: res.msg, | |
| 150 | + onClose: () => { | |
| 151 | + this.initData() | |
| 152 | + } | |
| 153 | + }); | |
| 154 | + }) | |
| 155 | + }).catch(() => { | |
| 156 | + }); | |
| 157 | + }, | |
| 158 | + handleSelectionChange(val) { | |
| 159 | + const res = val.map(item => item.id) | |
| 160 | + this.multipleSelection = res | |
| 161 | + }, | |
| 162 | + handleBatchRemoveDel() { | |
| 163 | + if (!this.multipleSelection.length) { | |
| 164 | + this.$message({ | |
| 165 | + type: 'error', | |
| 166 | + message: '请选择一条数据', | |
| 167 | + duration: 1500, | |
| 168 | + }) | |
| 169 | + return | |
| 170 | + } | |
| 171 | + const ids = this.multipleSelection | |
| 172 | + this.$confirm('您确定要删除这些数据吗, 是否继续?', '提示', { | |
| 173 | + type: 'warning' | |
| 174 | + }).then(() => { | |
| 175 | + request({ | |
| 176 | + url: `/api/Blind/TbAreaLine/batchRemove`, | |
| 177 | + method: 'POST', | |
| 178 | + data: ids , | |
| 179 | + }).then(res => { | |
| 180 | + this.$message({ | |
| 181 | + type: 'success', | |
| 182 | + message: res.msg, | |
| 183 | + onClose: () => { | |
| 184 | + this.initData() | |
| 185 | + } | |
| 186 | + }); | |
| 187 | + }) | |
| 188 | + }).catch(() => { }) | |
| 189 | + }, | |
| 190 | + addOrUpdateHandle(id, isDetail) { | |
| 191 | + this.formVisible = true | |
| 192 | + this.$nextTick(() => { | |
| 193 | + this.$refs.NCCForm.init(id, isDetail) | |
| 194 | + }) | |
| 195 | + }, | |
| 196 | + exportData() { | |
| 197 | + this.exportBoxVisible = true | |
| 198 | + this.$nextTick(() => { | |
| 199 | + this.$refs.ExportBox.init(this.columnList) | |
| 200 | + }) | |
| 201 | + }, | |
| 202 | + download(data) { | |
| 203 | + let query = { ...data, ...this.listQuery, ...this.query } | |
| 204 | + request({ | |
| 205 | + url: `/api/Blind/TbAreaLine/Actions/Export`, | |
| 206 | + method: 'GET', | |
| 207 | + data: query | |
| 208 | + }).then(res => { | |
| 209 | + if (!res.data.url) return | |
| 210 | + window.location.href = this.define.comUrl + res.data.url | |
| 211 | + this.$refs.ExportBox.visible = false | |
| 212 | + this.exportBoxVisible = false | |
| 213 | + }) | |
| 214 | + }, | |
| 215 | + search() { | |
| 216 | + this.listQuery = { | |
| 217 | + currentPage: 1, | |
| 218 | + pageSize: 20, | |
| 219 | + sort: "desc", | |
| 220 | + sidx: "", | |
| 221 | + } | |
| 222 | + this.initData() | |
| 223 | + }, | |
| 224 | + refresh(isrRefresh) { | |
| 225 | + this.formVisible = false | |
| 226 | + if (isrRefresh) this.reset() | |
| 227 | + }, | |
| 228 | + reset() { | |
| 229 | + for (let key in this.query) { | |
| 230 | + this.query[key] = undefined | |
| 231 | + } | |
| 232 | + this.listQuery = { | |
| 233 | + currentPage: 1, | |
| 234 | + pageSize: 20, | |
| 235 | + sort: "desc", | |
| 236 | + sidx: "", | |
| 237 | + } | |
| 238 | + this.initData() | |
| 239 | + } | |
| 240 | + } | |
| 241 | + } | |
| 242 | +</script> | |
| 0 | 243 | \ No newline at end of file | ... | ... |
antis-ncc-admin/src/views/tbAreaLineNode/ExportBox.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <el-dialog title="导出数据" :close-on-click-modal="false" :visible.sync="visible" | |
| 3 | + class="NCC-dialog NCC-dialog_center" lock-scroll width="600px"> | |
| 4 | + <el-form label-position="top" label-width="80px"> | |
| 5 | + <el-form-item label="数据选择"> | |
| 6 | + <el-radio-group v-model="type"> | |
| 7 | + <el-radio :label="0">当前页面数据</el-radio> | |
| 8 | + <el-radio :label="1">全部页面数据</el-radio> | |
| 9 | + </el-radio-group> | |
| 10 | + </el-form-item> | |
| 11 | + <el-form-item label="导出字段"> | |
| 12 | + <el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" | |
| 13 | + @change="handleCheckAllChange">全选</el-checkbox> | |
| 14 | + <el-checkbox-group v-model="columns" @change="handleCheckedChange"> | |
| 15 | + <el-checkbox v-for="item in columnList" :label="item.prop" :key="item.prop"> | |
| 16 | + {{item.label}} | |
| 17 | + </el-checkbox> | |
| 18 | + </el-checkbox-group> | |
| 19 | + </el-form-item> | |
| 20 | + </el-form> | |
| 21 | + <span slot="footer" class="dialog-footer"> | |
| 22 | + <el-button @click="visible=false">取 消</el-button> | |
| 23 | + <el-button type="primary" @click="downLoad">导 出</el-button> | |
| 24 | + </span> | |
| 25 | + </el-dialog> | |
| 26 | +</template> | |
| 27 | + | |
| 28 | +<script> | |
| 29 | +export default { | |
| 30 | + data() { | |
| 31 | + return { | |
| 32 | + visible: false, | |
| 33 | + btnLoading: false, | |
| 34 | + type: 0, | |
| 35 | + columns: [], | |
| 36 | + checkAll: true, | |
| 37 | + isIndeterminate: false, | |
| 38 | + columnList: [] | |
| 39 | + } | |
| 40 | + }, | |
| 41 | + methods: { | |
| 42 | + init(columnList) { | |
| 43 | + this.visible = true | |
| 44 | + this.columnList = columnList | |
| 45 | + this.columns = columnList.map(o => o.prop) | |
| 46 | + }, | |
| 47 | + handleCheckAllChange(val) { | |
| 48 | + this.columns = val ? this.columnList.map(o => o.prop) : []; | |
| 49 | + this.isIndeterminate = false; | |
| 50 | + }, | |
| 51 | + handleCheckedChange(value) { | |
| 52 | + let checkedCount = value.length; | |
| 53 | + this.checkAll = checkedCount === this.columnList.length; | |
| 54 | + this.isIndeterminate = checkedCount > 0 && checkedCount < this.columnList.length; | |
| 55 | + }, | |
| 56 | + downLoad() { | |
| 57 | + this.$emit('download', { dataType: this.type, selectKey: this.columns.join(',') }) | |
| 58 | + } | |
| 59 | + } | |
| 60 | +} | |
| 61 | +</script> | |
| 62 | +<style lang="scss" scoped> | |
| 63 | +>>> .el-dialog__body { | |
| 64 | + padding: 20px !important; | |
| 65 | +} | |
| 66 | +</style> | |
| 0 | 67 | \ No newline at end of file | ... | ... |
antis-ncc-admin/src/views/tbAreaLineNode/Form.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <el-dialog :title="!dataForm.id ? '新建' : isDetail ? '详情':'编辑'" :close-on-click-modal="false" | |
| 3 | + :visible.sync="visible" class="NCC-dialog NCC-dialog_center" lock-scroll width="600px"> | |
| 4 | + <el-row :gutter="15" class=""> | |
| 5 | + <el-form ref="elForm" :model="dataForm" size="small" label-width="100px" label-position="right" | |
| 6 | + :disabled="!!isDetail" :rules="rules"> | |
| 7 | + <el-col :span="24"> | |
| 8 | + <el-form-item label="地域线路" prop="areaLineId"> | |
| 9 | + <el-select v-model="dataForm.areaLineId" placeholder="请选择" clearable required | |
| 10 | + :style='{"width":"100%"}'> | |
| 11 | + <el-option v-for="(item, index) in areaLineIdOptions" :key="index" :label="item.F_Title" | |
| 12 | + :value="item.F_Id"></el-option> | |
| 13 | + </el-select> | |
| 14 | + </el-form-item> | |
| 15 | + </el-col> | |
| 16 | + <el-col :span="24"> | |
| 17 | + <el-form-item label="节点标题" prop="title"> | |
| 18 | + <el-input v-model="dataForm.title" placeholder="请输入" clearable required | |
| 19 | + :style='{"width":"100%"}'> | |
| 20 | + </el-input> | |
| 21 | + </el-form-item> | |
| 22 | + </el-col> | |
| 23 | + <el-col :span="24"> | |
| 24 | + <el-form-item label="节点简介" prop="description"> | |
| 25 | + <!-- <el-input v-model="dataForm.description" placeholder="请输入" required show-word-limit | |
| 26 | + :style='{"width":"100%"}' type='textarea' :autosize='{"minRows":4,"maxRows":4}'> | |
| 27 | + </el-input> --> | |
| 28 | + <NCC-Quill v-model="dataForm.description" placeholder="请输入内容..." required> | |
| 29 | + </NCC-Quill> | |
| 30 | + </el-form-item> | |
| 31 | + </el-col> | |
| 32 | + <el-col :span="24"> | |
| 33 | + <el-form-item label="节点注意事项" prop="remark"> | |
| 34 | + <el-input v-model="dataForm.remark" placeholder="请输入" required show-word-limit | |
| 35 | + :style='{"width":"100%"}' type='textarea' :autosize='{"minRows":4,"maxRows":4}'> | |
| 36 | + </el-input> | |
| 37 | + | |
| 38 | + </el-form-item> | |
| 39 | + </el-col> | |
| 40 | + <el-col :span="24"> | |
| 41 | + <el-form-item label="节点图片" prop="banner"> | |
| 42 | + <NCC-UploadImg v-model="dataForm.banner" required :fileSize="5" sizeUnit="MB" :limit="9"> | |
| 43 | + </NCC-UploadImg> | |
| 44 | + </el-form-item> | |
| 45 | + </el-col> | |
| 46 | + <el-col :span="24" v-if="false"> | |
| 47 | + <el-form-item label="创建时间" prop="creatorTime"> | |
| 48 | + <el-input v-model="dataForm.creatorTime" placeholder="系统自动生成" readonly> | |
| 49 | + </el-input> | |
| 50 | + </el-form-item> | |
| 51 | + </el-col> | |
| 52 | + <el-col :span="24" v-if="false"> | |
| 53 | + <el-form-item label="修改时间" prop="lastModifyTime"> | |
| 54 | + <el-input v-model="dataForm.lastModifyTime" placeholder="系统自动生成" readonly> | |
| 55 | + </el-input> | |
| 56 | + </el-form-item> | |
| 57 | + </el-col> | |
| 58 | + </el-form> | |
| 59 | + </el-row> | |
| 60 | + <span slot="footer" class="dialog-footer"> | |
| 61 | + <el-button @click="visible = false">取 消</el-button> | |
| 62 | + <el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail">确 定</el-button> | |
| 63 | + </span> | |
| 64 | + </el-dialog> | |
| 65 | +</template> | |
| 66 | +<script> | |
| 67 | + import request from '@/utils/request' | |
| 68 | + import { | |
| 69 | + getDictionaryDataSelector | |
| 70 | + } from '@/api/systemData/dictionary' | |
| 71 | + import { | |
| 72 | + previewDataInterface | |
| 73 | + } from '@/api/systemData/dataInterface' | |
| 74 | + export default { | |
| 75 | + components: {}, | |
| 76 | + props: [], | |
| 77 | + data() { | |
| 78 | + return { | |
| 79 | + loading: false, | |
| 80 | + visible: false, | |
| 81 | + isDetail: false, | |
| 82 | + dataForm: { | |
| 83 | + id: '', | |
| 84 | + areaLineId: undefined, | |
| 85 | + title: undefined, | |
| 86 | + description: undefined, | |
| 87 | + remark: undefined, | |
| 88 | + banner: [], | |
| 89 | + sorts: 1, | |
| 90 | + creatorTime: undefined, | |
| 91 | + lastModifyTime: undefined, | |
| 92 | + }, | |
| 93 | + rules: { | |
| 94 | + areaLineId: [{ | |
| 95 | + required: true, | |
| 96 | + message: '请输入地域线路', | |
| 97 | + trigger: 'change' | |
| 98 | + }, ], | |
| 99 | + title: [{ | |
| 100 | + required: true, | |
| 101 | + message: '请输入节点标题', | |
| 102 | + trigger: 'blur' | |
| 103 | + }, ], | |
| 104 | + description: [{ | |
| 105 | + required: true, | |
| 106 | + message: '请输入节点简介', | |
| 107 | + trigger: 'blur' | |
| 108 | + }, ], | |
| 109 | + remark: [{ | |
| 110 | + required: true, | |
| 111 | + message: '请输入节点注意事项', | |
| 112 | + trigger: 'blur' | |
| 113 | + }, ], | |
| 114 | + banner: [{ | |
| 115 | + required: true, | |
| 116 | + message: '请输入节点图片', | |
| 117 | + trigger: 'click' | |
| 118 | + }, ], | |
| 119 | + sorts: [{ | |
| 120 | + required: true, | |
| 121 | + message: '请输入排序', | |
| 122 | + trigger: ["blur", "change"] | |
| 123 | + }, ], | |
| 124 | + }, | |
| 125 | + areaLineIdOptions: [], | |
| 126 | + } | |
| 127 | + }, | |
| 128 | + computed: {}, | |
| 129 | + watch: {}, | |
| 130 | + created() { | |
| 131 | + this.getareaLineIdOptions(); | |
| 132 | + }, | |
| 133 | + mounted() {}, | |
| 134 | + methods: { | |
| 135 | + getareaLineIdOptions() { | |
| 136 | + previewDataInterface('393304215318955269').then(res => { | |
| 137 | + this.areaLineIdOptions = res.data | |
| 138 | + }); | |
| 139 | + }, | |
| 140 | + goBack() { | |
| 141 | + this.$emit('refresh') | |
| 142 | + }, | |
| 143 | + init(id, isDetail) { | |
| 144 | + this.dataForm.id = id || 0; | |
| 145 | + this.visible = true; | |
| 146 | + this.isDetail = isDetail || false; | |
| 147 | + this.$nextTick(() => { | |
| 148 | + this.$refs['elForm'].resetFields(); | |
| 149 | + if (this.dataForm.id) { | |
| 150 | + request({ | |
| 151 | + url: '/api/Blind/TbAreaLineNode/' + this.dataForm.id, | |
| 152 | + method: 'get' | |
| 153 | + }).then(res => { | |
| 154 | + this.dataForm = res.data; | |
| 155 | + if (!this.dataForm.banner) this.dataForm.banner = []; | |
| 156 | + }) | |
| 157 | + } | |
| 158 | + }) | |
| 159 | + }, | |
| 160 | + dataFormSubmit() { | |
| 161 | + this.$refs['elForm'].validate((valid) => { | |
| 162 | + if (valid) { | |
| 163 | + if (!this.dataForm.id) { | |
| 164 | + request({ | |
| 165 | + url: `/api/Blind/TbAreaLineNode`, | |
| 166 | + method: 'post', | |
| 167 | + data: this.dataForm, | |
| 168 | + }).then((res) => { | |
| 169 | + this.$message({ | |
| 170 | + message: res.msg, | |
| 171 | + type: 'success', | |
| 172 | + duration: 1000, | |
| 173 | + onClose: () => { | |
| 174 | + this.visible = false, | |
| 175 | + this.$emit('refresh', true) | |
| 176 | + } | |
| 177 | + }) | |
| 178 | + }) | |
| 179 | + } else { | |
| 180 | + request({ | |
| 181 | + url: '/api/Blind/TbAreaLineNode/' + this.dataForm.id, | |
| 182 | + method: 'PUT', | |
| 183 | + data: this.dataForm | |
| 184 | + }).then((res) => { | |
| 185 | + this.$message({ | |
| 186 | + message: res.msg, | |
| 187 | + type: 'success', | |
| 188 | + duration: 1000, | |
| 189 | + onClose: () => { | |
| 190 | + this.visible = false | |
| 191 | + this.$emit('refresh', true) | |
| 192 | + } | |
| 193 | + }) | |
| 194 | + }) | |
| 195 | + } | |
| 196 | + } | |
| 197 | + }) | |
| 198 | + }, | |
| 199 | + } | |
| 200 | + } | |
| 201 | +</script> | ... | ... |
antis-ncc-admin/src/views/tbAreaLineNode/index.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <div class="NCC-common-layout"> | |
| 3 | + <div class="NCC-common-layout-center"> | |
| 4 | + <el-row class="NCC-common-search-box" :gutter="16"> | |
| 5 | + <el-form @submit.native.prevent> | |
| 6 | + <el-col :span="6"> | |
| 7 | + <el-form-item label="地域线路"> | |
| 8 | + <el-select v-model="query.areaLineId" placeholder="地域线路" clearable> | |
| 9 | + <el-option v-for="(item, index) in areaLineIdOptions" :key="index" :label="item.F_Title" | |
| 10 | + :value="item.F_Id" /> | |
| 11 | + </el-select> | |
| 12 | + </el-form-item> | |
| 13 | + </el-col> | |
| 14 | + <el-col :span="6"> | |
| 15 | + <el-form-item label="节点标题"> | |
| 16 | + <el-input v-model="query.title" placeholder="节点标题" clearable /> | |
| 17 | + </el-form-item> | |
| 18 | + </el-col> | |
| 19 | + <el-col :span="6"> | |
| 20 | + <el-form-item label="节点简介"> | |
| 21 | + <el-input v-model="query.description" placeholder="节点简介" /> | |
| 22 | + </el-form-item> | |
| 23 | + </el-col> | |
| 24 | + <template v-if="showAll"> | |
| 25 | + <el-col :span="6"> | |
| 26 | + <el-form-item label="节点注意事项"> | |
| 27 | + <el-input v-model="query.remark" placeholder="节点注意事项" /> | |
| 28 | + </el-form-item> | |
| 29 | + </el-col> | |
| 30 | + </template> | |
| 31 | + <el-col :span="6"> | |
| 32 | + <el-form-item> | |
| 33 | + <el-button type="primary" icon="el-icon-search" @click="search()">查询</el-button> | |
| 34 | + <el-button icon="el-icon-refresh-right" @click="reset()">重置</el-button> | |
| 35 | + <el-button type="text" icon="el-icon-arrow-down" @click="showAll=true" v-if="!showAll">展开 | |
| 36 | + </el-button> | |
| 37 | + <el-button type="text" icon="el-icon-arrow-up" @click="showAll=false" v-else>收起</el-button> | |
| 38 | + </el-form-item> | |
| 39 | + </el-col> | |
| 40 | + </el-form> | |
| 41 | + </el-row> | |
| 42 | + <div class="NCC-common-layout-main NCC-flex-main"> | |
| 43 | + <div class="NCC-common-head"> | |
| 44 | + <div> | |
| 45 | + <el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()">新增</el-button> | |
| 46 | + <el-button type="text" icon="el-icon-download" @click="exportData()">导出</el-button> | |
| 47 | + <el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()">批量删除</el-button> | |
| 48 | + </div> | |
| 49 | + <div class="NCC-common-head-right"> | |
| 50 | + <el-tooltip effect="dark" content="刷新" placement="top"> | |
| 51 | + <el-link icon="icon-ym icon-ym-Refresh NCC-common-head-icon" :underline="false" | |
| 52 | + @click="reset()" /> | |
| 53 | + </el-tooltip> | |
| 54 | + <screenfull isContainer /> | |
| 55 | + </div> | |
| 56 | + </div> | |
| 57 | + <NCC-table v-loading="listLoading" :data="list" has-c @selection-change="handleSelectionChange"> | |
| 58 | + <el-table-column label="地域线路" prop="Title" align="left"> | |
| 59 | + <template slot-scope="scope">{{ scope.row.areaLine&&scope.row.areaLine.Title }}</template> | |
| 60 | + </el-table-column> | |
| 61 | + <el-table-column prop="title" label="节点标题" align="left" /> | |
| 62 | + <!-- <el-table-column prop="description" label="节点简介" align="left" /> --> | |
| 63 | + <el-table-column prop="remark" label="节点注意事项" align="left" /> | |
| 64 | + <el-table-column prop="sorts" label="排序" align="left" /> | |
| 65 | + <el-table-column prop="creatorTime" label="创建时间" align="left" :formatter="ncc.tableDateFormat" /> | |
| 66 | + <el-table-column prop="lastModifyTime" label="修改时间" align="left" :formatter="ncc.tableDateFormat" /> | |
| 67 | + <el-table-column label="操作" fixed="right" width="100"> | |
| 68 | + <template slot-scope="scope"> | |
| 69 | + <el-button type="text" @click="addOrUpdateHandle(scope.row.id)">编辑</el-button> | |
| 70 | + <el-button type="text" @click="handleDel(scope.row.id)" class="NCC-table-delBtn">删除 | |
| 71 | + </el-button> | |
| 72 | + </template> | |
| 73 | + </el-table-column> | |
| 74 | + </NCC-table> | |
| 75 | + <pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" | |
| 76 | + @pagination="initData" /> | |
| 77 | + </div> | |
| 78 | + </div> | |
| 79 | + <NCC-Form v-if="formVisible" ref="NCCForm" @refresh="refresh" /> | |
| 80 | + <ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" /> | |
| 81 | + </div> | |
| 82 | +</template> | |
| 83 | +<script> | |
| 84 | + import request from '@/utils/request' | |
| 85 | + import { | |
| 86 | + getDictionaryDataSelector | |
| 87 | + } from '@/api/systemData/dictionary' | |
| 88 | + import NCCForm from './Form' | |
| 89 | + import ExportBox from './ExportBox' | |
| 90 | + import { | |
| 91 | + previewDataInterface | |
| 92 | + } from '@/api/systemData/dataInterface' | |
| 93 | + export default { | |
| 94 | + components: { | |
| 95 | + NCCForm, | |
| 96 | + ExportBox | |
| 97 | + }, | |
| 98 | + data() { | |
| 99 | + return { | |
| 100 | + showAll: false, | |
| 101 | + query: { | |
| 102 | + areaLineId: undefined, | |
| 103 | + title: undefined, | |
| 104 | + description: undefined, | |
| 105 | + remark: undefined, | |
| 106 | + }, | |
| 107 | + list: [], | |
| 108 | + listLoading: true, | |
| 109 | + multipleSelection: [], | |
| 110 | + total: 0, | |
| 111 | + listQuery: { | |
| 112 | + currentPage: 1, | |
| 113 | + pageSize: 20, | |
| 114 | + sort: "desc", | |
| 115 | + sidx: "", | |
| 116 | + }, | |
| 117 | + formVisible: false, | |
| 118 | + exportBoxVisible: false, | |
| 119 | + columnList: [{ | |
| 120 | + prop: 'areaLineId', | |
| 121 | + label: '地域线路' | |
| 122 | + }, | |
| 123 | + { | |
| 124 | + prop: 'tItle', | |
| 125 | + label: '节点标题' | |
| 126 | + }, | |
| 127 | + { | |
| 128 | + prop: 'description', | |
| 129 | + label: '节点简介' | |
| 130 | + }, | |
| 131 | + { | |
| 132 | + prop: 'remark', | |
| 133 | + label: '节点注意事项' | |
| 134 | + }, | |
| 135 | + { | |
| 136 | + prop: 'creatorTime', | |
| 137 | + label: '创建时间' | |
| 138 | + }, | |
| 139 | + { | |
| 140 | + prop: 'lastModifyTime', | |
| 141 | + label: '修改时间' | |
| 142 | + }, | |
| 143 | + { | |
| 144 | + prop: 'sorts', | |
| 145 | + label: '排序' | |
| 146 | + }, | |
| 147 | + ], | |
| 148 | + areaLineIdOptions: [], | |
| 149 | + } | |
| 150 | + }, | |
| 151 | + computed: {}, | |
| 152 | + created() { | |
| 153 | + this.initData() | |
| 154 | + this.getareaLineIdOptions(); | |
| 155 | + }, | |
| 156 | + methods: { | |
| 157 | + getareaLineIdOptions() { | |
| 158 | + previewDataInterface('393304215318955269').then(res => { | |
| 159 | + this.areaLineIdOptions = res.data | |
| 160 | + }); | |
| 161 | + }, | |
| 162 | + initData() { | |
| 163 | + this.listLoading = true; | |
| 164 | + let _query = { | |
| 165 | + ...this.listQuery, | |
| 166 | + ...this.query | |
| 167 | + }; | |
| 168 | + let query = {} | |
| 169 | + for (let key in _query) { | |
| 170 | + if (Array.isArray(_query[key])) { | |
| 171 | + query[key] = _query[key].join() | |
| 172 | + } else { | |
| 173 | + query[key] = _query[key] | |
| 174 | + } | |
| 175 | + } | |
| 176 | + request({ | |
| 177 | + url: `/api/Blind/TbAreaLineNode`, | |
| 178 | + method: 'GET', | |
| 179 | + data: query | |
| 180 | + }).then(res => { | |
| 181 | + this.list = res.data.list | |
| 182 | + this.total = res.data.pagination.total | |
| 183 | + this.listLoading = false | |
| 184 | + }) | |
| 185 | + }, | |
| 186 | + handleDel(id) { | |
| 187 | + this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', { | |
| 188 | + type: 'warning' | |
| 189 | + }).then(() => { | |
| 190 | + request({ | |
| 191 | + url: `/api/Blind/TbAreaLineNode/${id}`, | |
| 192 | + method: 'DELETE' | |
| 193 | + }).then(res => { | |
| 194 | + this.$message({ | |
| 195 | + type: 'success', | |
| 196 | + message: res.msg, | |
| 197 | + onClose: () => { | |
| 198 | + this.initData() | |
| 199 | + } | |
| 200 | + }); | |
| 201 | + }) | |
| 202 | + }).catch(() => {}); | |
| 203 | + }, | |
| 204 | + handleSelectionChange(val) { | |
| 205 | + const res = val.map(item => item.id) | |
| 206 | + this.multipleSelection = res | |
| 207 | + }, | |
| 208 | + handleBatchRemoveDel() { | |
| 209 | + if (!this.multipleSelection.length) { | |
| 210 | + this.$message({ | |
| 211 | + type: 'error', | |
| 212 | + message: '请选择一条数据', | |
| 213 | + duration: 1500, | |
| 214 | + }) | |
| 215 | + return | |
| 216 | + } | |
| 217 | + const ids = this.multipleSelection | |
| 218 | + this.$confirm('您确定要删除这些数据吗, 是否继续?', '提示', { | |
| 219 | + type: 'warning' | |
| 220 | + }).then(() => { | |
| 221 | + request({ | |
| 222 | + url: `/api/Blind/TbAreaLineNode/batchRemove`, | |
| 223 | + method: 'POST', | |
| 224 | + data: ids, | |
| 225 | + }).then(res => { | |
| 226 | + this.$message({ | |
| 227 | + type: 'success', | |
| 228 | + message: res.msg, | |
| 229 | + onClose: () => { | |
| 230 | + this.initData() | |
| 231 | + } | |
| 232 | + }); | |
| 233 | + }) | |
| 234 | + }).catch(() => {}) | |
| 235 | + }, | |
| 236 | + addOrUpdateHandle(id, isDetail) { | |
| 237 | + this.formVisible = true | |
| 238 | + this.$nextTick(() => { | |
| 239 | + this.$refs.NCCForm.init(id, isDetail) | |
| 240 | + }) | |
| 241 | + }, | |
| 242 | + exportData() { | |
| 243 | + this.exportBoxVisible = true | |
| 244 | + this.$nextTick(() => { | |
| 245 | + this.$refs.ExportBox.init(this.columnList) | |
| 246 | + }) | |
| 247 | + }, | |
| 248 | + download(data) { | |
| 249 | + let query = { | |
| 250 | + ...data, | |
| 251 | + ...this.listQuery, | |
| 252 | + ...this.query | |
| 253 | + } | |
| 254 | + request({ | |
| 255 | + url: `/api/Blind/TbAreaLineNode/Actions/Export`, | |
| 256 | + method: 'GET', | |
| 257 | + data: query | |
| 258 | + }).then(res => { | |
| 259 | + if (!res.data.url) return | |
| 260 | + window.location.href = this.define.comUrl + res.data.url | |
| 261 | + this.$refs.ExportBox.visible = false | |
| 262 | + this.exportBoxVisible = false | |
| 263 | + }) | |
| 264 | + }, | |
| 265 | + search() { | |
| 266 | + this.listQuery = { | |
| 267 | + currentPage: 1, | |
| 268 | + pageSize: 20, | |
| 269 | + sort: "desc", | |
| 270 | + sidx: "", | |
| 271 | + } | |
| 272 | + this.initData() | |
| 273 | + }, | |
| 274 | + refresh(isrRefresh) { | |
| 275 | + this.formVisible = false | |
| 276 | + if (isrRefresh) this.reset() | |
| 277 | + }, | |
| 278 | + reset() { | |
| 279 | + for (let key in this.query) { | |
| 280 | + this.query[key] = undefined | |
| 281 | + } | |
| 282 | + this.listQuery = { | |
| 283 | + currentPage: 1, | |
| 284 | + pageSize: 20, | |
| 285 | + sort: "desc", | |
| 286 | + sidx: "", | |
| 287 | + } | |
| 288 | + this.initData() | |
| 289 | + } | |
| 290 | + } | |
| 291 | + } | |
| 292 | +</script> | ... | ... |
antis-ncc-admin/src/views/tbBoxLog/ExportBox.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <el-dialog title="导出数据" :close-on-click-modal="false" :visible.sync="visible" | |
| 3 | + class="NCC-dialog NCC-dialog_center" lock-scroll width="600px"> | |
| 4 | + <el-form label-position="top" label-width="80px"> | |
| 5 | + <el-form-item label="数据选择"> | |
| 6 | + <el-radio-group v-model="type"> | |
| 7 | + <el-radio :label="0">当前页面数据</el-radio> | |
| 8 | + <el-radio :label="1">全部页面数据</el-radio> | |
| 9 | + </el-radio-group> | |
| 10 | + </el-form-item> | |
| 11 | + <el-form-item label="导出字段"> | |
| 12 | + <el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" | |
| 13 | + @change="handleCheckAllChange">全选</el-checkbox> | |
| 14 | + <el-checkbox-group v-model="columns" @change="handleCheckedChange"> | |
| 15 | + <el-checkbox v-for="item in columnList" :label="item.prop" :key="item.prop"> | |
| 16 | + {{item.label}} | |
| 17 | + </el-checkbox> | |
| 18 | + </el-checkbox-group> | |
| 19 | + </el-form-item> | |
| 20 | + </el-form> | |
| 21 | + <span slot="footer" class="dialog-footer"> | |
| 22 | + <el-button @click="visible=false">取 消</el-button> | |
| 23 | + <el-button type="primary" @click="downLoad">导 出</el-button> | |
| 24 | + </span> | |
| 25 | + </el-dialog> | |
| 26 | +</template> | |
| 27 | + | |
| 28 | +<script> | |
| 29 | +export default { | |
| 30 | + data() { | |
| 31 | + return { | |
| 32 | + visible: false, | |
| 33 | + btnLoading: false, | |
| 34 | + type: 0, | |
| 35 | + columns: [], | |
| 36 | + checkAll: true, | |
| 37 | + isIndeterminate: false, | |
| 38 | + columnList: [] | |
| 39 | + } | |
| 40 | + }, | |
| 41 | + methods: { | |
| 42 | + init(columnList) { | |
| 43 | + this.visible = true | |
| 44 | + this.columnList = columnList | |
| 45 | + this.columns = columnList.map(o => o.prop) | |
| 46 | + }, | |
| 47 | + handleCheckAllChange(val) { | |
| 48 | + this.columns = val ? this.columnList.map(o => o.prop) : []; | |
| 49 | + this.isIndeterminate = false; | |
| 50 | + }, | |
| 51 | + handleCheckedChange(value) { | |
| 52 | + let checkedCount = value.length; | |
| 53 | + this.checkAll = checkedCount === this.columnList.length; | |
| 54 | + this.isIndeterminate = checkedCount > 0 && checkedCount < this.columnList.length; | |
| 55 | + }, | |
| 56 | + downLoad() { | |
| 57 | + this.$emit('download', { dataType: this.type, selectKey: this.columns.join(',') }) | |
| 58 | + } | |
| 59 | + } | |
| 60 | +} | |
| 61 | +</script> | |
| 62 | +<style lang="scss" scoped> | |
| 63 | +>>> .el-dialog__body { | |
| 64 | + padding: 20px !important; | |
| 65 | +} | |
| 66 | +</style> | |
| 0 | 67 | \ No newline at end of file | ... | ... |
antis-ncc-admin/src/views/tbBoxLog/Form.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <el-dialog :title="!dataForm.id ? '新建' : isDetail ? '详情':'编辑'" :close-on-click-modal="false" | |
| 3 | + :visible.sync="visible" class="NCC-dialog NCC-dialog_center" lock-scroll width="600px"> | |
| 4 | + <el-row :gutter="15" class=""> | |
| 5 | + <el-form ref="elForm" :model="dataForm" size="small" label-width="100px" label-position="right" | |
| 6 | + :disabled="!!isDetail" :rules="rules"> | |
| 7 | + <el-col :span="24"> | |
| 8 | + <el-form-item label="用户" prop="userId"> | |
| 9 | + <user-select v-model="dataForm.userId" placeholder="请选择" clearable required> | |
| 10 | + </user-select> | |
| 11 | + </el-form-item> | |
| 12 | + </el-col> | |
| 13 | + <el-col :span="24"> | |
| 14 | + <el-form-item label="盲盒订单" prop="boxOrderId"> | |
| 15 | + <el-select v-model="dataForm.boxOrderId" placeholder="请选择" clearable required | |
| 16 | + :style='{"width":"100%"}'> | |
| 17 | + <el-option v-for="(item, index) in boxOrderIdOptions" :key="index" | |
| 18 | + :label="item.F_OrderNumber" :value="item.F_Id"></el-option> | |
| 19 | + </el-select> | |
| 20 | + </el-form-item> | |
| 21 | + </el-col> | |
| 22 | + <el-col :span="24"> | |
| 23 | + <el-form-item label="路线" prop="type"> | |
| 24 | + <el-select v-model="dataForm.type" placeholder="请选择" clearable required | |
| 25 | + :style='{"width":"100%"}' @change="TypeChange"> | |
| 26 | + <el-option v-for="(item, index) in typeOptions" :key="index" :label="item.fullName" | |
| 27 | + :value="item.id"></el-option> | |
| 28 | + </el-select> | |
| 29 | + </el-form-item> | |
| 30 | + </el-col> | |
| 31 | + <el-col :span="24" v-if="status=='1'"> | |
| 32 | + | |
| 33 | + <el-form-item label="地域线路" prop="areaLineId"> | |
| 34 | + <el-select v-model="dataForm.areaLineId" placeholder="请选择" clearable required | |
| 35 | + :style='{"width":"100%"}'> | |
| 36 | + <el-option v-for="(item, index) in areaLineIdOptions" :key="index" :label="item.F_Title" | |
| 37 | + :value="item.F_Id"></el-option> | |
| 38 | + </el-select> | |
| 39 | + </el-form-item> | |
| 40 | + | |
| 41 | + </el-col> | |
| 42 | + <el-col :span="24" v-if="status=='1'"> | |
| 43 | + <el-form-item label="地域" prop="areaId"> | |
| 44 | + <el-select v-model="dataForm.areaId" placeholder="请选择" clearable :style='{"width":"100%"}'> | |
| 45 | + <el-option v-for="(item, index) in areaIdOptions" :key="index" :label="item.F_Name" | |
| 46 | + :value="item.F_Id"></el-option> | |
| 47 | + </el-select> | |
| 48 | + </el-form-item> | |
| 49 | + </el-col> | |
| 50 | + <el-col :span="24" v-if="status=='2'"> | |
| 51 | + | |
| 52 | + <el-form-item label="人格线路" prop="mbtLineId"> | |
| 53 | + <el-select v-model="dataForm.mbtLineId" placeholder="请选择" clearable required | |
| 54 | + :style='{"width":"100%"}'> | |
| 55 | + <el-option v-for="(item, index) in mbtLineIdOptions" :key="index" :label="item.F_Name" | |
| 56 | + :value="item.F_Id"></el-option> | |
| 57 | + </el-select> | |
| 58 | + </el-form-item> | |
| 59 | + </el-col> | |
| 60 | + <el-col :span="24" v-if="status=='2'"> | |
| 61 | + <el-form-item label="人格" prop="mbtId"> | |
| 62 | + <el-select v-model="dataForm.mbtId" placeholder="请选择" clearable :style='{"width":"100%"}'> | |
| 63 | + <el-option v-for="(item, index) in mbtIdOptions" :key="index" :label="item.F_Name" | |
| 64 | + :value="item.F_Id"></el-option> | |
| 65 | + </el-select> | |
| 66 | + </el-form-item> | |
| 67 | + </el-col> | |
| 68 | + <el-col :span="24" v-if="false"> | |
| 69 | + <el-form-item label="创建时间" prop="creatorTime"> | |
| 70 | + <el-input v-model="dataForm.creatorTime" placeholder="系统自动生成" readonly> | |
| 71 | + </el-input> | |
| 72 | + </el-form-item> | |
| 73 | + </el-col> | |
| 74 | + <el-col :span="24" v-if="false"> | |
| 75 | + <el-form-item label="修改时间" prop="lastModifyTime"> | |
| 76 | + <el-input v-model="dataForm.lastModifyTime" placeholder="系统自动生成" readonly> | |
| 77 | + </el-input> | |
| 78 | + </el-form-item> | |
| 79 | + </el-col> | |
| 80 | + </el-form> | |
| 81 | + </el-row> | |
| 82 | + <span slot="footer" class="dialog-footer"> | |
| 83 | + <el-button @click="visible = false">取 消</el-button> | |
| 84 | + <el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail">确 定</el-button> | |
| 85 | + </span> | |
| 86 | + </el-dialog> | |
| 87 | +</template> | |
| 88 | +<script> | |
| 89 | + import request from '@/utils/request' | |
| 90 | + import { | |
| 91 | + getDictionaryDataSelector | |
| 92 | + } from '@/api/systemData/dictionary' | |
| 93 | + import { | |
| 94 | + previewDataInterface | |
| 95 | + } from '@/api/systemData/dataInterface' | |
| 96 | + export default { | |
| 97 | + components: {}, | |
| 98 | + props: [], | |
| 99 | + data() { | |
| 100 | + return { | |
| 101 | + loading: false, | |
| 102 | + visible: false, | |
| 103 | + isDetail: false, | |
| 104 | + dataForm: { | |
| 105 | + id: '', | |
| 106 | + userId: undefined, | |
| 107 | + boxOrderId: undefined, | |
| 108 | + areaId: undefined, | |
| 109 | + | |
| 110 | + type: '1', | |
| 111 | + areaLineId: undefined, | |
| 112 | + mbtId: undefined, | |
| 113 | + | |
| 114 | + mbtLineId: undefined, | |
| 115 | + creatorTime: undefined, | |
| 116 | + lastModifyTime: undefined, | |
| 117 | + }, | |
| 118 | + rules: { | |
| 119 | + userId: [{ | |
| 120 | + required: true, | |
| 121 | + message: '请输入用户', | |
| 122 | + trigger: 'change' | |
| 123 | + }, ], | |
| 124 | + boxOrderId: [{ | |
| 125 | + required: true, | |
| 126 | + message: '请输入盲盒订单', | |
| 127 | + trigger: 'change' | |
| 128 | + }, ], | |
| 129 | + type: [{ | |
| 130 | + required: true, | |
| 131 | + message: '请输入路线', | |
| 132 | + trigger: 'change' | |
| 133 | + }, ], | |
| 134 | + areaLineId: [{ | |
| 135 | + required: true, | |
| 136 | + message: '请输入地域线路', | |
| 137 | + trigger: 'change' | |
| 138 | + }, ], | |
| 139 | + mbtLineId: [{ | |
| 140 | + required: true, | |
| 141 | + message: '请输入人格线路', | |
| 142 | + trigger: 'change' | |
| 143 | + }, ], | |
| 144 | + }, | |
| 145 | + boxOrderIdOptions: [], | |
| 146 | + status: '1', | |
| 147 | + typeOptions: [{ | |
| 148 | + "fullName": "地域路线", | |
| 149 | + "id": "1" | |
| 150 | + }, { | |
| 151 | + "fullName": "人格路线", | |
| 152 | + "id": "2" | |
| 153 | + }], | |
| 154 | + areaIdOptions: [], | |
| 155 | + mbtIdOptions: [], | |
| 156 | + | |
| 157 | + areaLineIdOptions: [], | |
| 158 | + mbtLineIdOptions: [], | |
| 159 | + } | |
| 160 | + }, | |
| 161 | + computed: {}, | |
| 162 | + watch: {}, | |
| 163 | + created() { | |
| 164 | + this.getboxOrderIdOptions(); | |
| 165 | + this.getareaLineIdOptions(); | |
| 166 | + this.getareaIdOptions(); | |
| 167 | + this.getmbtIdOptions(); | |
| 168 | + this.getmbtLineIdOptions(); | |
| 169 | + }, | |
| 170 | + mounted() {}, | |
| 171 | + methods: { | |
| 172 | + getareaIdOptions() { | |
| 173 | + previewDataInterface('393301869759300869').then(res => { | |
| 174 | + this.areaIdOptions = res.data | |
| 175 | + }); | |
| 176 | + }, | |
| 177 | + getmbtIdOptions() { | |
| 178 | + previewDataInterface('393301869759300869').then(res => { | |
| 179 | + this.mbtIdOptions = res.data | |
| 180 | + }); | |
| 181 | + }, | |
| 182 | + TypeChange(e) { | |
| 183 | + this.status = e | |
| 184 | + }, | |
| 185 | + getboxOrderIdOptions() { | |
| 186 | + previewDataInterface('394660105041216773').then(res => { | |
| 187 | + this.boxOrderIdOptions = res.data | |
| 188 | + }); | |
| 189 | + }, | |
| 190 | + getareaLineIdOptions() { | |
| 191 | + previewDataInterface('393304215318955269').then(res => { | |
| 192 | + this.areaLineIdOptions = res.data | |
| 193 | + }); | |
| 194 | + }, | |
| 195 | + getmbtLineIdOptions() { | |
| 196 | + previewDataInterface('393728611745531141').then(res => { | |
| 197 | + this.mbtLineIdOptions = res.data | |
| 198 | + }); | |
| 199 | + }, | |
| 200 | + goBack() { | |
| 201 | + this.$emit('refresh') | |
| 202 | + }, | |
| 203 | + init(id, isDetail) { | |
| 204 | + this.dataForm.id = id || 0; | |
| 205 | + this.visible = true; | |
| 206 | + this.isDetail = isDetail || false; | |
| 207 | + this.$nextTick(() => { | |
| 208 | + this.$refs['elForm'].resetFields(); | |
| 209 | + if (this.dataForm.id) { | |
| 210 | + request({ | |
| 211 | + url: '/api/Blind/TbBoxLog/' + this.dataForm.id, | |
| 212 | + method: 'get' | |
| 213 | + }).then(res => { | |
| 214 | + this.dataForm = res.data; | |
| 215 | + }) | |
| 216 | + } | |
| 217 | + }) | |
| 218 | + }, | |
| 219 | + dataFormSubmit() { | |
| 220 | + this.$refs['elForm'].validate((valid) => { | |
| 221 | + if (valid) { | |
| 222 | + if (!this.dataForm.id) { | |
| 223 | + request({ | |
| 224 | + url: `/api/Blind/TbBoxLog`, | |
| 225 | + method: 'post', | |
| 226 | + data: this.dataForm, | |
| 227 | + }).then((res) => { | |
| 228 | + this.$message({ | |
| 229 | + message: res.msg, | |
| 230 | + type: 'success', | |
| 231 | + duration: 1000, | |
| 232 | + onClose: () => { | |
| 233 | + this.visible = false, | |
| 234 | + this.$emit('refresh', true) | |
| 235 | + } | |
| 236 | + }) | |
| 237 | + }) | |
| 238 | + } else { | |
| 239 | + request({ | |
| 240 | + url: '/api/Blind/TbBoxLog/' + this.dataForm.id, | |
| 241 | + method: 'PUT', | |
| 242 | + data: this.dataForm | |
| 243 | + }).then((res) => { | |
| 244 | + this.$message({ | |
| 245 | + message: res.msg, | |
| 246 | + type: 'success', | |
| 247 | + duration: 1000, | |
| 248 | + onClose: () => { | |
| 249 | + this.visible = false | |
| 250 | + this.$emit('refresh', true) | |
| 251 | + } | |
| 252 | + }) | |
| 253 | + }) | |
| 254 | + } | |
| 255 | + } | |
| 256 | + }) | |
| 257 | + }, | |
| 258 | + } | |
| 259 | + } | |
| 260 | +</script> | ... | ... |
antis-ncc-admin/src/views/tbBoxLog/index.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <div class="NCC-common-layout"> | |
| 3 | + <div class="NCC-common-layout-center"> | |
| 4 | + <el-row class="NCC-common-search-box" :gutter="16"> | |
| 5 | + <el-form @submit.native.prevent> | |
| 6 | + <el-col :span="6"> | |
| 7 | + <el-form-item label="用户"> | |
| 8 | + <userSelect v-model="query.userId" placeholder="请选择用户" /> | |
| 9 | + </el-form-item> | |
| 10 | + </el-col> | |
| 11 | + <el-col :span="6"> | |
| 12 | + <el-form-item label="盲盒订单"> | |
| 13 | + <el-select v-model="query.boxOrderId" placeholder="盲盒订单" clearable> | |
| 14 | + <el-option v-for="(item, index) in boxOrderIdOptions" :key="index" | |
| 15 | + :label="item.F_OrderNumber" :value="item.F_Id" /> | |
| 16 | + </el-select> | |
| 17 | + </el-form-item> | |
| 18 | + </el-col> | |
| 19 | + <el-col :span="6"> | |
| 20 | + <el-form-item label="路线"> | |
| 21 | + <el-select v-model="query.type" placeholder="路线" clearable> | |
| 22 | + <el-option v-for="(item, index) in typeOptions" :key="index" :label="item.fullName" | |
| 23 | + :value="item.id" /> | |
| 24 | + </el-select> | |
| 25 | + </el-form-item> | |
| 26 | + </el-col> | |
| 27 | + <template v-if="showAll"> | |
| 28 | + <el-col :span="6"> | |
| 29 | + <el-form-item label="地域"> | |
| 30 | + <el-select v-model="query.areaId" placeholder="地域" clearable> | |
| 31 | + <el-option v-for="(item, index) in areaIdOptions" :key="index" :label="item.F_Name" | |
| 32 | + :value="item.F_Id" /> | |
| 33 | + </el-select> | |
| 34 | + </el-form-item> | |
| 35 | + </el-col> | |
| 36 | + <el-col :span="6"> | |
| 37 | + <el-form-item label="人格"> | |
| 38 | + <el-select v-model="query.mbtId" placeholder="人格" clearable> | |
| 39 | + <el-option v-for="(item, index) in mbtIdOptions" :key="index" :label="item.F_Name" | |
| 40 | + :value="item.F_Id" /> | |
| 41 | + </el-select> | |
| 42 | + </el-form-item> | |
| 43 | + </el-col> | |
| 44 | + <el-col :span="6"> | |
| 45 | + <el-form-item label="地域线路"> | |
| 46 | + <el-select v-model="query.areaLineId" placeholder="地域线路" clearable> | |
| 47 | + <el-option v-for="(item, index) in areaLineIdOptions" :key="index" | |
| 48 | + :label="item.F_Title" :value="item.F_Id" /> | |
| 49 | + </el-select> | |
| 50 | + </el-form-item> | |
| 51 | + </el-col> | |
| 52 | + <el-col :span="6"> | |
| 53 | + <el-form-item label="人格线路"> | |
| 54 | + <el-select v-model="query.mbtLineId" placeholder="人格线路" clearable> | |
| 55 | + <el-option v-for="(item, index) in mbtLineIdOptions" :key="index" | |
| 56 | + :label="item.F_Name" :value="item.F_Id" /> | |
| 57 | + </el-select> | |
| 58 | + </el-form-item> | |
| 59 | + </el-col> | |
| 60 | + </template> | |
| 61 | + <el-col :span="6"> | |
| 62 | + <el-form-item> | |
| 63 | + <el-button type="primary" icon="el-icon-search" @click="search()">查询</el-button> | |
| 64 | + <el-button icon="el-icon-refresh-right" @click="reset()">重置</el-button> | |
| 65 | + <el-button type="text" icon="el-icon-arrow-down" @click="showAll=true" v-if="!showAll">展开 | |
| 66 | + </el-button> | |
| 67 | + <el-button type="text" icon="el-icon-arrow-up" @click="showAll=false" v-else>收起</el-button> | |
| 68 | + </el-form-item> | |
| 69 | + </el-col> | |
| 70 | + </el-form> | |
| 71 | + </el-row> | |
| 72 | + <div class="NCC-common-layout-main NCC-flex-main"> | |
| 73 | + <div class="NCC-common-head"> | |
| 74 | + <div> | |
| 75 | + <el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()">新增</el-button> | |
| 76 | + <el-button type="text" icon="el-icon-download" @click="exportData()">导出</el-button> | |
| 77 | + <el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()">批量删除</el-button> | |
| 78 | + </div> | |
| 79 | + <div class="NCC-common-head-right"> | |
| 80 | + <el-tooltip effect="dark" content="刷新" placement="top"> | |
| 81 | + <el-link icon="icon-ym icon-ym-Refresh NCC-common-head-icon" :underline="false" | |
| 82 | + @click="reset()" /> | |
| 83 | + </el-tooltip> | |
| 84 | + <screenfull isContainer /> | |
| 85 | + </div> | |
| 86 | + </div> | |
| 87 | + <NCC-table v-loading="listLoading" :data="list" has-c @selection-change="handleSelectionChange"> | |
| 88 | + <el-table-column prop="RealName" label="用户" align="left"> | |
| 89 | + <template slot-scope="scope"> | |
| 90 | + {{scope.row.user&&scope.row.user.RealName}} | |
| 91 | + </template> | |
| 92 | + </el-table-column> | |
| 93 | + <el-table-column label="盲盒订单" prop="OrderNumber" align="left"> | |
| 94 | + <template slot-scope="scope">{{ scope.row.boxOrder&&scope.row.boxOrder.OrderNumber }}</template> | |
| 95 | + </el-table-column> | |
| 96 | + <el-table-column label="路线" prop="type" align="left"> | |
| 97 | + <template slot-scope="scope">{{ scope.row.type | dynamicText(typeOptions) }}</template> | |
| 98 | + </el-table-column> | |
| 99 | + <el-table-column label="地域线路" prop="Title" align="left"> | |
| 100 | + <template slot-scope="scope">{{ scope.row.areaLine&&scope.row.areaLine.Title}}</template> | |
| 101 | + </el-table-column> | |
| 102 | + <el-table-column label="人格线路" prop="mbtLineId" align="left"> | |
| 103 | + <template slot-scope="scope">{{ scope.row.mbtLine&&scope.row.mbtLine.Name}}</template> | |
| 104 | + </el-table-column> | |
| 105 | + <el-table-column label="地域" prop="Name" align="left"> | |
| 106 | + <template slot-scope="scope">{{ scope.row.area&&scope.row.area.Name}}</template> | |
| 107 | + </el-table-column> | |
| 108 | + <el-table-column label="人格" prop="Name" align="left"> | |
| 109 | + <template slot-scope="scope">{{ scope.row.mbt&&scope.row.mbt.Name}}</template> | |
| 110 | + </el-table-column> | |
| 111 | + <el-table-column prop="creatorTime" label="创建时间" align="left" :formatter="ncc.tableDateFormat" /> | |
| 112 | + <el-table-column prop="lastModifyTime" label="修改时间" align="left" :formatter="ncc.tableDateFormat" /> | |
| 113 | + <el-table-column label="操作" fixed="right" width="100"> | |
| 114 | + <template slot-scope="scope"> | |
| 115 | + <el-button type="text" @click="addOrUpdateHandle(scope.row.id)">编辑</el-button> | |
| 116 | + <el-button type="text" @click="handleDel(scope.row.id)" class="NCC-table-delBtn">删除 | |
| 117 | + </el-button> | |
| 118 | + </template> | |
| 119 | + </el-table-column> | |
| 120 | + </NCC-table> | |
| 121 | + <pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" | |
| 122 | + @pagination="initData" /> | |
| 123 | + </div> | |
| 124 | + </div> | |
| 125 | + <NCC-Form v-if="formVisible" ref="NCCForm" @refresh="refresh" /> | |
| 126 | + <ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" /> | |
| 127 | + </div> | |
| 128 | +</template> | |
| 129 | +<script> | |
| 130 | + import request from '@/utils/request' | |
| 131 | + import { | |
| 132 | + getDictionaryDataSelector | |
| 133 | + } from '@/api/systemData/dictionary' | |
| 134 | + import NCCForm from './Form' | |
| 135 | + import ExportBox from './ExportBox' | |
| 136 | + import { | |
| 137 | + previewDataInterface | |
| 138 | + } from '@/api/systemData/dataInterface' | |
| 139 | + export default { | |
| 140 | + components: { | |
| 141 | + NCCForm, | |
| 142 | + ExportBox | |
| 143 | + }, | |
| 144 | + data() { | |
| 145 | + return { | |
| 146 | + showAll: false, | |
| 147 | + query: { | |
| 148 | + userId: undefined, | |
| 149 | + boxOrderId: undefined, | |
| 150 | + type: undefined, | |
| 151 | + areaLineId: undefined, | |
| 152 | + mbtLineId: undefined, | |
| 153 | + areaId: undefined, | |
| 154 | + mbtId: undefined, | |
| 155 | + }, | |
| 156 | + list: [], | |
| 157 | + listLoading: true, | |
| 158 | + multipleSelection: [], | |
| 159 | + total: 0, | |
| 160 | + listQuery: { | |
| 161 | + currentPage: 1, | |
| 162 | + pageSize: 20, | |
| 163 | + sort: "desc", | |
| 164 | + sidx: "", | |
| 165 | + }, | |
| 166 | + formVisible: false, | |
| 167 | + exportBoxVisible: false, | |
| 168 | + columnList: [{ | |
| 169 | + prop: 'userId', | |
| 170 | + label: '用户' | |
| 171 | + }, | |
| 172 | + { | |
| 173 | + prop: 'boxOrderId', | |
| 174 | + label: '盲盒订单' | |
| 175 | + }, | |
| 176 | + { | |
| 177 | + prop: 'type', | |
| 178 | + label: '路线' | |
| 179 | + }, | |
| 180 | + { | |
| 181 | + prop: 'areaLineId', | |
| 182 | + label: '地域线路' | |
| 183 | + }, | |
| 184 | + { | |
| 185 | + prop: 'mbtLineId', | |
| 186 | + label: '人格线路' | |
| 187 | + }, | |
| 188 | + { | |
| 189 | + prop: 'creatorTime', | |
| 190 | + label: '创建时间' | |
| 191 | + }, | |
| 192 | + { | |
| 193 | + prop: 'lastModifyTime', | |
| 194 | + label: '修改时间' | |
| 195 | + }, { | |
| 196 | + prop: 'areaId', | |
| 197 | + label: '地域' | |
| 198 | + }, | |
| 199 | + { | |
| 200 | + prop: 'mbtId', | |
| 201 | + label: '人格' | |
| 202 | + }, | |
| 203 | + ], | |
| 204 | + areaIdOptions: [], | |
| 205 | + mbtIdOptions: [], | |
| 206 | + | |
| 207 | + boxOrderIdOptions: [], | |
| 208 | + typeOptions: [{ | |
| 209 | + "fullName": "地域路线", | |
| 210 | + "id": "1" | |
| 211 | + }, { | |
| 212 | + "fullName": "人格路线", | |
| 213 | + "id": "2" | |
| 214 | + }], | |
| 215 | + areaLineIdOptions: [], | |
| 216 | + mbtLineIdOptions: [], | |
| 217 | + } | |
| 218 | + }, | |
| 219 | + computed: {}, | |
| 220 | + created() { | |
| 221 | + this.initData() | |
| 222 | + this.getboxOrderIdOptions(); | |
| 223 | + this.getareaLineIdOptions(); | |
| 224 | + this.getmbtIdOptions(); | |
| 225 | + this.getareaIdOptions(); | |
| 226 | + | |
| 227 | + this.getmbtLineIdOptions(); | |
| 228 | + }, | |
| 229 | + methods: { | |
| 230 | + getareaIdOptions() { | |
| 231 | + previewDataInterface('393301869759300869').then(res => { | |
| 232 | + this.areaIdOptions = res.data | |
| 233 | + }); | |
| 234 | + }, | |
| 235 | + getmbtIdOptions() { | |
| 236 | + previewDataInterface('393301869759300869').then(res => { | |
| 237 | + this.mbtIdOptions = res.data | |
| 238 | + }); | |
| 239 | + }, | |
| 240 | + getboxOrderIdOptions() { | |
| 241 | + previewDataInterface('394660105041216773').then(res => { | |
| 242 | + this.boxOrderIdOptions = res.data | |
| 243 | + }); | |
| 244 | + }, | |
| 245 | + getareaLineIdOptions() { | |
| 246 | + previewDataInterface('393304215318955269').then(res => { | |
| 247 | + this.areaLineIdOptions = res.data | |
| 248 | + }); | |
| 249 | + }, | |
| 250 | + getmbtLineIdOptions() { | |
| 251 | + previewDataInterface('393728611745531141').then(res => { | |
| 252 | + this.mbtLineIdOptions = res.data | |
| 253 | + }); | |
| 254 | + }, | |
| 255 | + initData() { | |
| 256 | + this.listLoading = true; | |
| 257 | + let _query = { | |
| 258 | + ...this.listQuery, | |
| 259 | + ...this.query | |
| 260 | + }; | |
| 261 | + let query = {} | |
| 262 | + for (let key in _query) { | |
| 263 | + if (Array.isArray(_query[key])) { | |
| 264 | + query[key] = _query[key].join() | |
| 265 | + } else { | |
| 266 | + query[key] = _query[key] | |
| 267 | + } | |
| 268 | + } | |
| 269 | + request({ | |
| 270 | + url: `/api/Blind/TbBoxLog`, | |
| 271 | + method: 'GET', | |
| 272 | + data: query | |
| 273 | + }).then(res => { | |
| 274 | + this.list = res.data.list | |
| 275 | + this.total = res.data.pagination.total | |
| 276 | + this.listLoading = false | |
| 277 | + }) | |
| 278 | + }, | |
| 279 | + handleDel(id) { | |
| 280 | + this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', { | |
| 281 | + type: 'warning' | |
| 282 | + }).then(() => { | |
| 283 | + request({ | |
| 284 | + url: `/api/Blind/TbBoxLog/${id}`, | |
| 285 | + method: 'DELETE' | |
| 286 | + }).then(res => { | |
| 287 | + this.$message({ | |
| 288 | + type: 'success', | |
| 289 | + message: res.msg, | |
| 290 | + onClose: () => { | |
| 291 | + this.initData() | |
| 292 | + } | |
| 293 | + }); | |
| 294 | + }) | |
| 295 | + }).catch(() => {}); | |
| 296 | + }, | |
| 297 | + handleSelectionChange(val) { | |
| 298 | + const res = val.map(item => item.id) | |
| 299 | + this.multipleSelection = res | |
| 300 | + }, | |
| 301 | + handleBatchRemoveDel() { | |
| 302 | + if (!this.multipleSelection.length) { | |
| 303 | + this.$message({ | |
| 304 | + type: 'error', | |
| 305 | + message: '请选择一条数据', | |
| 306 | + duration: 1500, | |
| 307 | + }) | |
| 308 | + return | |
| 309 | + } | |
| 310 | + const ids = this.multipleSelection | |
| 311 | + this.$confirm('您确定要删除这些数据吗, 是否继续?', '提示', { | |
| 312 | + type: 'warning' | |
| 313 | + }).then(() => { | |
| 314 | + request({ | |
| 315 | + url: `/api/Blind/TbBoxLog/batchRemove`, | |
| 316 | + method: 'POST', | |
| 317 | + data: ids, | |
| 318 | + }).then(res => { | |
| 319 | + this.$message({ | |
| 320 | + type: 'success', | |
| 321 | + message: res.msg, | |
| 322 | + onClose: () => { | |
| 323 | + this.initData() | |
| 324 | + } | |
| 325 | + }); | |
| 326 | + }) | |
| 327 | + }).catch(() => {}) | |
| 328 | + }, | |
| 329 | + addOrUpdateHandle(id, isDetail) { | |
| 330 | + this.formVisible = true | |
| 331 | + this.$nextTick(() => { | |
| 332 | + this.$refs.NCCForm.init(id, isDetail) | |
| 333 | + }) | |
| 334 | + }, | |
| 335 | + exportData() { | |
| 336 | + this.exportBoxVisible = true | |
| 337 | + this.$nextTick(() => { | |
| 338 | + this.$refs.ExportBox.init(this.columnList) | |
| 339 | + }) | |
| 340 | + }, | |
| 341 | + download(data) { | |
| 342 | + let query = { | |
| 343 | + ...data, | |
| 344 | + ...this.listQuery, | |
| 345 | + ...this.query | |
| 346 | + } | |
| 347 | + request({ | |
| 348 | + url: `/api/Blind/TbBoxLog/Actions/Export`, | |
| 349 | + method: 'GET', | |
| 350 | + data: query | |
| 351 | + }).then(res => { | |
| 352 | + if (!res.data.url) return | |
| 353 | + window.location.href = this.define.comUrl + res.data.url | |
| 354 | + this.$refs.ExportBox.visible = false | |
| 355 | + this.exportBoxVisible = false | |
| 356 | + }) | |
| 357 | + }, | |
| 358 | + search() { | |
| 359 | + this.listQuery = { | |
| 360 | + currentPage: 1, | |
| 361 | + pageSize: 20, | |
| 362 | + sort: "desc", | |
| 363 | + sidx: "", | |
| 364 | + } | |
| 365 | + this.initData() | |
| 366 | + }, | |
| 367 | + refresh(isrRefresh) { | |
| 368 | + this.formVisible = false | |
| 369 | + if (isrRefresh) this.reset() | |
| 370 | + }, | |
| 371 | + reset() { | |
| 372 | + for (let key in this.query) { | |
| 373 | + this.query[key] = undefined | |
| 374 | + } | |
| 375 | + this.listQuery = { | |
| 376 | + currentPage: 1, | |
| 377 | + pageSize: 20, | |
| 378 | + sort: "desc", | |
| 379 | + sidx: "", | |
| 380 | + } | |
| 381 | + this.initData() | |
| 382 | + } | |
| 383 | + } | |
| 384 | + } | |
| 385 | +</script> | ... | ... |
antis-ncc-admin/src/views/tbBoxOrder/ExportBox.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <el-dialog title="导出数据" :close-on-click-modal="false" :visible.sync="visible" | |
| 3 | + class="NCC-dialog NCC-dialog_center" lock-scroll width="600px"> | |
| 4 | + <el-form label-position="top" label-width="80px"> | |
| 5 | + <el-form-item label="数据选择"> | |
| 6 | + <el-radio-group v-model="type"> | |
| 7 | + <el-radio :label="0">当前页面数据</el-radio> | |
| 8 | + <el-radio :label="1">全部页面数据</el-radio> | |
| 9 | + </el-radio-group> | |
| 10 | + </el-form-item> | |
| 11 | + <el-form-item label="导出字段"> | |
| 12 | + <el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" | |
| 13 | + @change="handleCheckAllChange">全选</el-checkbox> | |
| 14 | + <el-checkbox-group v-model="columns" @change="handleCheckedChange"> | |
| 15 | + <el-checkbox v-for="item in columnList" :label="item.prop" :key="item.prop"> | |
| 16 | + {{item.label}} | |
| 17 | + </el-checkbox> | |
| 18 | + </el-checkbox-group> | |
| 19 | + </el-form-item> | |
| 20 | + </el-form> | |
| 21 | + <span slot="footer" class="dialog-footer"> | |
| 22 | + <el-button @click="visible=false">取 消</el-button> | |
| 23 | + <el-button type="primary" @click="downLoad">导 出</el-button> | |
| 24 | + </span> | |
| 25 | + </el-dialog> | |
| 26 | +</template> | |
| 27 | + | |
| 28 | +<script> | |
| 29 | +export default { | |
| 30 | + data() { | |
| 31 | + return { | |
| 32 | + visible: false, | |
| 33 | + btnLoading: false, | |
| 34 | + type: 0, | |
| 35 | + columns: [], | |
| 36 | + checkAll: true, | |
| 37 | + isIndeterminate: false, | |
| 38 | + columnList: [] | |
| 39 | + } | |
| 40 | + }, | |
| 41 | + methods: { | |
| 42 | + init(columnList) { | |
| 43 | + this.visible = true | |
| 44 | + this.columnList = columnList | |
| 45 | + this.columns = columnList.map(o => o.prop) | |
| 46 | + }, | |
| 47 | + handleCheckAllChange(val) { | |
| 48 | + this.columns = val ? this.columnList.map(o => o.prop) : []; | |
| 49 | + this.isIndeterminate = false; | |
| 50 | + }, | |
| 51 | + handleCheckedChange(value) { | |
| 52 | + let checkedCount = value.length; | |
| 53 | + this.checkAll = checkedCount === this.columnList.length; | |
| 54 | + this.isIndeterminate = checkedCount > 0 && checkedCount < this.columnList.length; | |
| 55 | + }, | |
| 56 | + downLoad() { | |
| 57 | + this.$emit('download', { dataType: this.type, selectKey: this.columns.join(',') }) | |
| 58 | + } | |
| 59 | + } | |
| 60 | +} | |
| 61 | +</script> | |
| 62 | +<style lang="scss" scoped> | |
| 63 | +>>> .el-dialog__body { | |
| 64 | + padding: 20px !important; | |
| 65 | +} | |
| 66 | +</style> | |
| 0 | 67 | \ No newline at end of file | ... | ... |
antis-ncc-admin/src/views/tbBoxOrder/Form.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <el-dialog :title="!dataForm.id ? '新建' : isDetail ? '详情':'编辑'" :close-on-click-modal="false" | |
| 3 | + :visible.sync="visible" class="NCC-dialog NCC-dialog_center" lock-scroll width="600px"> | |
| 4 | + <el-row :gutter="15" class=""> | |
| 5 | + <el-form ref="elForm" :model="dataForm" size="small" label-width="100px" label-position="right" | |
| 6 | + :disabled="!!isDetail" :rules="rules"> | |
| 7 | + <el-col :span="24"> | |
| 8 | + <el-form-item label="用户" prop="userId"> | |
| 9 | + <user-select v-model="dataForm.userId" placeholder="请选择" clearable required> | |
| 10 | + </user-select> | |
| 11 | + </el-form-item> | |
| 12 | + </el-col> | |
| 13 | + <!-- <el-col :span="24"> | |
| 14 | + <el-form-item label="订单号" prop="orderNumber"> | |
| 15 | + <el-input v-model="dataForm.orderNumber" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 16 | + </el-input> | |
| 17 | + </el-form-item> | |
| 18 | + </el-col> --> | |
| 19 | + <el-col :span="24"> | |
| 20 | + <el-form-item label="路线" prop="type"> | |
| 21 | + <el-select v-model="dataForm.type" placeholder="请选择" clearable :style='{"width":"100%"}' | |
| 22 | + @change="TypeChange"> | |
| 23 | + <el-option v-for="(item, index) in typeOptions" :key="index" :label="item.fullName" | |
| 24 | + :value="item.id"></el-option> | |
| 25 | + </el-select> | |
| 26 | + </el-form-item> | |
| 27 | + </el-col> | |
| 28 | + <el-col :span="24"> | |
| 29 | + <el-form-item label="地域" prop="areaId" v-if="type=='1'"> | |
| 30 | + <el-select v-model="dataForm.areaId" placeholder="请选择" clearable :style='{"width":"100%"}'> | |
| 31 | + <el-option v-for="(item, index) in areaIdOptions" :key="index" :label="item.F_Name" | |
| 32 | + :value="item.F_Id"></el-option> | |
| 33 | + </el-select> | |
| 34 | + </el-form-item> | |
| 35 | + </el-col> | |
| 36 | + <el-col :span="24"> | |
| 37 | + <el-form-item label="地域线路" prop="areaLineId" v-if="type=='1'"> | |
| 38 | + <el-select v-model="dataForm.areaLineId" placeholder="请选择" clearable :style='{"width":"100%"}'> | |
| 39 | + <el-option v-for="(item, index) in areaLineIdOptions" :key="index" :label="item.F_Title" | |
| 40 | + :value="item.F_Id"></el-option> | |
| 41 | + </el-select> | |
| 42 | + </el-form-item> | |
| 43 | + </el-col> | |
| 44 | + <el-col :span="24"> | |
| 45 | + <el-form-item label="人格" prop="mbtId" v-if="type=='2'"> | |
| 46 | + <el-select v-model="dataForm.mbtId" placeholder="请选择" clearable :style='{"width":"100%"}'> | |
| 47 | + <el-option v-for="(item, index) in mbtIdOptions" :key="index" :label="item.F_Name" | |
| 48 | + :value="item.F_Id"></el-option> | |
| 49 | + </el-select> | |
| 50 | + </el-form-item> | |
| 51 | + </el-col> | |
| 52 | + <el-col :span="24"> | |
| 53 | + <el-form-item label="人格线路" prop="mbtLineId" v-if="type=='2'"> | |
| 54 | + <el-select v-model="dataForm.mbtLineId" placeholder="请选择" clearable :style='{"width":"100%"}'> | |
| 55 | + <el-option v-for="(item, index) in mbtLineIdOptions" :key="index" :label="item.F_Name" | |
| 56 | + :value="item.F_Id"></el-option> | |
| 57 | + </el-select> | |
| 58 | + </el-form-item> | |
| 59 | + </el-col> | |
| 60 | + <el-col :span="24"> | |
| 61 | + <el-form-item label="状态" prop="status"> | |
| 62 | + <el-select v-model="dataForm.status" placeholder="请选择" clearable required | |
| 63 | + :style='{"width":"100%"}'> | |
| 64 | + <el-option v-for="(item, index) in statusOptions" :key="index" :label="item.fullName" | |
| 65 | + :value="item.id"></el-option> | |
| 66 | + </el-select> | |
| 67 | + </el-form-item> | |
| 68 | + </el-col> | |
| 69 | + <el-col :span="24"> | |
| 70 | + <el-form-item label="购买类型" prop="isMe"> | |
| 71 | + <el-select v-model="dataForm.isMe" placeholder="请选择" clearable required | |
| 72 | + :style='{"width":"100%"}'> | |
| 73 | + <el-option v-for="(item, index) in isMeOptions" :key="index" :label="item.fullName" | |
| 74 | + :value="item.id"></el-option> | |
| 75 | + </el-select> | |
| 76 | + </el-form-item> | |
| 77 | + </el-col> | |
| 78 | + <el-col :span="24"> | |
| 79 | + <el-form-item label="赠送人" prop="giveUserId"> | |
| 80 | + <user-select v-model="dataForm.giveUserId" placeholder="请选择" clearable> | |
| 81 | + </user-select> | |
| 82 | + </el-form-item> | |
| 83 | + </el-col> | |
| 84 | + <el-col :span="24"> | |
| 85 | + <el-form-item label="盲盒券" prop="myBoxCouponId"> | |
| 86 | + <el-select v-model="dataForm.myBoxCouponId" placeholder="请选择" clearable | |
| 87 | + :style='{"width":"100%"}'> | |
| 88 | + <el-option v-for="(item, index) in myBoxCouponIdOptions" :key="index" :label="item.F_Title" | |
| 89 | + :value="item.F_Id"></el-option> | |
| 90 | + </el-select> | |
| 91 | + </el-form-item> | |
| 92 | + </el-col> | |
| 93 | + <el-col :span="24"> | |
| 94 | + <el-form-item label="二维码" prop="qrCode"> | |
| 95 | + <NCC-UploadImg v-model="dataForm.qrCode" :fileSize="5" sizeUnit="MB" :limit="9"> | |
| 96 | + </NCC-UploadImg> | |
| 97 | + </el-form-item> | |
| 98 | + </el-col> | |
| 99 | + <!-- <el-col :span="24"> | |
| 100 | + <el-form-item label="总金额" prop="totalPrice"> | |
| 101 | + <el-input v-model="dataForm.totalPrice" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 102 | + </el-input> | |
| 103 | + </el-form-item> | |
| 104 | + </el-col> --> | |
| 105 | + <el-col :span="24" v-if="false"> | |
| 106 | + <el-form-item label="创建时间" prop="creatorTime"> | |
| 107 | + <el-input v-model="dataForm.creatorTime" placeholder="系统自动生成" readonly> | |
| 108 | + </el-input> | |
| 109 | + </el-form-item> | |
| 110 | + </el-col> | |
| 111 | + <el-col :span="24" v-if="false"> | |
| 112 | + <el-form-item label="修改时间" prop="lastModifyTime"> | |
| 113 | + <el-input v-model="dataForm.lastModifyTime" placeholder="系统自动生成" readonly> | |
| 114 | + </el-input> | |
| 115 | + </el-form-item> | |
| 116 | + </el-col> | |
| 117 | + </el-form> | |
| 118 | + </el-row> | |
| 119 | + <span slot="footer" class="dialog-footer"> | |
| 120 | + <el-button @click="visible = false">取 消</el-button> | |
| 121 | + <el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail">确 定</el-button> | |
| 122 | + </span> | |
| 123 | + </el-dialog> | |
| 124 | +</template> | |
| 125 | +<script> | |
| 126 | + import request from '@/utils/request' | |
| 127 | + import { | |
| 128 | + getDictionaryDataSelector | |
| 129 | + } from '@/api/systemData/dictionary' | |
| 130 | + import { | |
| 131 | + previewDataInterface | |
| 132 | + } from '@/api/systemData/dataInterface' | |
| 133 | + export default { | |
| 134 | + components: {}, | |
| 135 | + props: [], | |
| 136 | + data() { | |
| 137 | + return { | |
| 138 | + loading: false, | |
| 139 | + visible: false, | |
| 140 | + isDetail: false, | |
| 141 | + dataForm: { | |
| 142 | + id: '', | |
| 143 | + userId: undefined, | |
| 144 | + orderNumber: undefined, | |
| 145 | + type: '1', | |
| 146 | + areaId: undefined, | |
| 147 | + areaLineId: undefined, | |
| 148 | + mbtId: undefined, | |
| 149 | + mbtLineId: undefined, | |
| 150 | + status: undefined, | |
| 151 | + isMe: undefined, | |
| 152 | + giveUserId: undefined, | |
| 153 | + myBoxCouponId: undefined, | |
| 154 | + qrCode: [], | |
| 155 | + | |
| 156 | + totalPrice: undefined, | |
| 157 | + creatorTime: undefined, | |
| 158 | + lastModifyTime: undefined, | |
| 159 | + }, | |
| 160 | + rules: { | |
| 161 | + userId: [{ | |
| 162 | + required: true, | |
| 163 | + message: '请输入用户', | |
| 164 | + trigger: 'change' | |
| 165 | + }, ], | |
| 166 | + status: [{ | |
| 167 | + required: true, | |
| 168 | + message: '请输入状态', | |
| 169 | + trigger: 'change' | |
| 170 | + }, ], | |
| 171 | + isMe: [{ | |
| 172 | + required: true, | |
| 173 | + message: '请输入购买类型', | |
| 174 | + trigger: 'change' | |
| 175 | + }, ], | |
| 176 | + totalPrice: [{ | |
| 177 | + pattern: /^[1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0$/, | |
| 178 | + message: '请输入正确的金额', | |
| 179 | + trigger: 'blur' | |
| 180 | + }, ], | |
| 181 | + }, | |
| 182 | + typeOptions: [{ | |
| 183 | + "fullName": "地域线路", | |
| 184 | + "id": "1" | |
| 185 | + }, { | |
| 186 | + "fullName": "MBT人格线路", | |
| 187 | + "id": "2" | |
| 188 | + }], | |
| 189 | + type: '1', | |
| 190 | + areaIdOptions: [], | |
| 191 | + areaLineIdOptions: [], | |
| 192 | + mbtIdOptions: [], | |
| 193 | + mbtLineIdOptions: [], | |
| 194 | + statusOptions: [{ | |
| 195 | + "fullName": "未付款", | |
| 196 | + "id": "1" | |
| 197 | + }, { | |
| 198 | + "fullName": "已付款", | |
| 199 | + "id": "2" | |
| 200 | + }], | |
| 201 | + isMeOptions: [{ | |
| 202 | + "fullName": "自己购买", | |
| 203 | + "id": "1" | |
| 204 | + }, { | |
| 205 | + "fullName": "赠送他人", | |
| 206 | + "id": "2" | |
| 207 | + }], | |
| 208 | + myBoxCouponIdOptions: [], | |
| 209 | + } | |
| 210 | + }, | |
| 211 | + computed: {}, | |
| 212 | + watch: {}, | |
| 213 | + created() { | |
| 214 | + this.getareaIdOptions(); | |
| 215 | + this.getareaLineIdOptions(); | |
| 216 | + this.getmbtIdOptions(); | |
| 217 | + this.getmbtLineIdOptions(); | |
| 218 | + this.getmyBoxCouponIdOptions(); | |
| 219 | + }, | |
| 220 | + mounted() {}, | |
| 221 | + methods: { | |
| 222 | + TypeChange(e) { | |
| 223 | + console.log('eeee', e) | |
| 224 | + this.type = e | |
| 225 | + }, | |
| 226 | + getareaIdOptions() { | |
| 227 | + previewDataInterface('393301869759300869').then(res => { | |
| 228 | + this.areaIdOptions = res.data | |
| 229 | + }); | |
| 230 | + }, | |
| 231 | + getareaLineIdOptions() { | |
| 232 | + previewDataInterface('393304215318955269').then(res => { | |
| 233 | + this.areaLineIdOptions = res.data | |
| 234 | + }); | |
| 235 | + }, | |
| 236 | + getmbtIdOptions() { | |
| 237 | + previewDataInterface('393308680755348741').then(res => { | |
| 238 | + this.mbtIdOptions = res.data | |
| 239 | + }); | |
| 240 | + }, | |
| 241 | + getmbtLineIdOptions() { | |
| 242 | + previewDataInterface('393728611745531141').then(res => { | |
| 243 | + this.mbtLineIdOptions = res.data | |
| 244 | + }); | |
| 245 | + }, | |
| 246 | + getmyBoxCouponIdOptions() { | |
| 247 | + previewDataInterface('394645492476151045').then(res => { | |
| 248 | + this.myBoxCouponIdOptions = res.data | |
| 249 | + }); | |
| 250 | + }, | |
| 251 | + goBack() { | |
| 252 | + this.$emit('refresh') | |
| 253 | + }, | |
| 254 | + init(id, isDetail) { | |
| 255 | + this.dataForm.id = id || 0; | |
| 256 | + this.visible = true; | |
| 257 | + this.isDetail = isDetail || false; | |
| 258 | + this.$nextTick(() => { | |
| 259 | + this.$refs['elForm'].resetFields(); | |
| 260 | + if (this.dataForm.id) { | |
| 261 | + request({ | |
| 262 | + url: '/api/Blind/TbBoxOrder/' + this.dataForm.id, | |
| 263 | + method: 'get' | |
| 264 | + }).then(res => { | |
| 265 | + this.dataForm = res.data; | |
| 266 | + }) | |
| 267 | + } | |
| 268 | + }) | |
| 269 | + }, | |
| 270 | + dataFormSubmit() { | |
| 271 | + this.$refs['elForm'].validate((valid) => { | |
| 272 | + if (valid) { | |
| 273 | + if (!this.dataForm.id) { | |
| 274 | + request({ | |
| 275 | + url: `/api/Blind/TbBoxOrder`, | |
| 276 | + method: 'post', | |
| 277 | + data: this.dataForm, | |
| 278 | + }).then((res) => { | |
| 279 | + this.$message({ | |
| 280 | + message: res.msg, | |
| 281 | + type: 'success', | |
| 282 | + duration: 1000, | |
| 283 | + onClose: () => { | |
| 284 | + this.visible = false, | |
| 285 | + this.$emit('refresh', true) | |
| 286 | + } | |
| 287 | + }) | |
| 288 | + }) | |
| 289 | + } else { | |
| 290 | + request({ | |
| 291 | + url: '/api/Blind/TbBoxOrder/' + this.dataForm.id, | |
| 292 | + method: 'PUT', | |
| 293 | + data: this.dataForm | |
| 294 | + }).then((res) => { | |
| 295 | + this.$message({ | |
| 296 | + message: res.msg, | |
| 297 | + type: 'success', | |
| 298 | + duration: 1000, | |
| 299 | + onClose: () => { | |
| 300 | + this.visible = false | |
| 301 | + this.$emit('refresh', true) | |
| 302 | + } | |
| 303 | + }) | |
| 304 | + }) | |
| 305 | + } | |
| 306 | + } | |
| 307 | + }) | |
| 308 | + }, | |
| 309 | + } | |
| 310 | + } | |
| 311 | +</script> | ... | ... |
antis-ncc-admin/src/views/tbBoxOrder/index.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <div class="NCC-common-layout"> | |
| 3 | + <div class="NCC-common-layout-center"> | |
| 4 | + <el-row class="NCC-common-search-box" :gutter="16"> | |
| 5 | + <el-form @submit.native.prevent> | |
| 6 | + <el-col :span="6"> | |
| 7 | + <el-form-item label="用户"> | |
| 8 | + <userSelect v-model="query.userId" placeholder="请选择用户" /> | |
| 9 | + </el-form-item> | |
| 10 | + </el-col> | |
| 11 | + <el-col :span="6"> | |
| 12 | + <el-form-item label="订单号"> | |
| 13 | + <el-input v-model="query.orderNumber" placeholder="订单号" clearable /> | |
| 14 | + </el-form-item> | |
| 15 | + </el-col> | |
| 16 | + <el-col :span="6"> | |
| 17 | + <el-form-item label="路线"> | |
| 18 | + <el-select v-model="query.type" placeholder="路线" clearable> | |
| 19 | + <el-option v-for="(item, index) in typeOptions" :key="index" :label="item.fullName" | |
| 20 | + :value="item.id" /> | |
| 21 | + </el-select> | |
| 22 | + </el-form-item> | |
| 23 | + </el-col> | |
| 24 | + <template v-if="showAll"> | |
| 25 | + <el-col :span="6"> | |
| 26 | + <el-form-item label="地域"> | |
| 27 | + <el-select v-model="query.areaId" placeholder="地域" clearable> | |
| 28 | + <el-option v-for="(item, index) in areaIdOptions" :key="index" :label="item.F_Name" | |
| 29 | + :value="item.F_Id" /> | |
| 30 | + </el-select> | |
| 31 | + </el-form-item> | |
| 32 | + </el-col> | |
| 33 | + <el-col :span="6"> | |
| 34 | + <el-form-item label="人格"> | |
| 35 | + <el-select v-model="query.mbtId" placeholder="人格" clearable> | |
| 36 | + <el-option v-for="(item, index) in mbtIdOptions" :key="index" :label="item.F_Name" | |
| 37 | + :value="item.F_Id" /> | |
| 38 | + </el-select> | |
| 39 | + </el-form-item> | |
| 40 | + </el-col> | |
| 41 | + <el-col :span="6"> | |
| 42 | + <el-form-item label="地域线路"> | |
| 43 | + <el-select v-model="query.areaLineId" placeholder="地域线路" clearable> | |
| 44 | + <el-option v-for="(item, index) in areaLineIdOptions" :key="index" | |
| 45 | + :label="item.F_Title" :value="item.F_Id" /> | |
| 46 | + </el-select> | |
| 47 | + </el-form-item> | |
| 48 | + </el-col> | |
| 49 | + <el-col :span="6"> | |
| 50 | + <el-form-item label="人格线路"> | |
| 51 | + <el-select v-model="query.mbtLineId" placeholder="人格线路" clearable> | |
| 52 | + <el-option v-for="(item, index) in mbtLineIdOptions" :key="index" | |
| 53 | + :label="item.F_Name" :value="item.F_Id" /> | |
| 54 | + </el-select> | |
| 55 | + </el-form-item> | |
| 56 | + </el-col> | |
| 57 | + <el-col :span="6"> | |
| 58 | + <el-form-item label="状态"> | |
| 59 | + <el-select v-model="query.status" placeholder="状态" clearable> | |
| 60 | + <el-option v-for="(item, index) in statusOptions" :key="index" | |
| 61 | + :label="item.fullName" :value="item.id" /> | |
| 62 | + </el-select> | |
| 63 | + </el-form-item> | |
| 64 | + </el-col> | |
| 65 | + <el-col :span="6"> | |
| 66 | + <el-form-item label="购买类型"> | |
| 67 | + <el-select v-model="query.isMe" placeholder="购买类型" clearable> | |
| 68 | + <el-option v-for="(item, index) in isMeOptions" :key="index" :label="item.fullName" | |
| 69 | + :value="item.id" /> | |
| 70 | + </el-select> | |
| 71 | + </el-form-item> | |
| 72 | + </el-col> | |
| 73 | + <el-col :span="6"> | |
| 74 | + <el-form-item label="赠送人"> | |
| 75 | + <userSelect v-model="query.giveUserId" placeholder="请选择赠送人" /> | |
| 76 | + </el-form-item> | |
| 77 | + </el-col> | |
| 78 | + <el-col :span="6"> | |
| 79 | + <el-form-item label="盲盒券"> | |
| 80 | + <el-select v-model="query.myBoxCouponId" placeholder="盲盒券" clearable> | |
| 81 | + <el-option v-for="(item, index) in myBoxCouponIdOptions" :key="index" | |
| 82 | + :label="item.F_Title" :value="item.F_Id" /> | |
| 83 | + </el-select> | |
| 84 | + </el-form-item> | |
| 85 | + </el-col> | |
| 86 | + </template> | |
| 87 | + <el-col :span="6"> | |
| 88 | + <el-form-item> | |
| 89 | + <el-button type="primary" icon="el-icon-search" @click="search()">查询</el-button> | |
| 90 | + <el-button icon="el-icon-refresh-right" @click="reset()">重置</el-button> | |
| 91 | + <el-button type="text" icon="el-icon-arrow-down" @click="showAll=true" v-if="!showAll">展开 | |
| 92 | + </el-button> | |
| 93 | + <el-button type="text" icon="el-icon-arrow-up" @click="showAll=false" v-else>收起</el-button> | |
| 94 | + </el-form-item> | |
| 95 | + </el-col> | |
| 96 | + </el-form> | |
| 97 | + </el-row> | |
| 98 | + <div class="NCC-common-layout-main NCC-flex-main"> | |
| 99 | + <div class="NCC-common-head"> | |
| 100 | + <div> | |
| 101 | + <el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()">新增</el-button> | |
| 102 | + <el-button type="text" icon="el-icon-download" @click="exportData()">导出</el-button> | |
| 103 | + <el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()">批量删除</el-button> | |
| 104 | + </div> | |
| 105 | + <div class="NCC-common-head-right"> | |
| 106 | + <el-tooltip effect="dark" content="刷新" placement="top"> | |
| 107 | + <el-link icon="icon-ym icon-ym-Refresh NCC-common-head-icon" :underline="false" | |
| 108 | + @click="reset()" /> | |
| 109 | + </el-tooltip> | |
| 110 | + <screenfull isContainer /> | |
| 111 | + </div> | |
| 112 | + </div> | |
| 113 | + <NCC-table v-loading="listLoading" :data="list" has-c @selection-change="handleSelectionChange"> | |
| 114 | + <el-table-column prop="RealName" label="用户" align="left"> | |
| 115 | + <template slot-scope="scope"> | |
| 116 | + {{scope.row.user&&scope.row.user.RealName}} | |
| 117 | + </template> | |
| 118 | + </el-table-column> | |
| 119 | + <el-table-column prop="School" label="学校名称" align="left"> | |
| 120 | + <template slot-scope="scope"> | |
| 121 | + {{scope.row.user&&scope.row.user.School}} | |
| 122 | + </template> | |
| 123 | + </el-table-column> | |
| 124 | + <el-table-column prop="SchoolNumber" label="学号" align="left"> | |
| 125 | + <template slot-scope="scope"> | |
| 126 | + {{scope.row.user&&scope.row.user.SchoolNumber}} | |
| 127 | + </template> | |
| 128 | + </el-table-column> | |
| 129 | + <el-table-column prop="Name" label="提交姓名" align="left" width="100"> | |
| 130 | + <template slot-scope="scope"> | |
| 131 | + {{scope.row.tickets&&scope.row.tickets.Name}} | |
| 132 | + </template> | |
| 133 | + </el-table-column> | |
| 134 | + <el-table-column prop="Phone" label="提交电话号码" align="left" width="100"> | |
| 135 | + <template slot-scope="scope"> | |
| 136 | + {{scope.row.tickets&&scope.row.tickets.Phone}} | |
| 137 | + </template> | |
| 138 | + </el-table-column> | |
| 139 | + <el-table-column prop="IdCard" label="提交身份证号码" align="left" width="110"> | |
| 140 | + <template slot-scope="scope"> | |
| 141 | + {{scope.row.tickets&&scope.row.tickets.IdCard}} | |
| 142 | + </template> | |
| 143 | + </el-table-column> | |
| 144 | + <el-table-column prop="orderNumber" label="订单号" align="left" /> | |
| 145 | + <el-table-column label="路线" prop="type" align="left"> | |
| 146 | + <template slot-scope="scope">{{ scope.row.type | dynamicText(typeOptions) }}</template> | |
| 147 | + </el-table-column> | |
| 148 | + <el-table-column label="地域" prop="Name" align="left"> | |
| 149 | + <template slot-scope="scope">{{ scope.row.area&&scope.row.area.Name}}</template> | |
| 150 | + </el-table-column> | |
| 151 | + <el-table-column label="地域线路" prop="Title" align="left"> | |
| 152 | + <template slot-scope="scope">{{ scope.row.areaLine&&scope.row.areaLine.Title }}</template> | |
| 153 | + </el-table-column> | |
| 154 | + <el-table-column label="人格" prop="Name" align="left"> | |
| 155 | + <template slot-scope="scope">{{ scope.row.mbt&&scope.row.mbt.Name}}</template> | |
| 156 | + </el-table-column> | |
| 157 | + <el-table-column label="人格线路" prop="Title" align="left"> | |
| 158 | + <template slot-scope="scope">{{ scope.row.mbtLine&&scope.row.mbtLine.Name }}</template> | |
| 159 | + </el-table-column> | |
| 160 | + <el-table-column label="状态" prop="status" align="left"> | |
| 161 | + <template slot-scope="scope">{{ scope.row.status | dynamicText(statusOptions) }}</template> | |
| 162 | + </el-table-column> | |
| 163 | + <el-table-column label="购买类型" prop="isMe" align="left"> | |
| 164 | + <template slot-scope="scope">{{ scope.row.isMe | dynamicText(isMeOptions) }}</template> | |
| 165 | + </el-table-column> | |
| 166 | + <el-table-column prop="RealName" label="赠送人" align="left"> | |
| 167 | + <template slot-scope="scope"> | |
| 168 | + {{scope.row.giveUser&&scope.row.giveUser.RealName}} | |
| 169 | + </template> | |
| 170 | + </el-table-column> | |
| 171 | + <el-table-column label="盲盒券" prop="Title" align="left"> | |
| 172 | + <template slot-scope="scope">{{ scope.row.myBoxCoupon&&scope.row.myBoxCoupon.Title }}</template> | |
| 173 | + </el-table-column> | |
| 174 | + <el-table-column prop="creatorTime" label="创建时间" align="left" :formatter="ncc.tableDateFormat" /> | |
| 175 | + <el-table-column prop="lastModifyTime" label="修改时间" align="left" :formatter="ncc.tableDateFormat" /> | |
| 176 | + <el-table-column prop="totalPrice" label="总金额" align="left" /> | |
| 177 | + <el-table-column label="操作" fixed="right" width="100"> | |
| 178 | + <template slot-scope="scope"> | |
| 179 | + <el-button type="text" @click="addOrUpdateHandle(scope.row.id)">编辑</el-button> | |
| 180 | + <el-button type="text" @click="handleDel(scope.row.id)" class="NCC-table-delBtn">删除 | |
| 181 | + </el-button> | |
| 182 | + </template> | |
| 183 | + </el-table-column> | |
| 184 | + </NCC-table> | |
| 185 | + <pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" | |
| 186 | + @pagination="initData" /> | |
| 187 | + </div> | |
| 188 | + </div> | |
| 189 | + <NCC-Form v-if="formVisible" ref="NCCForm" @refresh="refresh" /> | |
| 190 | + <ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" /> | |
| 191 | + </div> | |
| 192 | +</template> | |
| 193 | +<script> | |
| 194 | + import request from '@/utils/request' | |
| 195 | + import { | |
| 196 | + getDictionaryDataSelector | |
| 197 | + } from '@/api/systemData/dictionary' | |
| 198 | + import NCCForm from './Form' | |
| 199 | + import ExportBox from './ExportBox' | |
| 200 | + import { | |
| 201 | + previewDataInterface | |
| 202 | + } from '@/api/systemData/dataInterface' | |
| 203 | + export default { | |
| 204 | + components: { | |
| 205 | + NCCForm, | |
| 206 | + ExportBox | |
| 207 | + }, | |
| 208 | + data() { | |
| 209 | + return { | |
| 210 | + showAll: false, | |
| 211 | + query: { | |
| 212 | + userId: undefined, | |
| 213 | + orderNumber: undefined, | |
| 214 | + type: undefined, | |
| 215 | + areaId: undefined, | |
| 216 | + mbtId: undefined, | |
| 217 | + areaLineId: undefined, | |
| 218 | + mbtLineId: undefined, | |
| 219 | + status: undefined, | |
| 220 | + isMe: undefined, | |
| 221 | + giveUserId: undefined, | |
| 222 | + myBoxCouponId: undefined, | |
| 223 | + }, | |
| 224 | + list: [], | |
| 225 | + listLoading: true, | |
| 226 | + multipleSelection: [], | |
| 227 | + total: 0, | |
| 228 | + listQuery: { | |
| 229 | + currentPage: 1, | |
| 230 | + pageSize: 20, | |
| 231 | + sort: "desc", | |
| 232 | + sidx: "", | |
| 233 | + }, | |
| 234 | + formVisible: false, | |
| 235 | + exportBoxVisible: false, | |
| 236 | + columnList: [{ | |
| 237 | + prop: 'userId', | |
| 238 | + label: '用户' | |
| 239 | + }, | |
| 240 | + { | |
| 241 | + prop: 'orderNumber', | |
| 242 | + label: '订单号' | |
| 243 | + }, | |
| 244 | + { | |
| 245 | + prop: 'type', | |
| 246 | + label: '路线' | |
| 247 | + }, | |
| 248 | + { | |
| 249 | + prop: 'areaId', | |
| 250 | + label: '地域' | |
| 251 | + }, | |
| 252 | + { | |
| 253 | + prop: 'areaLineId', | |
| 254 | + label: '地域线路' | |
| 255 | + }, | |
| 256 | + { | |
| 257 | + prop: 'mbtId', | |
| 258 | + label: '人格' | |
| 259 | + }, | |
| 260 | + { | |
| 261 | + prop: 'mbtLineId', | |
| 262 | + label: '人格线路' | |
| 263 | + }, | |
| 264 | + { | |
| 265 | + prop: 'status', | |
| 266 | + label: '状态' | |
| 267 | + }, | |
| 268 | + { | |
| 269 | + prop: 'isMe', | |
| 270 | + label: '购买类型' | |
| 271 | + }, | |
| 272 | + { | |
| 273 | + prop: 'giveUserId', | |
| 274 | + label: '赠送人' | |
| 275 | + }, | |
| 276 | + { | |
| 277 | + prop: 'myBoxCouponId', | |
| 278 | + label: '盲盒券' | |
| 279 | + }, | |
| 280 | + { | |
| 281 | + prop: 'creatorTime', | |
| 282 | + label: '创建时间' | |
| 283 | + }, | |
| 284 | + { | |
| 285 | + prop: 'lastModifyTime', | |
| 286 | + label: '修改时间' | |
| 287 | + }, | |
| 288 | + { | |
| 289 | + prop: 'totalPrice', | |
| 290 | + label: '总金额' | |
| 291 | + }, | |
| 292 | + ], | |
| 293 | + typeOptions: [{ | |
| 294 | + "fullName": "地域线路", | |
| 295 | + "id": "1" | |
| 296 | + }, { | |
| 297 | + "fullName": "MBT人格线路", | |
| 298 | + "id": "2" | |
| 299 | + }], | |
| 300 | + areaIdOptions: [], | |
| 301 | + areaLineIdOptions: [], | |
| 302 | + mbtIdOptions: [], | |
| 303 | + mbtLineIdOptions: [], | |
| 304 | + statusOptions: [{ | |
| 305 | + "fullName": "未付款", | |
| 306 | + "id": "1" | |
| 307 | + }, { | |
| 308 | + "fullName": "已付款", | |
| 309 | + "id": "2" | |
| 310 | + }], | |
| 311 | + isMeOptions: [{ | |
| 312 | + "fullName": "自己购买", | |
| 313 | + "id": "1" | |
| 314 | + }, { | |
| 315 | + "fullName": "赠送他人", | |
| 316 | + "id": "2" | |
| 317 | + }], | |
| 318 | + myBoxCouponIdOptions: [], | |
| 319 | + } | |
| 320 | + }, | |
| 321 | + computed: {}, | |
| 322 | + created() { | |
| 323 | + this.initData() | |
| 324 | + this.getareaIdOptions(); | |
| 325 | + this.getareaLineIdOptions(); | |
| 326 | + this.getmbtIdOptions(); | |
| 327 | + this.getmbtLineIdOptions(); | |
| 328 | + this.getmyBoxCouponIdOptions(); | |
| 329 | + }, | |
| 330 | + methods: { | |
| 331 | + getareaIdOptions() { | |
| 332 | + previewDataInterface('393301869759300869').then(res => { | |
| 333 | + this.areaIdOptions = res.data | |
| 334 | + }); | |
| 335 | + }, | |
| 336 | + getareaLineIdOptions() { | |
| 337 | + previewDataInterface('393304215318955269').then(res => { | |
| 338 | + this.areaLineIdOptions = res.data | |
| 339 | + }); | |
| 340 | + }, | |
| 341 | + getmbtIdOptions() { | |
| 342 | + previewDataInterface('393308680755348741').then(res => { | |
| 343 | + this.mbtIdOptions = res.data | |
| 344 | + }); | |
| 345 | + }, | |
| 346 | + getmbtLineIdOptions() { | |
| 347 | + previewDataInterface('393728611745531141').then(res => { | |
| 348 | + this.mbtLineIdOptions = res.data | |
| 349 | + }); | |
| 350 | + }, | |
| 351 | + getmyBoxCouponIdOptions() { | |
| 352 | + previewDataInterface('394645492476151045').then(res => { | |
| 353 | + this.myBoxCouponIdOptions = res.data | |
| 354 | + }); | |
| 355 | + }, | |
| 356 | + initData() { | |
| 357 | + this.listLoading = true; | |
| 358 | + let _query = { | |
| 359 | + ...this.listQuery, | |
| 360 | + ...this.query | |
| 361 | + }; | |
| 362 | + let query = {} | |
| 363 | + for (let key in _query) { | |
| 364 | + if (Array.isArray(_query[key])) { | |
| 365 | + query[key] = _query[key].join() | |
| 366 | + } else { | |
| 367 | + query[key] = _query[key] | |
| 368 | + } | |
| 369 | + } | |
| 370 | + request({ | |
| 371 | + url: `/api/Blind/TbBoxOrder`, | |
| 372 | + method: 'GET', | |
| 373 | + data: query | |
| 374 | + }).then(res => { | |
| 375 | + this.list = res.data.list | |
| 376 | + this.total = res.data.pagination.total | |
| 377 | + this.listLoading = false | |
| 378 | + }) | |
| 379 | + }, | |
| 380 | + handleDel(id) { | |
| 381 | + this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', { | |
| 382 | + type: 'warning' | |
| 383 | + }).then(() => { | |
| 384 | + request({ | |
| 385 | + url: `/api/Blind/TbBoxOrder/${id}`, | |
| 386 | + method: 'DELETE' | |
| 387 | + }).then(res => { | |
| 388 | + this.$message({ | |
| 389 | + type: 'success', | |
| 390 | + message: res.msg, | |
| 391 | + onClose: () => { | |
| 392 | + this.initData() | |
| 393 | + } | |
| 394 | + }); | |
| 395 | + }) | |
| 396 | + }).catch(() => {}); | |
| 397 | + }, | |
| 398 | + handleSelectionChange(val) { | |
| 399 | + const res = val.map(item => item.id) | |
| 400 | + this.multipleSelection = res | |
| 401 | + }, | |
| 402 | + handleBatchRemoveDel() { | |
| 403 | + if (!this.multipleSelection.length) { | |
| 404 | + this.$message({ | |
| 405 | + type: 'error', | |
| 406 | + message: '请选择一条数据', | |
| 407 | + duration: 1500, | |
| 408 | + }) | |
| 409 | + return | |
| 410 | + } | |
| 411 | + const ids = this.multipleSelection | |
| 412 | + this.$confirm('您确定要删除这些数据吗, 是否继续?', '提示', { | |
| 413 | + type: 'warning' | |
| 414 | + }).then(() => { | |
| 415 | + request({ | |
| 416 | + url: `/api/Blind/TbBoxOrder/batchRemove`, | |
| 417 | + method: 'POST', | |
| 418 | + data: ids, | |
| 419 | + }).then(res => { | |
| 420 | + this.$message({ | |
| 421 | + type: 'success', | |
| 422 | + message: res.msg, | |
| 423 | + onClose: () => { | |
| 424 | + this.initData() | |
| 425 | + } | |
| 426 | + }); | |
| 427 | + }) | |
| 428 | + }).catch(() => {}) | |
| 429 | + }, | |
| 430 | + addOrUpdateHandle(id, isDetail) { | |
| 431 | + this.formVisible = true | |
| 432 | + this.$nextTick(() => { | |
| 433 | + this.$refs.NCCForm.init(id, isDetail) | |
| 434 | + }) | |
| 435 | + }, | |
| 436 | + exportData() { | |
| 437 | + this.exportBoxVisible = true | |
| 438 | + this.$nextTick(() => { | |
| 439 | + this.$refs.ExportBox.init(this.columnList) | |
| 440 | + }) | |
| 441 | + }, | |
| 442 | + download(data) { | |
| 443 | + let query = { | |
| 444 | + ...data, | |
| 445 | + ...this.listQuery, | |
| 446 | + ...this.query | |
| 447 | + } | |
| 448 | + request({ | |
| 449 | + url: `/api/Blind/TbBoxOrder/Actions/Export`, | |
| 450 | + method: 'GET', | |
| 451 | + data: query | |
| 452 | + }).then(res => { | |
| 453 | + if (!res.data.url) return | |
| 454 | + window.location.href = this.define.comUrl + res.data.url | |
| 455 | + this.$refs.ExportBox.visible = false | |
| 456 | + this.exportBoxVisible = false | |
| 457 | + }) | |
| 458 | + }, | |
| 459 | + search() { | |
| 460 | + this.listQuery = { | |
| 461 | + currentPage: 1, | |
| 462 | + pageSize: 20, | |
| 463 | + sort: "desc", | |
| 464 | + sidx: "", | |
| 465 | + } | |
| 466 | + this.initData() | |
| 467 | + }, | |
| 468 | + refresh(isrRefresh) { | |
| 469 | + this.formVisible = false | |
| 470 | + if (isrRefresh) this.reset() | |
| 471 | + }, | |
| 472 | + reset() { | |
| 473 | + for (let key in this.query) { | |
| 474 | + this.query[key] = undefined | |
| 475 | + } | |
| 476 | + this.listQuery = { | |
| 477 | + currentPage: 1, | |
| 478 | + pageSize: 20, | |
| 479 | + sort: "desc", | |
| 480 | + sidx: "", | |
| 481 | + } | |
| 482 | + this.initData() | |
| 483 | + } | |
| 484 | + } | |
| 485 | + } | |
| 486 | +</script> | ... | ... |
antis-ncc-admin/src/views/tbMbtCharacter/Form.vue
| ... | ... | @@ -89,7 +89,7 @@ |
| 89 | 89 | this.$refs['elForm'].resetFields(); |
| 90 | 90 | if (this.dataForm.id) { |
| 91 | 91 | request({ |
| 92 | - url: '/api/Education/TbMbtCharacter/' + this.dataForm.id, | |
| 92 | + url: '/api/Blind/TbMbtCharacter/' + this.dataForm.id, | |
| 93 | 93 | method: 'get' |
| 94 | 94 | }).then(res =>{ |
| 95 | 95 | this.dataForm = res.data; |
| ... | ... | @@ -102,7 +102,7 @@ |
| 102 | 102 | if (valid) { |
| 103 | 103 | if (!this.dataForm.id) { |
| 104 | 104 | request({ |
| 105 | - url: `/api/Education/TbMbtCharacter`, | |
| 105 | + url: `/api/Blind/TbMbtCharacter`, | |
| 106 | 106 | method: 'post', |
| 107 | 107 | data: this.dataForm, |
| 108 | 108 | }).then((res) => { |
| ... | ... | @@ -118,7 +118,7 @@ |
| 118 | 118 | }) |
| 119 | 119 | } else { |
| 120 | 120 | request({ |
| 121 | - url: '/api/Education/TbMbtCharacter/' + this.dataForm.id, | |
| 121 | + url: '/api/Blind/TbMbtCharacter/' + this.dataForm.id, | |
| 122 | 122 | method: 'PUT', |
| 123 | 123 | data: this.dataForm |
| 124 | 124 | }).then((res) => { | ... | ... |
antis-ncc-admin/src/views/tbMbtCharacter/index.vue
| ... | ... | @@ -99,7 +99,7 @@ |
| 99 | 99 | } |
| 100 | 100 | } |
| 101 | 101 | request({ |
| 102 | - url: `/api/Education/TbMbtCharacter`, | |
| 102 | + url: `/api/Blind/TbMbtCharacter`, | |
| 103 | 103 | method: 'GET', |
| 104 | 104 | data: query |
| 105 | 105 | }).then(res => { |
| ... | ... | @@ -113,7 +113,7 @@ |
| 113 | 113 | type: 'warning' |
| 114 | 114 | }).then(() => { |
| 115 | 115 | request({ |
| 116 | - url: `/api/Education/TbMbtCharacter/${id}`, | |
| 116 | + url: `/api/Blind/TbMbtCharacter/${id}`, | |
| 117 | 117 | method: 'DELETE' |
| 118 | 118 | }).then(res => { |
| 119 | 119 | this.$message({ |
| ... | ... | @@ -145,7 +145,7 @@ |
| 145 | 145 | type: 'warning' |
| 146 | 146 | }).then(() => { |
| 147 | 147 | request({ |
| 148 | - url: `/api/Education/TbMbtCharacter/batchRemove`, | |
| 148 | + url: `/api/Blind/TbMbtCharacter/batchRemove`, | |
| 149 | 149 | method: 'POST', |
| 150 | 150 | data: ids , |
| 151 | 151 | }).then(res => { |
| ... | ... | @@ -174,7 +174,7 @@ |
| 174 | 174 | download(data) { |
| 175 | 175 | let query = { ...data, ...this.listQuery, ...this.query } |
| 176 | 176 | request({ |
| 177 | - url: `/api/Education/TbMbtCharacter/Actions/Export`, | |
| 177 | + url: `/api/Blind/TbMbtCharacter/Actions/Export`, | |
| 178 | 178 | method: 'GET', |
| 179 | 179 | data: query |
| 180 | 180 | }).then(res => { | ... | ... |
antis-ncc-admin/src/views/tbMbtLine/ExportBox.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <el-dialog title="导出数据" :close-on-click-modal="false" :visible.sync="visible" | |
| 3 | + class="NCC-dialog NCC-dialog_center" lock-scroll width="600px"> | |
| 4 | + <el-form label-position="top" label-width="80px"> | |
| 5 | + <el-form-item label="数据选择"> | |
| 6 | + <el-radio-group v-model="type"> | |
| 7 | + <el-radio :label="0">当前页面数据</el-radio> | |
| 8 | + <el-radio :label="1">全部页面数据</el-radio> | |
| 9 | + </el-radio-group> | |
| 10 | + </el-form-item> | |
| 11 | + <el-form-item label="导出字段"> | |
| 12 | + <el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" | |
| 13 | + @change="handleCheckAllChange">全选</el-checkbox> | |
| 14 | + <el-checkbox-group v-model="columns" @change="handleCheckedChange"> | |
| 15 | + <el-checkbox v-for="item in columnList" :label="item.prop" :key="item.prop"> | |
| 16 | + {{item.label}} | |
| 17 | + </el-checkbox> | |
| 18 | + </el-checkbox-group> | |
| 19 | + </el-form-item> | |
| 20 | + </el-form> | |
| 21 | + <span slot="footer" class="dialog-footer"> | |
| 22 | + <el-button @click="visible=false">取 消</el-button> | |
| 23 | + <el-button type="primary" @click="downLoad">导 出</el-button> | |
| 24 | + </span> | |
| 25 | + </el-dialog> | |
| 26 | +</template> | |
| 27 | + | |
| 28 | +<script> | |
| 29 | +export default { | |
| 30 | + data() { | |
| 31 | + return { | |
| 32 | + visible: false, | |
| 33 | + btnLoading: false, | |
| 34 | + type: 0, | |
| 35 | + columns: [], | |
| 36 | + checkAll: true, | |
| 37 | + isIndeterminate: false, | |
| 38 | + columnList: [] | |
| 39 | + } | |
| 40 | + }, | |
| 41 | + methods: { | |
| 42 | + init(columnList) { | |
| 43 | + this.visible = true | |
| 44 | + this.columnList = columnList | |
| 45 | + this.columns = columnList.map(o => o.prop) | |
| 46 | + }, | |
| 47 | + handleCheckAllChange(val) { | |
| 48 | + this.columns = val ? this.columnList.map(o => o.prop) : []; | |
| 49 | + this.isIndeterminate = false; | |
| 50 | + }, | |
| 51 | + handleCheckedChange(value) { | |
| 52 | + let checkedCount = value.length; | |
| 53 | + this.checkAll = checkedCount === this.columnList.length; | |
| 54 | + this.isIndeterminate = checkedCount > 0 && checkedCount < this.columnList.length; | |
| 55 | + }, | |
| 56 | + downLoad() { | |
| 57 | + this.$emit('download', { dataType: this.type, selectKey: this.columns.join(',') }) | |
| 58 | + } | |
| 59 | + } | |
| 60 | +} | |
| 61 | +</script> | |
| 62 | +<style lang="scss" scoped> | |
| 63 | +>>> .el-dialog__body { | |
| 64 | + padding: 20px !important; | |
| 65 | +} | |
| 66 | +</style> | |
| 0 | 67 | \ No newline at end of file | ... | ... |
antis-ncc-admin/src/views/tbMbtLine/Form.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <el-dialog :title="!dataForm.id ? '新建' : isDetail ? '详情':'编辑'" :close-on-click-modal="false" :visible.sync="visible" class="NCC-dialog NCC-dialog_center" lock-scroll width="600px"> | |
| 3 | + <el-row :gutter="15" class="" > | |
| 4 | + <el-form ref="elForm" :model="dataForm" size="small" label-width="100px" label-position="right" :disabled="!!isDetail" :rules="rules"> | |
| 5 | + <el-col :span="24"> | |
| 6 | + <el-form-item label="MBT人格" prop="mbtId"> | |
| 7 | + <el-select v-model="dataForm.mbtId" placeholder="请选择" clearable required :style='{"width":"100%"}' > | |
| 8 | + <el-option v-for="(item, index) in mbtIdOptions" :key="index" :label="item.F_Name" :value="item.F_Id" ></el-option> | |
| 9 | + </el-select> | |
| 10 | + </el-form-item> | |
| 11 | + </el-col> | |
| 12 | + <el-col :span="24"> | |
| 13 | + <el-form-item label="标题" prop="name"> | |
| 14 | + <el-input v-model="dataForm.name" placeholder="请输入" clearable required :style='{"width":"100%"}' > | |
| 15 | + </el-input> | |
| 16 | + </el-form-item> | |
| 17 | + </el-col> | |
| 18 | + <el-col :span="24"> | |
| 19 | + <el-form-item label="线路概况" prop="remark"> | |
| 20 | + <el-input v-model="dataForm.remark" placeholder="请输入" required show-word-limit :style='{"width":"100%"}' type='textarea' :autosize='{"minRows":4,"maxRows":4}' > | |
| 21 | + </el-input> | |
| 22 | + </el-form-item> | |
| 23 | + </el-col> | |
| 24 | + <el-col :span="24"> | |
| 25 | + <el-form-item label="线路图片" prop="banner"> | |
| 26 | + <NCC-UploadImg v-model="dataForm.banner" required :fileSize="5" sizeUnit="MB" :limit="1" > | |
| 27 | + </NCC-UploadImg> | |
| 28 | + </el-form-item> | |
| 29 | + </el-col> | |
| 30 | + <el-col :span="24" v-if="false" > | |
| 31 | + <el-form-item label="创建时间" prop="creatorTime"> | |
| 32 | + <el-input v-model="dataForm.creatorTime" placeholder="系统自动生成" readonly > | |
| 33 | + </el-input> | |
| 34 | + </el-form-item> | |
| 35 | + </el-col> | |
| 36 | + <el-col :span="24" v-if="false" > | |
| 37 | + <el-form-item label="修改时间" prop="lastModifyTime"> | |
| 38 | + <el-input v-model="dataForm.lastModifyTime" placeholder="系统自动生成" readonly > | |
| 39 | + </el-input> | |
| 40 | + </el-form-item> | |
| 41 | + </el-col> | |
| 42 | + </el-form> | |
| 43 | + </el-row> | |
| 44 | + <span slot="footer" class="dialog-footer"> | |
| 45 | + <el-button @click="visible = false">取 消</el-button> | |
| 46 | + <el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail">确 定</el-button> | |
| 47 | + </span> | |
| 48 | + </el-dialog> | |
| 49 | +</template> | |
| 50 | +<script> | |
| 51 | + import request from '@/utils/request' | |
| 52 | + import { getDictionaryDataSelector } from '@/api/systemData/dictionary' | |
| 53 | + import { previewDataInterface } from '@/api/systemData/dataInterface' | |
| 54 | + export default { | |
| 55 | + components: {}, | |
| 56 | + props: [], | |
| 57 | + data() { | |
| 58 | + return { | |
| 59 | + loading: false, | |
| 60 | + visible: false, | |
| 61 | + isDetail: false, | |
| 62 | + dataForm: { | |
| 63 | + id:'', | |
| 64 | + mbtId:undefined, | |
| 65 | + name:undefined, | |
| 66 | + remark:undefined, | |
| 67 | + banner:[], | |
| 68 | + creatorTime:undefined, | |
| 69 | + lastModifyTime:undefined, | |
| 70 | + }, | |
| 71 | + rules: { | |
| 72 | + mbtId:[ | |
| 73 | + { | |
| 74 | + required:true, | |
| 75 | + message:'请输入MBT人格', | |
| 76 | + trigger:'change' | |
| 77 | + }, | |
| 78 | + ], | |
| 79 | + name:[ | |
| 80 | + { | |
| 81 | + required:true, | |
| 82 | + message:'请输入标题', | |
| 83 | + trigger:'blur' | |
| 84 | + }, | |
| 85 | + ], | |
| 86 | + remark:[ | |
| 87 | + { | |
| 88 | + required:true, | |
| 89 | + message:'请输入线路概况', | |
| 90 | + trigger:'blur' | |
| 91 | + }, | |
| 92 | + ], | |
| 93 | + banner:[ | |
| 94 | + { | |
| 95 | + required:true, | |
| 96 | + message:'请输入线路图片', | |
| 97 | + trigger:'click' | |
| 98 | + }, | |
| 99 | + ], | |
| 100 | + }, | |
| 101 | + mbtIdOptions : [], | |
| 102 | + } | |
| 103 | + }, | |
| 104 | + computed: {}, | |
| 105 | + watch: {}, | |
| 106 | + created() { | |
| 107 | + this.getmbtIdOptions(); | |
| 108 | + }, | |
| 109 | + mounted() { | |
| 110 | + }, | |
| 111 | + methods: { | |
| 112 | + getmbtIdOptions(){ | |
| 113 | + previewDataInterface('393308680755348741').then(res => { | |
| 114 | + this.mbtIdOptions = res.data | |
| 115 | + }); | |
| 116 | + }, | |
| 117 | + goBack() { | |
| 118 | + this.$emit('refresh') | |
| 119 | + }, | |
| 120 | + init(id, isDetail) { | |
| 121 | + this.dataForm.id = id || 0; | |
| 122 | + this.visible = true; | |
| 123 | + this.isDetail = isDetail || false; | |
| 124 | + this.$nextTick(() => { | |
| 125 | + this.$refs['elForm'].resetFields(); | |
| 126 | + if (this.dataForm.id) { | |
| 127 | + request({ | |
| 128 | + url: '/api/Blind/TbMbtLine/' + this.dataForm.id, | |
| 129 | + method: 'get' | |
| 130 | + }).then(res =>{ | |
| 131 | + this.dataForm = res.data; | |
| 132 | + if(!this.dataForm.banner)this.dataForm.banner=[]; | |
| 133 | + }) | |
| 134 | + } | |
| 135 | + }) | |
| 136 | + }, | |
| 137 | + dataFormSubmit() { | |
| 138 | + this.$refs['elForm'].validate((valid) => { | |
| 139 | + if (valid) { | |
| 140 | + if (!this.dataForm.id) { | |
| 141 | + request({ | |
| 142 | + url: `/api/Blind/TbMbtLine`, | |
| 143 | + method: 'post', | |
| 144 | + data: this.dataForm, | |
| 145 | + }).then((res) => { | |
| 146 | + this.$message({ | |
| 147 | + message: res.msg, | |
| 148 | + type: 'success', | |
| 149 | + duration: 1000, | |
| 150 | + onClose: () => { | |
| 151 | + this.visible = false, | |
| 152 | + this.$emit('refresh', true) | |
| 153 | + } | |
| 154 | + }) | |
| 155 | + }) | |
| 156 | + } else { | |
| 157 | + request({ | |
| 158 | + url: '/api/Blind/TbMbtLine/' + this.dataForm.id, | |
| 159 | + method: 'PUT', | |
| 160 | + data: this.dataForm | |
| 161 | + }).then((res) => { | |
| 162 | + this.$message({ | |
| 163 | + message: res.msg, | |
| 164 | + type: 'success', | |
| 165 | + duration: 1000, | |
| 166 | + onClose: () => { | |
| 167 | + this.visible = false | |
| 168 | + this.$emit('refresh', true) | |
| 169 | + } | |
| 170 | + }) | |
| 171 | + }) | |
| 172 | + } | |
| 173 | + } | |
| 174 | + }) | |
| 175 | + }, | |
| 176 | + } | |
| 177 | + } | |
| 178 | +</script> | ... | ... |
antis-ncc-admin/src/views/tbMbtLine/index.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <div class="NCC-common-layout"> | |
| 3 | + <div class="NCC-common-layout-center"> | |
| 4 | + <el-row class="NCC-common-search-box" :gutter="16"> | |
| 5 | + <el-form @submit.native.prevent> | |
| 6 | + <el-col :span="6"> | |
| 7 | + <el-form-item label="MBT人格"> | |
| 8 | + <el-select v-model="query.mbtId" placeholder="MBT人格" clearable > | |
| 9 | + <el-option v-for="(item, index) in mbtIdOptions" :key="index" :label="item.F_Name" :value="item.F_Id" /> | |
| 10 | + </el-select> | |
| 11 | + </el-form-item> | |
| 12 | + </el-col> | |
| 13 | + <el-col :span="6"> | |
| 14 | + <el-form-item label="线路概况"> | |
| 15 | + <el-input v-model="query.remark" placeholder="线路概况" /> | |
| 16 | + </el-form-item> | |
| 17 | + </el-col> | |
| 18 | + <el-col :span="6"> | |
| 19 | + <el-form-item label="标题"> | |
| 20 | + <el-input v-model="query.name" placeholder="标题" clearable /> | |
| 21 | + </el-form-item> | |
| 22 | + </el-col> | |
| 23 | + <el-col :span="6"> | |
| 24 | + <el-form-item> | |
| 25 | + <el-button type="primary" icon="el-icon-search" @click="search()">查询</el-button> | |
| 26 | + <el-button icon="el-icon-refresh-right" @click="reset()">重置</el-button> | |
| 27 | + </el-form-item> | |
| 28 | + </el-col> | |
| 29 | + </el-form> | |
| 30 | + </el-row> | |
| 31 | + <div class="NCC-common-layout-main NCC-flex-main"> | |
| 32 | + <div class="NCC-common-head"> | |
| 33 | + <div> | |
| 34 | + <el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()">新增</el-button> | |
| 35 | + <el-button type="text" icon="el-icon-download" @click="exportData()">导出</el-button> | |
| 36 | + <el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()">批量删除</el-button> | |
| 37 | + </div> | |
| 38 | + <div class="NCC-common-head-right"> | |
| 39 | + <el-tooltip effect="dark" content="刷新" placement="top"> | |
| 40 | + <el-link icon="icon-ym icon-ym-Refresh NCC-common-head-icon" :underline="false" @click="reset()" /> | |
| 41 | + </el-tooltip> | |
| 42 | + <screenfull isContainer /> | |
| 43 | + </div> | |
| 44 | + </div> | |
| 45 | + <NCC-table v-loading="listLoading" :data="list" has-c @selection-change="handleSelectionChange"> | |
| 46 | + <el-table-column label="MBT人格" prop="Name" align="left"> | |
| 47 | + <template slot-scope="scope">{{ scope.row.mbt&&scope.row.mbt.Name }}</template> | |
| 48 | + </el-table-column> | |
| 49 | + <el-table-column prop="name" label="标题" align="left" /> | |
| 50 | + <el-table-column prop="remark" label="线路概况" align="left" /> | |
| 51 | + <el-table-column prop="creatorTime" label="创建时间" align="left" :formatter="ncc.tableDateFormat" /> | |
| 52 | + <el-table-column prop="lastModifyTime" label="修改时间" align="left" :formatter="ncc.tableDateFormat" /> | |
| 53 | + <el-table-column label="操作" fixed="right" width="100"> | |
| 54 | + <template slot-scope="scope"> | |
| 55 | + <el-button type="text" @click="addOrUpdateHandle(scope.row.id)" >编辑</el-button> | |
| 56 | + <el-button type="text" @click="handleDel(scope.row.id)" class="NCC-table-delBtn" >删除</el-button> | |
| 57 | + </template> | |
| 58 | + </el-table-column> | |
| 59 | + </NCC-table> | |
| 60 | + <pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initData" /> | |
| 61 | + </div> | |
| 62 | + </div> | |
| 63 | + <NCC-Form v-if="formVisible" ref="NCCForm" @refresh="refresh" /> | |
| 64 | + <ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" /> | |
| 65 | + </div> | |
| 66 | +</template> | |
| 67 | +<script> | |
| 68 | + import request from '@/utils/request' | |
| 69 | + import { getDictionaryDataSelector } from '@/api/systemData/dictionary' | |
| 70 | + import NCCForm from './Form' | |
| 71 | + import ExportBox from './ExportBox' | |
| 72 | + import { previewDataInterface } from '@/api/systemData/dataInterface' | |
| 73 | + export default { | |
| 74 | + components: { NCCForm, ExportBox }, | |
| 75 | + data() { | |
| 76 | + return { | |
| 77 | + showAll: false, | |
| 78 | + query: { | |
| 79 | + mbtId:undefined, | |
| 80 | + remark:undefined, | |
| 81 | + name:undefined, | |
| 82 | + }, | |
| 83 | + list: [], | |
| 84 | + listLoading: true, | |
| 85 | + multipleSelection: [], total: 0, | |
| 86 | + listQuery: { | |
| 87 | + currentPage: 1, | |
| 88 | + pageSize: 20, | |
| 89 | + sort: "desc", | |
| 90 | + sidx: "", | |
| 91 | + }, | |
| 92 | + formVisible: false, | |
| 93 | + exportBoxVisible: false, | |
| 94 | + columnList: [ | |
| 95 | + { prop: 'mbtId', label: 'MBT人格' }, | |
| 96 | + { prop: 'name', label: '标题' }, | |
| 97 | + { prop: 'remark', label: '线路概况' }, | |
| 98 | + { prop: 'creatorTime', label: '创建时间' }, | |
| 99 | + { prop: 'lastModifyTime', label: '修改时间' }, | |
| 100 | + ], | |
| 101 | + mbtIdOptions : [], | |
| 102 | + } | |
| 103 | + }, | |
| 104 | + computed: {}, | |
| 105 | + created() { | |
| 106 | + this.initData() | |
| 107 | + this.getmbtIdOptions(); | |
| 108 | + }, | |
| 109 | + methods: { | |
| 110 | + getmbtIdOptions(){ | |
| 111 | + previewDataInterface('393308680755348741').then(res => { | |
| 112 | + this.mbtIdOptions = res.data | |
| 113 | + }); | |
| 114 | + }, | |
| 115 | + initData() { | |
| 116 | + this.listLoading = true; | |
| 117 | + let _query = { | |
| 118 | + ...this.listQuery, | |
| 119 | + ...this.query | |
| 120 | + }; | |
| 121 | + let query = {} | |
| 122 | + for (let key in _query) { | |
| 123 | + if (Array.isArray(_query[key])) { | |
| 124 | + query[key] = _query[key].join() | |
| 125 | + } else { | |
| 126 | + query[key] = _query[key] | |
| 127 | + } | |
| 128 | + } | |
| 129 | + request({ | |
| 130 | + url: `/api/Blind/TbMbtLine`, | |
| 131 | + method: 'GET', | |
| 132 | + data: query | |
| 133 | + }).then(res => { | |
| 134 | + this.list = res.data.list | |
| 135 | + this.total = res.data.pagination.total | |
| 136 | + this.listLoading = false | |
| 137 | + }) | |
| 138 | + }, | |
| 139 | + handleDel(id) { | |
| 140 | + this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', { | |
| 141 | + type: 'warning' | |
| 142 | + }).then(() => { | |
| 143 | + request({ | |
| 144 | + url: `/api/Blind/TbMbtLine/${id}`, | |
| 145 | + method: 'DELETE' | |
| 146 | + }).then(res => { | |
| 147 | + this.$message({ | |
| 148 | + type: 'success', | |
| 149 | + message: res.msg, | |
| 150 | + onClose: () => { | |
| 151 | + this.initData() | |
| 152 | + } | |
| 153 | + }); | |
| 154 | + }) | |
| 155 | + }).catch(() => { | |
| 156 | + }); | |
| 157 | + }, | |
| 158 | + handleSelectionChange(val) { | |
| 159 | + const res = val.map(item => item.id) | |
| 160 | + this.multipleSelection = res | |
| 161 | + }, | |
| 162 | + handleBatchRemoveDel() { | |
| 163 | + if (!this.multipleSelection.length) { | |
| 164 | + this.$message({ | |
| 165 | + type: 'error', | |
| 166 | + message: '请选择一条数据', | |
| 167 | + duration: 1500, | |
| 168 | + }) | |
| 169 | + return | |
| 170 | + } | |
| 171 | + const ids = this.multipleSelection | |
| 172 | + this.$confirm('您确定要删除这些数据吗, 是否继续?', '提示', { | |
| 173 | + type: 'warning' | |
| 174 | + }).then(() => { | |
| 175 | + request({ | |
| 176 | + url: `/api/Blind/TbMbtLine/batchRemove`, | |
| 177 | + method: 'POST', | |
| 178 | + data: ids , | |
| 179 | + }).then(res => { | |
| 180 | + this.$message({ | |
| 181 | + type: 'success', | |
| 182 | + message: res.msg, | |
| 183 | + onClose: () => { | |
| 184 | + this.initData() | |
| 185 | + } | |
| 186 | + }); | |
| 187 | + }) | |
| 188 | + }).catch(() => { }) | |
| 189 | + }, | |
| 190 | + addOrUpdateHandle(id, isDetail) { | |
| 191 | + this.formVisible = true | |
| 192 | + this.$nextTick(() => { | |
| 193 | + this.$refs.NCCForm.init(id, isDetail) | |
| 194 | + }) | |
| 195 | + }, | |
| 196 | + exportData() { | |
| 197 | + this.exportBoxVisible = true | |
| 198 | + this.$nextTick(() => { | |
| 199 | + this.$refs.ExportBox.init(this.columnList) | |
| 200 | + }) | |
| 201 | + }, | |
| 202 | + download(data) { | |
| 203 | + let query = { ...data, ...this.listQuery, ...this.query } | |
| 204 | + request({ | |
| 205 | + url: `/api/Blind/TbMbtLine/Actions/Export`, | |
| 206 | + method: 'GET', | |
| 207 | + data: query | |
| 208 | + }).then(res => { | |
| 209 | + if (!res.data.url) return | |
| 210 | + window.location.href = this.define.comUrl + res.data.url | |
| 211 | + this.$refs.ExportBox.visible = false | |
| 212 | + this.exportBoxVisible = false | |
| 213 | + }) | |
| 214 | + }, | |
| 215 | + search() { | |
| 216 | + this.listQuery = { | |
| 217 | + currentPage: 1, | |
| 218 | + pageSize: 20, | |
| 219 | + sort: "desc", | |
| 220 | + sidx: "", | |
| 221 | + } | |
| 222 | + this.initData() | |
| 223 | + }, | |
| 224 | + refresh(isrRefresh) { | |
| 225 | + this.formVisible = false | |
| 226 | + if (isrRefresh) this.reset() | |
| 227 | + }, | |
| 228 | + reset() { | |
| 229 | + for (let key in this.query) { | |
| 230 | + this.query[key] = undefined | |
| 231 | + } | |
| 232 | + this.listQuery = { | |
| 233 | + currentPage: 1, | |
| 234 | + pageSize: 20, | |
| 235 | + sort: "desc", | |
| 236 | + sidx: "", | |
| 237 | + } | |
| 238 | + this.initData() | |
| 239 | + } | |
| 240 | + } | |
| 241 | + } | |
| 242 | +</script> | |
| 0 | 243 | \ No newline at end of file | ... | ... |
antis-ncc-admin/src/views/tbMbtLineNode/ExportBox.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <el-dialog title="导出数据" :close-on-click-modal="false" :visible.sync="visible" | |
| 3 | + class="NCC-dialog NCC-dialog_center" lock-scroll width="600px"> | |
| 4 | + <el-form label-position="top" label-width="80px"> | |
| 5 | + <el-form-item label="数据选择"> | |
| 6 | + <el-radio-group v-model="type"> | |
| 7 | + <el-radio :label="0">当前页面数据</el-radio> | |
| 8 | + <el-radio :label="1">全部页面数据</el-radio> | |
| 9 | + </el-radio-group> | |
| 10 | + </el-form-item> | |
| 11 | + <el-form-item label="导出字段"> | |
| 12 | + <el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" | |
| 13 | + @change="handleCheckAllChange">全选</el-checkbox> | |
| 14 | + <el-checkbox-group v-model="columns" @change="handleCheckedChange"> | |
| 15 | + <el-checkbox v-for="item in columnList" :label="item.prop" :key="item.prop"> | |
| 16 | + {{item.label}} | |
| 17 | + </el-checkbox> | |
| 18 | + </el-checkbox-group> | |
| 19 | + </el-form-item> | |
| 20 | + </el-form> | |
| 21 | + <span slot="footer" class="dialog-footer"> | |
| 22 | + <el-button @click="visible=false">取 消</el-button> | |
| 23 | + <el-button type="primary" @click="downLoad">导 出</el-button> | |
| 24 | + </span> | |
| 25 | + </el-dialog> | |
| 26 | +</template> | |
| 27 | + | |
| 28 | +<script> | |
| 29 | +export default { | |
| 30 | + data() { | |
| 31 | + return { | |
| 32 | + visible: false, | |
| 33 | + btnLoading: false, | |
| 34 | + type: 0, | |
| 35 | + columns: [], | |
| 36 | + checkAll: true, | |
| 37 | + isIndeterminate: false, | |
| 38 | + columnList: [] | |
| 39 | + } | |
| 40 | + }, | |
| 41 | + methods: { | |
| 42 | + init(columnList) { | |
| 43 | + this.visible = true | |
| 44 | + this.columnList = columnList | |
| 45 | + this.columns = columnList.map(o => o.prop) | |
| 46 | + }, | |
| 47 | + handleCheckAllChange(val) { | |
| 48 | + this.columns = val ? this.columnList.map(o => o.prop) : []; | |
| 49 | + this.isIndeterminate = false; | |
| 50 | + }, | |
| 51 | + handleCheckedChange(value) { | |
| 52 | + let checkedCount = value.length; | |
| 53 | + this.checkAll = checkedCount === this.columnList.length; | |
| 54 | + this.isIndeterminate = checkedCount > 0 && checkedCount < this.columnList.length; | |
| 55 | + }, | |
| 56 | + downLoad() { | |
| 57 | + this.$emit('download', { dataType: this.type, selectKey: this.columns.join(',') }) | |
| 58 | + } | |
| 59 | + } | |
| 60 | +} | |
| 61 | +</script> | |
| 62 | +<style lang="scss" scoped> | |
| 63 | +>>> .el-dialog__body { | |
| 64 | + padding: 20px !important; | |
| 65 | +} | |
| 66 | +</style> | |
| 0 | 67 | \ No newline at end of file | ... | ... |
antis-ncc-admin/src/views/tbMbtLineNode/Form.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <el-dialog :title="!dataForm.id ? '新建' : isDetail ? '详情':'编辑'" :close-on-click-modal="false" | |
| 3 | + :visible.sync="visible" class="NCC-dialog NCC-dialog_center" lock-scroll width="600px"> | |
| 4 | + <el-row :gutter="15" class=""> | |
| 5 | + <el-form ref="elForm" :model="dataForm" size="small" label-width="100px" label-position="right" | |
| 6 | + :disabled="!!isDetail" :rules="rules"> | |
| 7 | + <el-col :span="24"> | |
| 8 | + <el-form-item label="MBT人格线路" prop="mbtLineId"> | |
| 9 | + <el-select v-model="dataForm.mbtLineId" placeholder="请选择" clearable required | |
| 10 | + :style='{"width":"100%"}'> | |
| 11 | + <el-option v-for="(item, index) in mbtLineIdOptions" :key="index" :label="item.F_Name" | |
| 12 | + :value="item.F_Id"></el-option> | |
| 13 | + </el-select> | |
| 14 | + </el-form-item> | |
| 15 | + </el-col> | |
| 16 | + <el-col :span="24"> | |
| 17 | + <el-form-item label="节点标题" prop="title"> | |
| 18 | + <el-input v-model="dataForm.title" placeholder="请输入" clearable required | |
| 19 | + :style='{"width":"100%"}'> | |
| 20 | + </el-input> | |
| 21 | + </el-form-item> | |
| 22 | + </el-col> | |
| 23 | + <el-col :span="24"> | |
| 24 | + <el-form-item label="节点简介" prop="description"> | |
| 25 | + <el-input v-model="dataForm.description" placeholder="请输入" required show-word-limit | |
| 26 | + :style='{"width":"100%"}' type='textarea' :autosize='{"minRows":4,"maxRows":4}'> | |
| 27 | + </el-input> | |
| 28 | + </el-form-item> | |
| 29 | + </el-col> | |
| 30 | + <el-col :span="24"> | |
| 31 | + <el-form-item label="节点注意事项" prop="remark"> | |
| 32 | + <el-input v-model="dataForm.remark" placeholder="请输入" required show-word-limit | |
| 33 | + :style='{"width":"100%"}' type='textarea' :autosize='{"minRows":4,"maxRows":4}'> | |
| 34 | + </el-input> | |
| 35 | + </el-form-item> | |
| 36 | + </el-col> | |
| 37 | + <el-col :span="24"> | |
| 38 | + <el-form-item label="节点图片" prop="banner"> | |
| 39 | + <NCC-UploadImg v-model="dataForm.banner" required :fileSize="5" sizeUnit="MB" :limit="9"> | |
| 40 | + </NCC-UploadImg> | |
| 41 | + </el-form-item> | |
| 42 | + </el-col> | |
| 43 | + <el-col :span="24"> | |
| 44 | + <el-form-item label="排序" prop="sort"> | |
| 45 | + <el-input-number v-model="dataForm.sorts" placeholder="排序" required :step="1"> | |
| 46 | + </el-input-number> | |
| 47 | + </el-form-item> | |
| 48 | + </el-col> | |
| 49 | + <el-col :span="24" v-if="false"> | |
| 50 | + <el-form-item label="创建时间" prop="creatorTime"> | |
| 51 | + <el-input v-model="dataForm.creatorTime" placeholder="系统自动生成" readonly> | |
| 52 | + </el-input> | |
| 53 | + </el-form-item> | |
| 54 | + </el-col> | |
| 55 | + <el-col :span="24" v-if="false"> | |
| 56 | + <el-form-item label="修改时间" prop="lastModifyTime"> | |
| 57 | + <el-input v-model="dataForm.lastModifyTime" placeholder="系统自动生成" readonly> | |
| 58 | + </el-input> | |
| 59 | + </el-form-item> | |
| 60 | + </el-col> | |
| 61 | + </el-form> | |
| 62 | + </el-row> | |
| 63 | + <span slot="footer" class="dialog-footer"> | |
| 64 | + <el-button @click="visible = false">取 消</el-button> | |
| 65 | + <el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail">确 定</el-button> | |
| 66 | + </span> | |
| 67 | + </el-dialog> | |
| 68 | +</template> | |
| 69 | +<script> | |
| 70 | + import request from '@/utils/request' | |
| 71 | + import { | |
| 72 | + getDictionaryDataSelector | |
| 73 | + } from '@/api/systemData/dictionary' | |
| 74 | + import { | |
| 75 | + previewDataInterface | |
| 76 | + } from '@/api/systemData/dataInterface' | |
| 77 | + export default { | |
| 78 | + components: {}, | |
| 79 | + props: [], | |
| 80 | + data() { | |
| 81 | + return { | |
| 82 | + loading: false, | |
| 83 | + visible: false, | |
| 84 | + isDetail: false, | |
| 85 | + dataForm: { | |
| 86 | + id: '', | |
| 87 | + mbtLineId: undefined, | |
| 88 | + title: undefined, | |
| 89 | + description: undefined, | |
| 90 | + remark: undefined, | |
| 91 | + banner: [], | |
| 92 | + sorts: 1, | |
| 93 | + creatorTime: undefined, | |
| 94 | + lastModifyTime: undefined, | |
| 95 | + }, | |
| 96 | + rules: { | |
| 97 | + mbtLineId: [{ | |
| 98 | + required: true, | |
| 99 | + message: '请输入MBT人格线路', | |
| 100 | + trigger: 'change' | |
| 101 | + }, ], | |
| 102 | + title: [{ | |
| 103 | + required: true, | |
| 104 | + message: '请输入节点标题', | |
| 105 | + trigger: 'blur' | |
| 106 | + }, ], | |
| 107 | + description: [{ | |
| 108 | + required: true, | |
| 109 | + message: '请输入节点简介', | |
| 110 | + trigger: 'blur' | |
| 111 | + }, ], | |
| 112 | + remark: [{ | |
| 113 | + required: true, | |
| 114 | + message: '请输入节点注意事项', | |
| 115 | + trigger: 'blur' | |
| 116 | + }, ], | |
| 117 | + banner: [{ | |
| 118 | + required: true, | |
| 119 | + message: '请输入节点图片', | |
| 120 | + trigger: 'click' | |
| 121 | + }, ], | |
| 122 | + sorts: [{ | |
| 123 | + required: true, | |
| 124 | + message: '请输入排序', | |
| 125 | + trigger: ["blur", "change"] | |
| 126 | + }, ], | |
| 127 | + }, | |
| 128 | + mbtLineIdOptions: [], | |
| 129 | + } | |
| 130 | + }, | |
| 131 | + computed: {}, | |
| 132 | + watch: {}, | |
| 133 | + created() { | |
| 134 | + this.getmbtLineIdOptions(); | |
| 135 | + }, | |
| 136 | + mounted() {}, | |
| 137 | + methods: { | |
| 138 | + getmbtLineIdOptions() { | |
| 139 | + previewDataInterface('393728611745531141').then(res => { | |
| 140 | + this.mbtLineIdOptions = res.data | |
| 141 | + }); | |
| 142 | + }, | |
| 143 | + goBack() { | |
| 144 | + this.$emit('refresh') | |
| 145 | + }, | |
| 146 | + init(id, isDetail) { | |
| 147 | + this.dataForm.id = id || 0; | |
| 148 | + this.visible = true; | |
| 149 | + this.isDetail = isDetail || false; | |
| 150 | + this.$nextTick(() => { | |
| 151 | + this.$refs['elForm'].resetFields(); | |
| 152 | + if (this.dataForm.id) { | |
| 153 | + request({ | |
| 154 | + url: '/api/Blind/TbMbtLineNode/' + this.dataForm.id, | |
| 155 | + method: 'get' | |
| 156 | + }).then(res => { | |
| 157 | + this.dataForm = res.data; | |
| 158 | + if (!this.dataForm.banner) this.dataForm.banner = []; | |
| 159 | + }) | |
| 160 | + } | |
| 161 | + }) | |
| 162 | + }, | |
| 163 | + dataFormSubmit() { | |
| 164 | + this.$refs['elForm'].validate((valid) => { | |
| 165 | + if (valid) { | |
| 166 | + if (!this.dataForm.id) { | |
| 167 | + request({ | |
| 168 | + url: `/api/Blind/TbMbtLineNode`, | |
| 169 | + method: 'post', | |
| 170 | + data: this.dataForm, | |
| 171 | + }).then((res) => { | |
| 172 | + this.$message({ | |
| 173 | + message: res.msg, | |
| 174 | + type: 'success', | |
| 175 | + duration: 1000, | |
| 176 | + onClose: () => { | |
| 177 | + this.visible = false, | |
| 178 | + this.$emit('refresh', true) | |
| 179 | + } | |
| 180 | + }) | |
| 181 | + }) | |
| 182 | + } else { | |
| 183 | + request({ | |
| 184 | + url: '/api/Blind/TbMbtLineNode/' + this.dataForm.id, | |
| 185 | + method: 'PUT', | |
| 186 | + data: this.dataForm | |
| 187 | + }).then((res) => { | |
| 188 | + this.$message({ | |
| 189 | + message: res.msg, | |
| 190 | + type: 'success', | |
| 191 | + duration: 1000, | |
| 192 | + onClose: () => { | |
| 193 | + this.visible = false | |
| 194 | + this.$emit('refresh', true) | |
| 195 | + } | |
| 196 | + }) | |
| 197 | + }) | |
| 198 | + } | |
| 199 | + } | |
| 200 | + }) | |
| 201 | + }, | |
| 202 | + } | |
| 203 | + } | |
| 204 | +</script> | ... | ... |
antis-ncc-admin/src/views/tbMbtLineNode/index.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <div class="NCC-common-layout"> | |
| 3 | + <div class="NCC-common-layout-center"> | |
| 4 | + <el-row class="NCC-common-search-box" :gutter="16"> | |
| 5 | + <el-form @submit.native.prevent> | |
| 6 | + <el-col :span="6"> | |
| 7 | + <el-form-item label="MBT人格线路"> | |
| 8 | + <el-select v-model="query.mbtLineId" placeholder="MBT人格线路" clearable> | |
| 9 | + <el-option v-for="(item, index) in mbtLineIdOptions" :key="index" :label="item.F_Name" | |
| 10 | + :value="item.F_Id" /> | |
| 11 | + </el-select> | |
| 12 | + </el-form-item> | |
| 13 | + </el-col> | |
| 14 | + <el-col :span="6"> | |
| 15 | + <el-form-item label="节点标题"> | |
| 16 | + <el-input v-model="query.title" placeholder="节点标题" clearable /> | |
| 17 | + </el-form-item> | |
| 18 | + </el-col> | |
| 19 | + <el-col :span="6"> | |
| 20 | + <el-form-item label="节点简介"> | |
| 21 | + <el-input v-model="query.description" placeholder="节点简介" /> | |
| 22 | + </el-form-item> | |
| 23 | + </el-col> | |
| 24 | + <template v-if="showAll"> | |
| 25 | + <el-col :span="6"> | |
| 26 | + <el-form-item label="节点注意事项"> | |
| 27 | + <el-input v-model="query.remark" placeholder="节点注意事项" /> | |
| 28 | + </el-form-item> | |
| 29 | + </el-col> | |
| 30 | + </template> | |
| 31 | + <el-col :span="6"> | |
| 32 | + <el-form-item> | |
| 33 | + <el-button type="primary" icon="el-icon-search" @click="search()">查询</el-button> | |
| 34 | + <el-button icon="el-icon-refresh-right" @click="reset()">重置</el-button> | |
| 35 | + <el-button type="text" icon="el-icon-arrow-down" @click="showAll=true" v-if="!showAll">展开 | |
| 36 | + </el-button> | |
| 37 | + <el-button type="text" icon="el-icon-arrow-up" @click="showAll=false" v-else>收起</el-button> | |
| 38 | + </el-form-item> | |
| 39 | + </el-col> | |
| 40 | + </el-form> | |
| 41 | + </el-row> | |
| 42 | + <div class="NCC-common-layout-main NCC-flex-main"> | |
| 43 | + <div class="NCC-common-head"> | |
| 44 | + <div> | |
| 45 | + <el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()">新增</el-button> | |
| 46 | + <el-button type="text" icon="el-icon-download" @click="exportData()">导出</el-button> | |
| 47 | + <el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()">批量删除</el-button> | |
| 48 | + </div> | |
| 49 | + <div class="NCC-common-head-right"> | |
| 50 | + <el-tooltip effect="dark" content="刷新" placement="top"> | |
| 51 | + <el-link icon="icon-ym icon-ym-Refresh NCC-common-head-icon" :underline="false" | |
| 52 | + @click="reset()" /> | |
| 53 | + </el-tooltip> | |
| 54 | + <screenfull isContainer /> | |
| 55 | + </div> | |
| 56 | + </div> | |
| 57 | + <NCC-table v-loading="listLoading" :data="list" has-c @selection-change="handleSelectionChange"> | |
| 58 | + <el-table-column label="MBT人格线路" prop="Name" align="left"> | |
| 59 | + <template slot-scope="scope">{{ scope.row.mbtLine&&scope.row.mbtLine.Name }}</template> | |
| 60 | + </el-table-column> | |
| 61 | + <el-table-column prop="title" label="节点标题" align="left" /> | |
| 62 | + <el-table-column prop="description" label="节点简介" align="left" /> | |
| 63 | + <el-table-column prop="remark" label="节点注意事项" align="left" /> | |
| 64 | + <el-table-column prop="sorts" label="排序" align="left" /> | |
| 65 | + | |
| 66 | + <el-table-column prop="creatorTime" label="创建时间" align="left" :formatter="ncc.tableDateFormat" /> | |
| 67 | + <el-table-column prop="lastModifyTime" label="修改时间" align="left" :formatter="ncc.tableDateFormat" /> | |
| 68 | + <el-table-column label="操作" fixed="right" width="100"> | |
| 69 | + <template slot-scope="scope"> | |
| 70 | + <el-button type="text" @click="addOrUpdateHandle(scope.row.id)">编辑</el-button> | |
| 71 | + <el-button type="text" @click="handleDel(scope.row.id)" class="NCC-table-delBtn">删除 | |
| 72 | + </el-button> | |
| 73 | + </template> | |
| 74 | + </el-table-column> | |
| 75 | + </NCC-table> | |
| 76 | + <pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" | |
| 77 | + @pagination="initData" /> | |
| 78 | + </div> | |
| 79 | + </div> | |
| 80 | + <NCC-Form v-if="formVisible" ref="NCCForm" @refresh="refresh" /> | |
| 81 | + <ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" /> | |
| 82 | + </div> | |
| 83 | +</template> | |
| 84 | +<script> | |
| 85 | + import request from '@/utils/request' | |
| 86 | + import { | |
| 87 | + getDictionaryDataSelector | |
| 88 | + } from '@/api/systemData/dictionary' | |
| 89 | + import NCCForm from './Form' | |
| 90 | + import ExportBox from './ExportBox' | |
| 91 | + import { | |
| 92 | + previewDataInterface | |
| 93 | + } from '@/api/systemData/dataInterface' | |
| 94 | + export default { | |
| 95 | + components: { | |
| 96 | + NCCForm, | |
| 97 | + ExportBox | |
| 98 | + }, | |
| 99 | + data() { | |
| 100 | + return { | |
| 101 | + showAll: false, | |
| 102 | + query: { | |
| 103 | + mbtLineId: undefined, | |
| 104 | + title: undefined, | |
| 105 | + description: undefined, | |
| 106 | + remark: undefined, | |
| 107 | + }, | |
| 108 | + list: [], | |
| 109 | + listLoading: true, | |
| 110 | + multipleSelection: [], | |
| 111 | + total: 0, | |
| 112 | + listQuery: { | |
| 113 | + currentPage: 1, | |
| 114 | + pageSize: 20, | |
| 115 | + sort: "desc", | |
| 116 | + sidx: "", | |
| 117 | + }, | |
| 118 | + formVisible: false, | |
| 119 | + exportBoxVisible: false, | |
| 120 | + columnList: [{ | |
| 121 | + prop: 'mbtLineId', | |
| 122 | + label: 'MBT人格线路' | |
| 123 | + }, | |
| 124 | + { | |
| 125 | + prop: 'title', | |
| 126 | + label: '节点标题' | |
| 127 | + }, | |
| 128 | + { | |
| 129 | + prop: 'description', | |
| 130 | + label: '节点简介' | |
| 131 | + }, | |
| 132 | + { | |
| 133 | + prop: 'remark', | |
| 134 | + label: '节点注意事项' | |
| 135 | + }, | |
| 136 | + { | |
| 137 | + prop: 'creatorTime', | |
| 138 | + label: '创建时间' | |
| 139 | + }, | |
| 140 | + { | |
| 141 | + prop: 'lastModifyTime', | |
| 142 | + label: '修改时间' | |
| 143 | + }, | |
| 144 | + { | |
| 145 | + prop: 'sorts', | |
| 146 | + label: '排序' | |
| 147 | + }, | |
| 148 | + | |
| 149 | + ], | |
| 150 | + mbtLineIdOptions: [], | |
| 151 | + } | |
| 152 | + }, | |
| 153 | + computed: {}, | |
| 154 | + created() { | |
| 155 | + this.initData() | |
| 156 | + this.getmbtLineIdOptions(); | |
| 157 | + }, | |
| 158 | + methods: { | |
| 159 | + getmbtLineIdOptions() { | |
| 160 | + previewDataInterface('393728611745531141').then(res => { | |
| 161 | + this.mbtLineIdOptions = res.data | |
| 162 | + }); | |
| 163 | + }, | |
| 164 | + initData() { | |
| 165 | + this.listLoading = true; | |
| 166 | + let _query = { | |
| 167 | + ...this.listQuery, | |
| 168 | + ...this.query | |
| 169 | + }; | |
| 170 | + let query = {} | |
| 171 | + for (let key in _query) { | |
| 172 | + if (Array.isArray(_query[key])) { | |
| 173 | + query[key] = _query[key].join() | |
| 174 | + } else { | |
| 175 | + query[key] = _query[key] | |
| 176 | + } | |
| 177 | + } | |
| 178 | + request({ | |
| 179 | + url: `/api/Blind/TbMbtLineNode`, | |
| 180 | + method: 'GET', | |
| 181 | + data: query | |
| 182 | + }).then(res => { | |
| 183 | + this.list = res.data.list | |
| 184 | + this.total = res.data.pagination.total | |
| 185 | + this.listLoading = false | |
| 186 | + }) | |
| 187 | + }, | |
| 188 | + handleDel(id) { | |
| 189 | + this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', { | |
| 190 | + type: 'warning' | |
| 191 | + }).then(() => { | |
| 192 | + request({ | |
| 193 | + url: `/api/Blind/TbMbtLineNode/${id}`, | |
| 194 | + method: 'DELETE' | |
| 195 | + }).then(res => { | |
| 196 | + this.$message({ | |
| 197 | + type: 'success', | |
| 198 | + message: res.msg, | |
| 199 | + onClose: () => { | |
| 200 | + this.initData() | |
| 201 | + } | |
| 202 | + }); | |
| 203 | + }) | |
| 204 | + }).catch(() => {}); | |
| 205 | + }, | |
| 206 | + handleSelectionChange(val) { | |
| 207 | + const res = val.map(item => item.id) | |
| 208 | + this.multipleSelection = res | |
| 209 | + }, | |
| 210 | + handleBatchRemoveDel() { | |
| 211 | + if (!this.multipleSelection.length) { | |
| 212 | + this.$message({ | |
| 213 | + type: 'error', | |
| 214 | + message: '请选择一条数据', | |
| 215 | + duration: 1500, | |
| 216 | + }) | |
| 217 | + return | |
| 218 | + } | |
| 219 | + const ids = this.multipleSelection | |
| 220 | + this.$confirm('您确定要删除这些数据吗, 是否继续?', '提示', { | |
| 221 | + type: 'warning' | |
| 222 | + }).then(() => { | |
| 223 | + request({ | |
| 224 | + url: `/api/Blind/TbMbtLineNode/batchRemove`, | |
| 225 | + method: 'POST', | |
| 226 | + data: ids, | |
| 227 | + }).then(res => { | |
| 228 | + this.$message({ | |
| 229 | + type: 'success', | |
| 230 | + message: res.msg, | |
| 231 | + onClose: () => { | |
| 232 | + this.initData() | |
| 233 | + } | |
| 234 | + }); | |
| 235 | + }) | |
| 236 | + }).catch(() => {}) | |
| 237 | + }, | |
| 238 | + addOrUpdateHandle(id, isDetail) { | |
| 239 | + this.formVisible = true | |
| 240 | + this.$nextTick(() => { | |
| 241 | + this.$refs.NCCForm.init(id, isDetail) | |
| 242 | + }) | |
| 243 | + }, | |
| 244 | + exportData() { | |
| 245 | + this.exportBoxVisible = true | |
| 246 | + this.$nextTick(() => { | |
| 247 | + this.$refs.ExportBox.init(this.columnList) | |
| 248 | + }) | |
| 249 | + }, | |
| 250 | + download(data) { | |
| 251 | + let query = { | |
| 252 | + ...data, | |
| 253 | + ...this.listQuery, | |
| 254 | + ...this.query | |
| 255 | + } | |
| 256 | + request({ | |
| 257 | + url: `/api/Blind/TbMbtLineNode/Actions/Export`, | |
| 258 | + method: 'GET', | |
| 259 | + data: query | |
| 260 | + }).then(res => { | |
| 261 | + if (!res.data.url) return | |
| 262 | + window.location.href = this.define.comUrl + res.data.url | |
| 263 | + this.$refs.ExportBox.visible = false | |
| 264 | + this.exportBoxVisible = false | |
| 265 | + }) | |
| 266 | + }, | |
| 267 | + search() { | |
| 268 | + this.listQuery = { | |
| 269 | + currentPage: 1, | |
| 270 | + pageSize: 20, | |
| 271 | + sort: "desc", | |
| 272 | + sidx: "", | |
| 273 | + } | |
| 274 | + this.initData() | |
| 275 | + }, | |
| 276 | + refresh(isrRefresh) { | |
| 277 | + this.formVisible = false | |
| 278 | + if (isrRefresh) this.reset() | |
| 279 | + }, | |
| 280 | + reset() { | |
| 281 | + for (let key in this.query) { | |
| 282 | + this.query[key] = undefined | |
| 283 | + } | |
| 284 | + this.listQuery = { | |
| 285 | + currentPage: 1, | |
| 286 | + pageSize: 20, | |
| 287 | + sort: "desc", | |
| 288 | + sidx: "", | |
| 289 | + } | |
| 290 | + this.initData() | |
| 291 | + } | |
| 292 | + } | |
| 293 | + } | |
| 294 | +</script> | ... | ... |
antis-ncc-admin/src/views/tbMyBoxCoupon/ExportBox.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <el-dialog title="导出数据" :close-on-click-modal="false" :visible.sync="visible" | |
| 3 | + class="NCC-dialog NCC-dialog_center" lock-scroll width="600px"> | |
| 4 | + <el-form label-position="top" label-width="80px"> | |
| 5 | + <el-form-item label="数据选择"> | |
| 6 | + <el-radio-group v-model="type"> | |
| 7 | + <el-radio :label="0">当前页面数据</el-radio> | |
| 8 | + <el-radio :label="1">全部页面数据</el-radio> | |
| 9 | + </el-radio-group> | |
| 10 | + </el-form-item> | |
| 11 | + <el-form-item label="导出字段"> | |
| 12 | + <el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" | |
| 13 | + @change="handleCheckAllChange">全选</el-checkbox> | |
| 14 | + <el-checkbox-group v-model="columns" @change="handleCheckedChange"> | |
| 15 | + <el-checkbox v-for="item in columnList" :label="item.prop" :key="item.prop"> | |
| 16 | + {{item.label}} | |
| 17 | + </el-checkbox> | |
| 18 | + </el-checkbox-group> | |
| 19 | + </el-form-item> | |
| 20 | + </el-form> | |
| 21 | + <span slot="footer" class="dialog-footer"> | |
| 22 | + <el-button @click="visible=false">取 消</el-button> | |
| 23 | + <el-button type="primary" @click="downLoad">导 出</el-button> | |
| 24 | + </span> | |
| 25 | + </el-dialog> | |
| 26 | +</template> | |
| 27 | + | |
| 28 | +<script> | |
| 29 | +export default { | |
| 30 | + data() { | |
| 31 | + return { | |
| 32 | + visible: false, | |
| 33 | + btnLoading: false, | |
| 34 | + type: 0, | |
| 35 | + columns: [], | |
| 36 | + checkAll: true, | |
| 37 | + isIndeterminate: false, | |
| 38 | + columnList: [] | |
| 39 | + } | |
| 40 | + }, | |
| 41 | + methods: { | |
| 42 | + init(columnList) { | |
| 43 | + this.visible = true | |
| 44 | + this.columnList = columnList | |
| 45 | + this.columns = columnList.map(o => o.prop) | |
| 46 | + }, | |
| 47 | + handleCheckAllChange(val) { | |
| 48 | + this.columns = val ? this.columnList.map(o => o.prop) : []; | |
| 49 | + this.isIndeterminate = false; | |
| 50 | + }, | |
| 51 | + handleCheckedChange(value) { | |
| 52 | + let checkedCount = value.length; | |
| 53 | + this.checkAll = checkedCount === this.columnList.length; | |
| 54 | + this.isIndeterminate = checkedCount > 0 && checkedCount < this.columnList.length; | |
| 55 | + }, | |
| 56 | + downLoad() { | |
| 57 | + this.$emit('download', { dataType: this.type, selectKey: this.columns.join(',') }) | |
| 58 | + } | |
| 59 | + } | |
| 60 | +} | |
| 61 | +</script> | |
| 62 | +<style lang="scss" scoped> | |
| 63 | +>>> .el-dialog__body { | |
| 64 | + padding: 20px !important; | |
| 65 | +} | |
| 66 | +</style> | |
| 0 | 67 | \ No newline at end of file | ... | ... |
antis-ncc-admin/src/views/tbMyBoxCoupon/Form.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <el-dialog :title="!dataForm.id ? '新建' : isDetail ? '详情':'编辑'" :close-on-click-modal="false" | |
| 3 | + :visible.sync="visible" class="NCC-dialog NCC-dialog_center" lock-scroll width="600px"> | |
| 4 | + <el-row :gutter="15" class=""> | |
| 5 | + <el-form ref="elForm" :model="dataForm" size="small" label-width="100px" label-position="right" | |
| 6 | + :disabled="!!isDetail" :rules="rules"> | |
| 7 | + <el-col :span="24"> | |
| 8 | + <el-form-item label="标题" prop="title"> | |
| 9 | + <el-input v-model="dataForm.title" placeholder="请输入" clearable required | |
| 10 | + :style='{"width":"100%"}'> | |
| 11 | + </el-input> | |
| 12 | + </el-form-item> | |
| 13 | + </el-col> | |
| 14 | + <el-col :span="24"> | |
| 15 | + <el-form-item label="用户" prop="userId"> | |
| 16 | + <user-select v-model="dataForm.userId" placeholder="请选择" clearable required> | |
| 17 | + </user-select> | |
| 18 | + </el-form-item> | |
| 19 | + </el-col> | |
| 20 | + <el-col :span="24"> | |
| 21 | + <el-form-item label="赠送人" prop="giveUserId"> | |
| 22 | + <user-select v-model="dataForm.giveUserId" placeholder="请选择" clearable required> | |
| 23 | + </user-select> | |
| 24 | + </el-form-item> | |
| 25 | + </el-col> | |
| 26 | + <el-col :span="24"> | |
| 27 | + <el-form-item label="订单" prop="orderId"> | |
| 28 | + <el-select v-model="dataForm.orderId" placeholder="请选择" clearable required | |
| 29 | + :style='{"width":"100%"}'> | |
| 30 | + <el-option v-for="(item, index) in orderIdOptions" :key="index" :label="item.F_OrderNumber" | |
| 31 | + :value="item.F_Id"></el-option> | |
| 32 | + </el-select> | |
| 33 | + </el-form-item> | |
| 34 | + </el-col> | |
| 35 | + <el-col :span="24"> | |
| 36 | + <el-form-item label="类型" prop="type"> | |
| 37 | + <el-select v-model="dataForm.type" placeholder="请选择" clearable required | |
| 38 | + :style='{"width":"100%"}'> | |
| 39 | + <el-option v-for="(item, index) in typeOptions" :key="index" :label="item.fullName" | |
| 40 | + :value="item.id"></el-option> | |
| 41 | + </el-select> | |
| 42 | + </el-form-item> | |
| 43 | + </el-col> | |
| 44 | + <el-col :span="24"> | |
| 45 | + <el-form-item label="备注" prop="remark"> | |
| 46 | + <el-input v-model="dataForm.remark" placeholder="请输入" show-word-limit :style='{"width":"100%"}' | |
| 47 | + type='textarea' :autosize='{"minRows":4,"maxRows":4}'> | |
| 48 | + </el-input> | |
| 49 | + </el-form-item> | |
| 50 | + </el-col> | |
| 51 | + <el-col :span="24" v-if="false"> | |
| 52 | + <el-form-item label="创建时间" prop="creatorTime"> | |
| 53 | + <el-input v-model="dataForm.creatorTime" placeholder="系统自动生成" readonly> | |
| 54 | + </el-input> | |
| 55 | + </el-form-item> | |
| 56 | + </el-col> | |
| 57 | + <el-col :span="24" v-if="false"> | |
| 58 | + <el-form-item label="修改时间" prop="lastModifyTime"> | |
| 59 | + <el-input v-model="dataForm.lastModifyTime" placeholder="系统自动生成" readonly> | |
| 60 | + </el-input> | |
| 61 | + </el-form-item> | |
| 62 | + </el-col> | |
| 63 | + </el-form> | |
| 64 | + </el-row> | |
| 65 | + <span slot="footer" class="dialog-footer"> | |
| 66 | + <el-button @click="visible = false">取 消</el-button> | |
| 67 | + <el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail">确 定</el-button> | |
| 68 | + </span> | |
| 69 | + </el-dialog> | |
| 70 | +</template> | |
| 71 | +<script> | |
| 72 | + import request from '@/utils/request' | |
| 73 | + import { | |
| 74 | + getDictionaryDataSelector | |
| 75 | + } from '@/api/systemData/dictionary' | |
| 76 | + import { | |
| 77 | + previewDataInterface | |
| 78 | + } from '@/api/systemData/dataInterface' | |
| 79 | + export default { | |
| 80 | + components: {}, | |
| 81 | + props: [], | |
| 82 | + data() { | |
| 83 | + return { | |
| 84 | + loading: false, | |
| 85 | + visible: false, | |
| 86 | + isDetail: false, | |
| 87 | + dataForm: { | |
| 88 | + id: '', | |
| 89 | + title: undefined, | |
| 90 | + orderId: undefined, | |
| 91 | + | |
| 92 | + userId: undefined, | |
| 93 | + giveUserId: undefined, | |
| 94 | + type: undefined, | |
| 95 | + remark: undefined, | |
| 96 | + creatorTime: undefined, | |
| 97 | + lastModifyTime: undefined, | |
| 98 | + }, | |
| 99 | + rules: { | |
| 100 | + title: [{ | |
| 101 | + required: true, | |
| 102 | + message: '请输入标题', | |
| 103 | + trigger: 'blur' | |
| 104 | + }, ], | |
| 105 | + userId: [{ | |
| 106 | + required: true, | |
| 107 | + message: '请输入用户', | |
| 108 | + trigger: 'change' | |
| 109 | + }, ], | |
| 110 | + giveUserId: [{ | |
| 111 | + required: true, | |
| 112 | + message: '请输入赠送人', | |
| 113 | + trigger: 'change' | |
| 114 | + }, ], | |
| 115 | + type: [{ | |
| 116 | + required: true, | |
| 117 | + message: '请输入类型', | |
| 118 | + trigger: 'change' | |
| 119 | + }, ], | |
| 120 | + orderId: [{ | |
| 121 | + required: true, | |
| 122 | + message: '请输入订单', | |
| 123 | + trigger: 'change' | |
| 124 | + }, ], | |
| 125 | + }, | |
| 126 | + typeOptions: [{ | |
| 127 | + "fullName": "未使用", | |
| 128 | + "id": "1" | |
| 129 | + }, { | |
| 130 | + "fullName": "已使用", | |
| 131 | + "id": "2" | |
| 132 | + }], | |
| 133 | + orderIdOptions: [], | |
| 134 | + | |
| 135 | + } | |
| 136 | + }, | |
| 137 | + computed: {}, | |
| 138 | + watch: {}, | |
| 139 | + created() { | |
| 140 | + this.getorderIdOptions() | |
| 141 | + }, | |
| 142 | + mounted() {}, | |
| 143 | + methods: { | |
| 144 | + getorderIdOptions() { | |
| 145 | + previewDataInterface('394660105041216773').then(res => { | |
| 146 | + this.orderIdOptions = res.data | |
| 147 | + }); | |
| 148 | + }, | |
| 149 | + goBack() { | |
| 150 | + this.$emit('refresh') | |
| 151 | + }, | |
| 152 | + init(id, isDetail) { | |
| 153 | + this.dataForm.id = id || 0; | |
| 154 | + this.visible = true; | |
| 155 | + this.isDetail = isDetail || false; | |
| 156 | + this.$nextTick(() => { | |
| 157 | + this.$refs['elForm'].resetFields(); | |
| 158 | + if (this.dataForm.id) { | |
| 159 | + request({ | |
| 160 | + url: '/api/Blind/TbMyBoxCoupon/' + this.dataForm.id, | |
| 161 | + method: 'get' | |
| 162 | + }).then(res => { | |
| 163 | + this.dataForm = res.data; | |
| 164 | + }) | |
| 165 | + } | |
| 166 | + }) | |
| 167 | + }, | |
| 168 | + dataFormSubmit() { | |
| 169 | + this.$refs['elForm'].validate((valid) => { | |
| 170 | + if (valid) { | |
| 171 | + if (!this.dataForm.id) { | |
| 172 | + request({ | |
| 173 | + url: `/api/Blind/TbMyBoxCoupon`, | |
| 174 | + method: 'post', | |
| 175 | + data: this.dataForm, | |
| 176 | + }).then((res) => { | |
| 177 | + this.$message({ | |
| 178 | + message: res.msg, | |
| 179 | + type: 'success', | |
| 180 | + duration: 1000, | |
| 181 | + onClose: () => { | |
| 182 | + this.visible = false, | |
| 183 | + this.$emit('refresh', true) | |
| 184 | + } | |
| 185 | + }) | |
| 186 | + }) | |
| 187 | + } else { | |
| 188 | + request({ | |
| 189 | + url: '/api/Blind/TbMyBoxCoupon/' + this.dataForm.id, | |
| 190 | + method: 'PUT', | |
| 191 | + data: this.dataForm | |
| 192 | + }).then((res) => { | |
| 193 | + this.$message({ | |
| 194 | + message: res.msg, | |
| 195 | + type: 'success', | |
| 196 | + duration: 1000, | |
| 197 | + onClose: () => { | |
| 198 | + this.visible = false | |
| 199 | + this.$emit('refresh', true) | |
| 200 | + } | |
| 201 | + }) | |
| 202 | + }) | |
| 203 | + } | |
| 204 | + } | |
| 205 | + }) | |
| 206 | + }, | |
| 207 | + } | |
| 208 | + } | |
| 209 | +</script> | ... | ... |
antis-ncc-admin/src/views/tbMyBoxCoupon/index.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <div class="NCC-common-layout"> | |
| 3 | + <div class="NCC-common-layout-center"> | |
| 4 | + <el-row class="NCC-common-search-box" :gutter="16"> | |
| 5 | + <el-form @submit.native.prevent> | |
| 6 | + <el-col :span="6"> | |
| 7 | + <el-form-item label="用户"> | |
| 8 | + <userSelect v-model="query.userId" placeholder="请选择用户" /> | |
| 9 | + </el-form-item> | |
| 10 | + </el-col> | |
| 11 | + <el-col :span="6"> | |
| 12 | + <el-form-item label="赠送人"> | |
| 13 | + <userSelect v-model="query.giveUserId" placeholder="请选择赠送人" /> | |
| 14 | + </el-form-item> | |
| 15 | + </el-col> | |
| 16 | + <el-col :span="6"> | |
| 17 | + <el-form-item label="类型"> | |
| 18 | + <el-select v-model="query.type" placeholder="类型" clearable> | |
| 19 | + <el-option v-for="(item, index) in typeOptions" :key="index" :label="item.fullName" | |
| 20 | + :value="item.id" /> | |
| 21 | + </el-select> | |
| 22 | + </el-form-item> | |
| 23 | + </el-col> | |
| 24 | + <template v-if="showAll"> | |
| 25 | + <el-col :span="6"> | |
| 26 | + <el-form-item label="订单"> | |
| 27 | + <el-select v-model="query.orderId" placeholder="订单" clearable> | |
| 28 | + <el-option v-for="(item, index) in orderIdOptions" :key="index" | |
| 29 | + :label="item.F_OrderNumber" :value="item.F_Id" /> | |
| 30 | + </el-select> | |
| 31 | + </el-form-item> | |
| 32 | + </el-col> | |
| 33 | + <el-col :span="6"> | |
| 34 | + <el-form-item label="标题"> | |
| 35 | + <el-input v-model="query.title" placeholder="标题" clearable /> | |
| 36 | + </el-form-item> | |
| 37 | + </el-col> | |
| 38 | + <el-col :span="6"> | |
| 39 | + <el-form-item label="备注"> | |
| 40 | + <el-input v-model="query.remark" placeholder="备注" /> | |
| 41 | + </el-form-item> | |
| 42 | + </el-col> | |
| 43 | + </template> | |
| 44 | + <el-col :span="6"> | |
| 45 | + <el-form-item> | |
| 46 | + <el-button type="primary" icon="el-icon-search" @click="search()">查询</el-button> | |
| 47 | + <el-button icon="el-icon-refresh-right" @click="reset()">重置</el-button> | |
| 48 | + <el-button type="text" icon="el-icon-arrow-down" @click="showAll=true" v-if="!showAll">展开 | |
| 49 | + </el-button> | |
| 50 | + <el-button type="text" icon="el-icon-arrow-up" @click="showAll=false" v-else>收起</el-button> | |
| 51 | + </el-form-item> | |
| 52 | + </el-col> | |
| 53 | + </el-form> | |
| 54 | + </el-row> | |
| 55 | + <div class="NCC-common-layout-main NCC-flex-main"> | |
| 56 | + <div class="NCC-common-head"> | |
| 57 | + <div> | |
| 58 | + <el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()">新增</el-button> | |
| 59 | + <el-button type="text" icon="el-icon-download" @click="exportData()">导出</el-button> | |
| 60 | + <el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()">批量删除</el-button> | |
| 61 | + </div> | |
| 62 | + <div class="NCC-common-head-right"> | |
| 63 | + <el-tooltip effect="dark" content="刷新" placement="top"> | |
| 64 | + <el-link icon="icon-ym icon-ym-Refresh NCC-common-head-icon" :underline="false" | |
| 65 | + @click="reset()" /> | |
| 66 | + </el-tooltip> | |
| 67 | + <screenfull isContainer /> | |
| 68 | + </div> | |
| 69 | + </div> | |
| 70 | + <NCC-table v-loading="listLoading" :data="list" has-c @selection-change="handleSelectionChange"> | |
| 71 | + <el-table-column prop="title" label="标题" align="left" /> | |
| 72 | + | |
| 73 | + <el-table-column prop="RealName" label="用户" align="left"> | |
| 74 | + <template slot-scope="scope"> | |
| 75 | + {{scope.row.user&&scope.row.user.RealName}} | |
| 76 | + </template> | |
| 77 | + </el-table-column> | |
| 78 | + <el-table-column prop="RealName" label="赠送人" align="left"> | |
| 79 | + <template slot-scope="scope"> | |
| 80 | + {{scope.row.giveUser&&scope.row.giveUser.RealName}} | |
| 81 | + </template> | |
| 82 | + </el-table-column> | |
| 83 | + <el-table-column label="类型" prop="type" align="left"> | |
| 84 | + <template slot-scope="scope">{{ scope.row.type | dynamicText(typeOptions) }}</template> | |
| 85 | + </el-table-column> | |
| 86 | + <el-table-column label="订单" prop="OrderNumber" align="left"> | |
| 87 | + <template slot-scope="scope">{{ scope.row.order&&scope.row.order.OrderNumber}}</template> | |
| 88 | + </el-table-column> | |
| 89 | + <el-table-column prop="remark" label="备注" align="left" /> | |
| 90 | + <el-table-column prop="creatorTime" label="创建时间" align="left" :formatter="ncc.tableDateFormat" /> | |
| 91 | + <el-table-column prop="lastModifyTime" label="修改时间" align="left" :formatter="ncc.tableDateFormat" /> | |
| 92 | + <el-table-column label="操作" fixed="right" width="100"> | |
| 93 | + <template slot-scope="scope"> | |
| 94 | + <el-button type="text" @click="addOrUpdateHandle(scope.row.id)">编辑</el-button> | |
| 95 | + <el-button type="text" @click="handleDel(scope.row.id)" class="NCC-table-delBtn">删除 | |
| 96 | + </el-button> | |
| 97 | + </template> | |
| 98 | + </el-table-column> | |
| 99 | + </NCC-table> | |
| 100 | + <pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" | |
| 101 | + @pagination="initData" /> | |
| 102 | + </div> | |
| 103 | + </div> | |
| 104 | + <NCC-Form v-if="formVisible" ref="NCCForm" @refresh="refresh" /> | |
| 105 | + <ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" /> | |
| 106 | + </div> | |
| 107 | +</template> | |
| 108 | +<script> | |
| 109 | + import request from '@/utils/request' | |
| 110 | + import { | |
| 111 | + getDictionaryDataSelector | |
| 112 | + } from '@/api/systemData/dictionary' | |
| 113 | + import NCCForm from './Form' | |
| 114 | + import ExportBox from './ExportBox' | |
| 115 | + import { | |
| 116 | + previewDataInterface | |
| 117 | + } from '@/api/systemData/dataInterface' | |
| 118 | + export default { | |
| 119 | + components: { | |
| 120 | + NCCForm, | |
| 121 | + ExportBox | |
| 122 | + }, | |
| 123 | + data() { | |
| 124 | + return { | |
| 125 | + showAll: false, | |
| 126 | + query: { | |
| 127 | + userId: undefined, | |
| 128 | + giveUserId: undefined, | |
| 129 | + type: undefined, | |
| 130 | + remark: undefined, | |
| 131 | + title: undefined, | |
| 132 | + orderId: undefined, | |
| 133 | + | |
| 134 | + | |
| 135 | + }, | |
| 136 | + list: [], | |
| 137 | + listLoading: true, | |
| 138 | + multipleSelection: [], | |
| 139 | + total: 0, | |
| 140 | + listQuery: { | |
| 141 | + currentPage: 1, | |
| 142 | + pageSize: 20, | |
| 143 | + sort: "desc", | |
| 144 | + sidx: "", | |
| 145 | + }, | |
| 146 | + formVisible: false, | |
| 147 | + exportBoxVisible: false, | |
| 148 | + columnList: [{ | |
| 149 | + prop: 'userId', | |
| 150 | + label: '用户' | |
| 151 | + }, | |
| 152 | + { | |
| 153 | + prop: 'giveUserId', | |
| 154 | + label: '赠送人' | |
| 155 | + }, | |
| 156 | + { | |
| 157 | + prop: 'title', | |
| 158 | + label: '标题' | |
| 159 | + }, | |
| 160 | + | |
| 161 | + { | |
| 162 | + prop: 'type', | |
| 163 | + label: '类型' | |
| 164 | + }, | |
| 165 | + { | |
| 166 | + prop: 'remark', | |
| 167 | + label: '备注' | |
| 168 | + }, | |
| 169 | + { | |
| 170 | + prop: 'creatorTime', | |
| 171 | + label: '创建时间' | |
| 172 | + }, | |
| 173 | + { | |
| 174 | + prop: 'lastModifyTime', | |
| 175 | + label: '修改时间' | |
| 176 | + }, { | |
| 177 | + prop: 'orderId', | |
| 178 | + label: '订单' | |
| 179 | + }, | |
| 180 | + | |
| 181 | + ], | |
| 182 | + typeOptions: [{ | |
| 183 | + "fullName": "未使用", | |
| 184 | + "id": "1" | |
| 185 | + }, { | |
| 186 | + "fullName": "已使用", | |
| 187 | + "id": "2" | |
| 188 | + }], | |
| 189 | + orderIdOptions: [], | |
| 190 | + | |
| 191 | + } | |
| 192 | + }, | |
| 193 | + computed: {}, | |
| 194 | + created() { | |
| 195 | + this.initData() | |
| 196 | + this.getorderIdOptions(); | |
| 197 | + | |
| 198 | + }, | |
| 199 | + methods: { | |
| 200 | + getorderIdOptions() { | |
| 201 | + previewDataInterface('394660105041216773').then(res => { | |
| 202 | + this.orderIdOptions = res.data | |
| 203 | + }); | |
| 204 | + }, | |
| 205 | + initData() { | |
| 206 | + this.listLoading = true; | |
| 207 | + let _query = { | |
| 208 | + ...this.listQuery, | |
| 209 | + ...this.query | |
| 210 | + }; | |
| 211 | + let query = {} | |
| 212 | + for (let key in _query) { | |
| 213 | + if (Array.isArray(_query[key])) { | |
| 214 | + query[key] = _query[key].join() | |
| 215 | + } else { | |
| 216 | + query[key] = _query[key] | |
| 217 | + } | |
| 218 | + } | |
| 219 | + request({ | |
| 220 | + url: `/api/Blind/TbMyBoxCoupon`, | |
| 221 | + method: 'GET', | |
| 222 | + data: query | |
| 223 | + }).then(res => { | |
| 224 | + this.list = res.data.list | |
| 225 | + this.total = res.data.pagination.total | |
| 226 | + this.listLoading = false | |
| 227 | + }) | |
| 228 | + }, | |
| 229 | + handleDel(id) { | |
| 230 | + this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', { | |
| 231 | + type: 'warning' | |
| 232 | + }).then(() => { | |
| 233 | + request({ | |
| 234 | + url: `/api/Blind/TbMyBoxCoupon/${id}`, | |
| 235 | + method: 'DELETE' | |
| 236 | + }).then(res => { | |
| 237 | + this.$message({ | |
| 238 | + type: 'success', | |
| 239 | + message: res.msg, | |
| 240 | + onClose: () => { | |
| 241 | + this.initData() | |
| 242 | + } | |
| 243 | + }); | |
| 244 | + }) | |
| 245 | + }).catch(() => {}); | |
| 246 | + }, | |
| 247 | + handleSelectionChange(val) { | |
| 248 | + const res = val.map(item => item.id) | |
| 249 | + this.multipleSelection = res | |
| 250 | + }, | |
| 251 | + handleBatchRemoveDel() { | |
| 252 | + if (!this.multipleSelection.length) { | |
| 253 | + this.$message({ | |
| 254 | + type: 'error', | |
| 255 | + message: '请选择一条数据', | |
| 256 | + duration: 1500, | |
| 257 | + }) | |
| 258 | + return | |
| 259 | + } | |
| 260 | + const ids = this.multipleSelection | |
| 261 | + this.$confirm('您确定要删除这些数据吗, 是否继续?', '提示', { | |
| 262 | + type: 'warning' | |
| 263 | + }).then(() => { | |
| 264 | + request({ | |
| 265 | + url: `/api/Blind/TbMyBoxCoupon/batchRemove`, | |
| 266 | + method: 'POST', | |
| 267 | + data: ids, | |
| 268 | + }).then(res => { | |
| 269 | + this.$message({ | |
| 270 | + type: 'success', | |
| 271 | + message: res.msg, | |
| 272 | + onClose: () => { | |
| 273 | + this.initData() | |
| 274 | + } | |
| 275 | + }); | |
| 276 | + }) | |
| 277 | + }).catch(() => {}) | |
| 278 | + }, | |
| 279 | + addOrUpdateHandle(id, isDetail) { | |
| 280 | + this.formVisible = true | |
| 281 | + this.$nextTick(() => { | |
| 282 | + this.$refs.NCCForm.init(id, isDetail) | |
| 283 | + }) | |
| 284 | + }, | |
| 285 | + exportData() { | |
| 286 | + this.exportBoxVisible = true | |
| 287 | + this.$nextTick(() => { | |
| 288 | + this.$refs.ExportBox.init(this.columnList) | |
| 289 | + }) | |
| 290 | + }, | |
| 291 | + download(data) { | |
| 292 | + let query = { | |
| 293 | + ...data, | |
| 294 | + ...this.listQuery, | |
| 295 | + ...this.query | |
| 296 | + } | |
| 297 | + request({ | |
| 298 | + url: `/api/Blind/TbMyBoxCoupon/Actions/Export`, | |
| 299 | + method: 'GET', | |
| 300 | + data: query | |
| 301 | + }).then(res => { | |
| 302 | + if (!res.data.url) return | |
| 303 | + window.location.href = this.define.comUrl + res.data.url | |
| 304 | + this.$refs.ExportBox.visible = false | |
| 305 | + this.exportBoxVisible = false | |
| 306 | + }) | |
| 307 | + }, | |
| 308 | + search() { | |
| 309 | + this.listQuery = { | |
| 310 | + currentPage: 1, | |
| 311 | + pageSize: 20, | |
| 312 | + sort: "desc", | |
| 313 | + sidx: "", | |
| 314 | + } | |
| 315 | + this.initData() | |
| 316 | + }, | |
| 317 | + refresh(isrRefresh) { | |
| 318 | + this.formVisible = false | |
| 319 | + if (isrRefresh) this.reset() | |
| 320 | + }, | |
| 321 | + reset() { | |
| 322 | + for (let key in this.query) { | |
| 323 | + this.query[key] = undefined | |
| 324 | + } | |
| 325 | + this.listQuery = { | |
| 326 | + currentPage: 1, | |
| 327 | + pageSize: 20, | |
| 328 | + sort: "desc", | |
| 329 | + sidx: "", | |
| 330 | + } | |
| 331 | + this.initData() | |
| 332 | + } | |
| 333 | + } | |
| 334 | + } | |
| 335 | +</script> | ... | ... |
antis-ncc-admin/src/views/tbRecommend/ExportBox.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <el-dialog title="导出数据" :close-on-click-modal="false" :visible.sync="visible" | |
| 3 | + class="NCC-dialog NCC-dialog_center" lock-scroll width="600px"> | |
| 4 | + <el-form label-position="top" label-width="80px"> | |
| 5 | + <el-form-item label="数据选择"> | |
| 6 | + <el-radio-group v-model="type"> | |
| 7 | + <el-radio :label="0">当前页面数据</el-radio> | |
| 8 | + <el-radio :label="1">全部页面数据</el-radio> | |
| 9 | + </el-radio-group> | |
| 10 | + </el-form-item> | |
| 11 | + <el-form-item label="导出字段"> | |
| 12 | + <el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" | |
| 13 | + @change="handleCheckAllChange">全选</el-checkbox> | |
| 14 | + <el-checkbox-group v-model="columns" @change="handleCheckedChange"> | |
| 15 | + <el-checkbox v-for="item in columnList" :label="item.prop" :key="item.prop"> | |
| 16 | + {{item.label}} | |
| 17 | + </el-checkbox> | |
| 18 | + </el-checkbox-group> | |
| 19 | + </el-form-item> | |
| 20 | + </el-form> | |
| 21 | + <span slot="footer" class="dialog-footer"> | |
| 22 | + <el-button @click="visible=false">取 消</el-button> | |
| 23 | + <el-button type="primary" @click="downLoad">导 出</el-button> | |
| 24 | + </span> | |
| 25 | + </el-dialog> | |
| 26 | +</template> | |
| 27 | + | |
| 28 | +<script> | |
| 29 | +export default { | |
| 30 | + data() { | |
| 31 | + return { | |
| 32 | + visible: false, | |
| 33 | + btnLoading: false, | |
| 34 | + type: 0, | |
| 35 | + columns: [], | |
| 36 | + checkAll: true, | |
| 37 | + isIndeterminate: false, | |
| 38 | + columnList: [] | |
| 39 | + } | |
| 40 | + }, | |
| 41 | + methods: { | |
| 42 | + init(columnList) { | |
| 43 | + this.visible = true | |
| 44 | + this.columnList = columnList | |
| 45 | + this.columns = columnList.map(o => o.prop) | |
| 46 | + }, | |
| 47 | + handleCheckAllChange(val) { | |
| 48 | + this.columns = val ? this.columnList.map(o => o.prop) : []; | |
| 49 | + this.isIndeterminate = false; | |
| 50 | + }, | |
| 51 | + handleCheckedChange(value) { | |
| 52 | + let checkedCount = value.length; | |
| 53 | + this.checkAll = checkedCount === this.columnList.length; | |
| 54 | + this.isIndeterminate = checkedCount > 0 && checkedCount < this.columnList.length; | |
| 55 | + }, | |
| 56 | + downLoad() { | |
| 57 | + this.$emit('download', { dataType: this.type, selectKey: this.columns.join(',') }) | |
| 58 | + } | |
| 59 | + } | |
| 60 | +} | |
| 61 | +</script> | |
| 62 | +<style lang="scss" scoped> | |
| 63 | +>>> .el-dialog__body { | |
| 64 | + padding: 20px !important; | |
| 65 | +} | |
| 66 | +</style> | |
| 0 | 67 | \ No newline at end of file | ... | ... |
antis-ncc-admin/src/views/tbRecommend/Form.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <el-dialog :title="!dataForm.id ? '新建' : isDetail ? '详情':'编辑'" :close-on-click-modal="false" :visible.sync="visible" class="NCC-dialog NCC-dialog_center" lock-scroll width="600px"> | |
| 3 | + <el-row :gutter="15" class="" > | |
| 4 | + <el-form ref="elForm" :model="dataForm" size="small" label-width="100px" label-position="right" :disabled="!!isDetail" :rules="rules"> | |
| 5 | + <el-col :span="24"> | |
| 6 | + <el-form-item label="介绍内容" prop="editors"> | |
| 7 | + <NCC-Quill v-model="dataForm.editors" placeholder="请输入内容..." required > | |
| 8 | + </NCC-Quill> | |
| 9 | + </el-form-item> | |
| 10 | + </el-col> | |
| 11 | + <el-col :span="24" v-if="false" > | |
| 12 | + <el-form-item label="创建时间" prop="creatorTime"> | |
| 13 | + <el-input v-model="dataForm.creatorTime" placeholder="系统自动生成" readonly > | |
| 14 | + </el-input> | |
| 15 | + </el-form-item> | |
| 16 | + </el-col> | |
| 17 | + <el-col :span="24" v-if="false" > | |
| 18 | + <el-form-item label="修改时间" prop="lastModifyTime"> | |
| 19 | + <el-input v-model="dataForm.lastModifyTime" placeholder="系统自动生成" readonly > | |
| 20 | + </el-input> | |
| 21 | + </el-form-item> | |
| 22 | + </el-col> | |
| 23 | + </el-form> | |
| 24 | + </el-row> | |
| 25 | + <span slot="footer" class="dialog-footer"> | |
| 26 | + <el-button @click="visible = false">取 消</el-button> | |
| 27 | + <el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail">确 定</el-button> | |
| 28 | + </span> | |
| 29 | + </el-dialog> | |
| 30 | +</template> | |
| 31 | +<script> | |
| 32 | + import request from '@/utils/request' | |
| 33 | + import { getDictionaryDataSelector } from '@/api/systemData/dictionary' | |
| 34 | + import { previewDataInterface } from '@/api/systemData/dataInterface' | |
| 35 | + export default { | |
| 36 | + components: {}, | |
| 37 | + props: [], | |
| 38 | + data() { | |
| 39 | + return { | |
| 40 | + loading: false, | |
| 41 | + visible: false, | |
| 42 | + isDetail: false, | |
| 43 | + dataForm: { | |
| 44 | + id:'', | |
| 45 | + editors:undefined, | |
| 46 | + creatorTime:undefined, | |
| 47 | + lastModifyTime:undefined, | |
| 48 | + }, | |
| 49 | + rules: { | |
| 50 | + editors:[ | |
| 51 | + { | |
| 52 | + required:true, | |
| 53 | + message:'请输入介绍内容', | |
| 54 | + trigger:'blur' | |
| 55 | + }, | |
| 56 | + ], | |
| 57 | + }, | |
| 58 | + } | |
| 59 | + }, | |
| 60 | + computed: {}, | |
| 61 | + watch: {}, | |
| 62 | + created() { | |
| 63 | + }, | |
| 64 | + mounted() { | |
| 65 | + }, | |
| 66 | + methods: { | |
| 67 | + goBack() { | |
| 68 | + this.$emit('refresh') | |
| 69 | + }, | |
| 70 | + init(id, isDetail) { | |
| 71 | + this.dataForm.id = id || 0; | |
| 72 | + this.visible = true; | |
| 73 | + this.isDetail = isDetail || false; | |
| 74 | + this.$nextTick(() => { | |
| 75 | + this.$refs['elForm'].resetFields(); | |
| 76 | + if (this.dataForm.id) { | |
| 77 | + request({ | |
| 78 | + url: '/api/Blind/TbRecommend/' + this.dataForm.id, | |
| 79 | + method: 'get' | |
| 80 | + }).then(res =>{ | |
| 81 | + this.dataForm = res.data; | |
| 82 | + }) | |
| 83 | + } | |
| 84 | + }) | |
| 85 | + }, | |
| 86 | + dataFormSubmit() { | |
| 87 | + this.$refs['elForm'].validate((valid) => { | |
| 88 | + if (valid) { | |
| 89 | + if (!this.dataForm.id) { | |
| 90 | + request({ | |
| 91 | + url: `/api/Blind/TbRecommend`, | |
| 92 | + method: 'post', | |
| 93 | + data: this.dataForm, | |
| 94 | + }).then((res) => { | |
| 95 | + this.$message({ | |
| 96 | + message: res.msg, | |
| 97 | + type: 'success', | |
| 98 | + duration: 1000, | |
| 99 | + onClose: () => { | |
| 100 | + this.visible = false, | |
| 101 | + this.$emit('refresh', true) | |
| 102 | + } | |
| 103 | + }) | |
| 104 | + }) | |
| 105 | + } else { | |
| 106 | + request({ | |
| 107 | + url: '/api/Blind/TbRecommend/' + this.dataForm.id, | |
| 108 | + method: 'PUT', | |
| 109 | + data: this.dataForm | |
| 110 | + }).then((res) => { | |
| 111 | + this.$message({ | |
| 112 | + message: res.msg, | |
| 113 | + type: 'success', | |
| 114 | + duration: 1000, | |
| 115 | + onClose: () => { | |
| 116 | + this.visible = false | |
| 117 | + this.$emit('refresh', true) | |
| 118 | + } | |
| 119 | + }) | |
| 120 | + }) | |
| 121 | + } | |
| 122 | + } | |
| 123 | + }) | |
| 124 | + }, | |
| 125 | + } | |
| 126 | + } | |
| 127 | +</script> | ... | ... |
antis-ncc-admin/src/views/tbRecommend/index.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <div class="NCC-common-layout"> | |
| 3 | + <div class="NCC-common-layout-center"> | |
| 4 | + <el-row class="NCC-common-search-box" :gutter="16"> | |
| 5 | + <el-form @submit.native.prevent> | |
| 6 | + <el-col :span="6"> | |
| 7 | + <el-form-item> | |
| 8 | + <el-button type="primary" icon="el-icon-search" @click="search()">查询</el-button> | |
| 9 | + <el-button icon="el-icon-refresh-right" @click="reset()">重置</el-button> | |
| 10 | + </el-form-item> | |
| 11 | + </el-col> | |
| 12 | + </el-form> | |
| 13 | + </el-row> | |
| 14 | + <div class="NCC-common-layout-main NCC-flex-main"> | |
| 15 | + <div class="NCC-common-head"> | |
| 16 | + <div> | |
| 17 | + <el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()">新增</el-button> | |
| 18 | + <el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()">批量删除</el-button> | |
| 19 | + </div> | |
| 20 | + <div class="NCC-common-head-right"> | |
| 21 | + <el-tooltip effect="dark" content="刷新" placement="top"> | |
| 22 | + <el-link icon="icon-ym icon-ym-Refresh NCC-common-head-icon" :underline="false" @click="reset()" /> | |
| 23 | + </el-tooltip> | |
| 24 | + <screenfull isContainer /> | |
| 25 | + </div> | |
| 26 | + </div> | |
| 27 | + <NCC-table v-loading="listLoading" :data="list" has-c @selection-change="handleSelectionChange"> | |
| 28 | + <el-table-column prop="creatorTime" label="创建时间" align="left" :formatter="ncc.tableDateFormat" /> | |
| 29 | + <el-table-column prop="lastModifyTime" label="修改时间" align="left" :formatter="ncc.tableDateFormat" /> | |
| 30 | + <el-table-column label="操作" fixed="right" width="100"> | |
| 31 | + <template slot-scope="scope"> | |
| 32 | + <el-button type="text" @click="addOrUpdateHandle(scope.row.id)" >编辑</el-button> | |
| 33 | + <el-button type="text" @click="handleDel(scope.row.id)" class="NCC-table-delBtn" >删除</el-button> | |
| 34 | + </template> | |
| 35 | + </el-table-column> | |
| 36 | + </NCC-table> | |
| 37 | + <pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initData" /> | |
| 38 | + </div> | |
| 39 | + </div> | |
| 40 | + <NCC-Form v-if="formVisible" ref="NCCForm" @refresh="refresh" /> | |
| 41 | + <ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" /> | |
| 42 | + </div> | |
| 43 | +</template> | |
| 44 | +<script> | |
| 45 | + import request from '@/utils/request' | |
| 46 | + import { getDictionaryDataSelector } from '@/api/systemData/dictionary' | |
| 47 | + import NCCForm from './Form' | |
| 48 | + import ExportBox from './ExportBox' | |
| 49 | + import { previewDataInterface } from '@/api/systemData/dataInterface' | |
| 50 | + export default { | |
| 51 | + components: { NCCForm, ExportBox }, | |
| 52 | + data() { | |
| 53 | + return { | |
| 54 | + query: { | |
| 55 | + }, | |
| 56 | + list: [], | |
| 57 | + listLoading: true, | |
| 58 | + multipleSelection: [], total: 0, | |
| 59 | + listQuery: { | |
| 60 | + currentPage: 1, | |
| 61 | + pageSize: 20, | |
| 62 | + sort: "desc", | |
| 63 | + sidx: "", | |
| 64 | + }, | |
| 65 | + formVisible: false, | |
| 66 | + exportBoxVisible: false, | |
| 67 | + columnList: [ | |
| 68 | + { prop: 'creatorTime', label: '创建时间' }, | |
| 69 | + { prop: 'lastModifyTime', label: '修改时间' }, | |
| 70 | + ], | |
| 71 | + } | |
| 72 | + }, | |
| 73 | + computed: {}, | |
| 74 | + created() { | |
| 75 | + this.initData() | |
| 76 | + }, | |
| 77 | + methods: { | |
| 78 | + initData() { | |
| 79 | + this.listLoading = true; | |
| 80 | + let _query = { | |
| 81 | + ...this.listQuery, | |
| 82 | + ...this.query | |
| 83 | + }; | |
| 84 | + let query = {} | |
| 85 | + for (let key in _query) { | |
| 86 | + if (Array.isArray(_query[key])) { | |
| 87 | + query[key] = _query[key].join() | |
| 88 | + } else { | |
| 89 | + query[key] = _query[key] | |
| 90 | + } | |
| 91 | + } | |
| 92 | + request({ | |
| 93 | + url: `/api/Blind/TbRecommend`, | |
| 94 | + method: 'GET', | |
| 95 | + data: query | |
| 96 | + }).then(res => { | |
| 97 | + this.list = res.data.list | |
| 98 | + this.total = res.data.pagination.total | |
| 99 | + this.listLoading = false | |
| 100 | + }) | |
| 101 | + }, | |
| 102 | + handleDel(id) { | |
| 103 | + this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', { | |
| 104 | + type: 'warning' | |
| 105 | + }).then(() => { | |
| 106 | + request({ | |
| 107 | + url: `/api/Blind/TbRecommend/${id}`, | |
| 108 | + method: 'DELETE' | |
| 109 | + }).then(res => { | |
| 110 | + this.$message({ | |
| 111 | + type: 'success', | |
| 112 | + message: res.msg, | |
| 113 | + onClose: () => { | |
| 114 | + this.initData() | |
| 115 | + } | |
| 116 | + }); | |
| 117 | + }) | |
| 118 | + }).catch(() => { | |
| 119 | + }); | |
| 120 | + }, | |
| 121 | + handleSelectionChange(val) { | |
| 122 | + const res = val.map(item => item.id) | |
| 123 | + this.multipleSelection = res | |
| 124 | + }, | |
| 125 | + handleBatchRemoveDel() { | |
| 126 | + if (!this.multipleSelection.length) { | |
| 127 | + this.$message({ | |
| 128 | + type: 'error', | |
| 129 | + message: '请选择一条数据', | |
| 130 | + duration: 1500, | |
| 131 | + }) | |
| 132 | + return | |
| 133 | + } | |
| 134 | + const ids = this.multipleSelection | |
| 135 | + this.$confirm('您确定要删除这些数据吗, 是否继续?', '提示', { | |
| 136 | + type: 'warning' | |
| 137 | + }).then(() => { | |
| 138 | + request({ | |
| 139 | + url: `/api/Blind/TbRecommend/batchRemove`, | |
| 140 | + method: 'POST', | |
| 141 | + data: ids , | |
| 142 | + }).then(res => { | |
| 143 | + this.$message({ | |
| 144 | + type: 'success', | |
| 145 | + message: res.msg, | |
| 146 | + onClose: () => { | |
| 147 | + this.initData() | |
| 148 | + } | |
| 149 | + }); | |
| 150 | + }) | |
| 151 | + }).catch(() => { }) | |
| 152 | + }, | |
| 153 | + addOrUpdateHandle(id, isDetail) { | |
| 154 | + this.formVisible = true | |
| 155 | + this.$nextTick(() => { | |
| 156 | + this.$refs.NCCForm.init(id, isDetail) | |
| 157 | + }) | |
| 158 | + }, | |
| 159 | + search() { | |
| 160 | + this.listQuery = { | |
| 161 | + currentPage: 1, | |
| 162 | + pageSize: 20, | |
| 163 | + sort: "desc", | |
| 164 | + sidx: "", | |
| 165 | + } | |
| 166 | + this.initData() | |
| 167 | + }, | |
| 168 | + refresh(isrRefresh) { | |
| 169 | + this.formVisible = false | |
| 170 | + if (isrRefresh) this.reset() | |
| 171 | + }, | |
| 172 | + reset() { | |
| 173 | + for (let key in this.query) { | |
| 174 | + this.query[key] = undefined | |
| 175 | + } | |
| 176 | + this.listQuery = { | |
| 177 | + currentPage: 1, | |
| 178 | + pageSize: 20, | |
| 179 | + sort: "desc", | |
| 180 | + sidx: "", | |
| 181 | + } | |
| 182 | + this.initData() | |
| 183 | + } | |
| 184 | + } | |
| 185 | + } | |
| 186 | +</script> | |
| 0 | 187 | \ No newline at end of file | ... | ... |
antis-ncc-admin/src/views/tbSettingPrice/ExportBox.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <el-dialog title="导出数据" :close-on-click-modal="false" :visible.sync="visible" | |
| 3 | + class="NCC-dialog NCC-dialog_center" lock-scroll width="600px"> | |
| 4 | + <el-form label-position="top" label-width="80px"> | |
| 5 | + <el-form-item label="数据选择"> | |
| 6 | + <el-radio-group v-model="type"> | |
| 7 | + <el-radio :label="0">当前页面数据</el-radio> | |
| 8 | + <el-radio :label="1">全部页面数据</el-radio> | |
| 9 | + </el-radio-group> | |
| 10 | + </el-form-item> | |
| 11 | + <el-form-item label="导出字段"> | |
| 12 | + <el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" | |
| 13 | + @change="handleCheckAllChange">全选</el-checkbox> | |
| 14 | + <el-checkbox-group v-model="columns" @change="handleCheckedChange"> | |
| 15 | + <el-checkbox v-for="item in columnList" :label="item.prop" :key="item.prop"> | |
| 16 | + {{item.label}} | |
| 17 | + </el-checkbox> | |
| 18 | + </el-checkbox-group> | |
| 19 | + </el-form-item> | |
| 20 | + </el-form> | |
| 21 | + <span slot="footer" class="dialog-footer"> | |
| 22 | + <el-button @click="visible=false">取 消</el-button> | |
| 23 | + <el-button type="primary" @click="downLoad">导 出</el-button> | |
| 24 | + </span> | |
| 25 | + </el-dialog> | |
| 26 | +</template> | |
| 27 | + | |
| 28 | +<script> | |
| 29 | +export default { | |
| 30 | + data() { | |
| 31 | + return { | |
| 32 | + visible: false, | |
| 33 | + btnLoading: false, | |
| 34 | + type: 0, | |
| 35 | + columns: [], | |
| 36 | + checkAll: true, | |
| 37 | + isIndeterminate: false, | |
| 38 | + columnList: [] | |
| 39 | + } | |
| 40 | + }, | |
| 41 | + methods: { | |
| 42 | + init(columnList) { | |
| 43 | + this.visible = true | |
| 44 | + this.columnList = columnList | |
| 45 | + this.columns = columnList.map(o => o.prop) | |
| 46 | + }, | |
| 47 | + handleCheckAllChange(val) { | |
| 48 | + this.columns = val ? this.columnList.map(o => o.prop) : []; | |
| 49 | + this.isIndeterminate = false; | |
| 50 | + }, | |
| 51 | + handleCheckedChange(value) { | |
| 52 | + let checkedCount = value.length; | |
| 53 | + this.checkAll = checkedCount === this.columnList.length; | |
| 54 | + this.isIndeterminate = checkedCount > 0 && checkedCount < this.columnList.length; | |
| 55 | + }, | |
| 56 | + downLoad() { | |
| 57 | + this.$emit('download', { dataType: this.type, selectKey: this.columns.join(',') }) | |
| 58 | + } | |
| 59 | + } | |
| 60 | +} | |
| 61 | +</script> | |
| 62 | +<style lang="scss" scoped> | |
| 63 | +>>> .el-dialog__body { | |
| 64 | + padding: 20px !important; | |
| 65 | +} | |
| 66 | +</style> | |
| 0 | 67 | \ No newline at end of file | ... | ... |
antis-ncc-admin/src/views/tbSettingPrice/Form.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <el-dialog :title="!dataForm.id ? '新建' : isDetail ? '详情':'编辑'" :close-on-click-modal="false" :visible.sync="visible" class="NCC-dialog NCC-dialog_center" lock-scroll width="600px"> | |
| 3 | + <el-row :gutter="15" class="" > | |
| 4 | + <el-form ref="elForm" :model="dataForm" size="small" label-width="100px" label-position="right" :disabled="!!isDetail" :rules="rules"> | |
| 5 | + <el-col :span="24"> | |
| 6 | + <el-form-item label="价格" prop="price"> | |
| 7 | + <el-input v-model="dataForm.price" placeholder="请输入" clearable required :style='{"width":"100%"}' > | |
| 8 | + </el-input> | |
| 9 | + </el-form-item> | |
| 10 | + </el-col> | |
| 11 | + <el-col :span="24"> | |
| 12 | + <el-form-item label="类型" prop="type"> | |
| 13 | + <el-select v-model="dataForm.type" placeholder="请选择" clearable required :style='{"width":"100%"}' > | |
| 14 | + <el-option v-for="(item, index) in typeOptions" :key="index" :label="item.fullName" :value="item.id" ></el-option> | |
| 15 | + </el-select> | |
| 16 | + </el-form-item> | |
| 17 | + </el-col> | |
| 18 | + <el-col :span="24" v-if="false" > | |
| 19 | + <el-form-item label="创建时间" prop="creatorTime"> | |
| 20 | + <el-input v-model="dataForm.creatorTime" placeholder="系统自动生成" readonly > | |
| 21 | + </el-input> | |
| 22 | + </el-form-item> | |
| 23 | + </el-col> | |
| 24 | + <el-col :span="24" v-if="false" > | |
| 25 | + <el-form-item label="修改时间" prop="lastModifyTime"> | |
| 26 | + <el-input v-model="dataForm.lastModifyTime" placeholder="系统自动生成" readonly > | |
| 27 | + </el-input> | |
| 28 | + </el-form-item> | |
| 29 | + </el-col> | |
| 30 | + </el-form> | |
| 31 | + </el-row> | |
| 32 | + <span slot="footer" class="dialog-footer"> | |
| 33 | + <el-button @click="visible = false">取 消</el-button> | |
| 34 | + <el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail">确 定</el-button> | |
| 35 | + </span> | |
| 36 | + </el-dialog> | |
| 37 | +</template> | |
| 38 | +<script> | |
| 39 | + import request from '@/utils/request' | |
| 40 | + import { getDictionaryDataSelector } from '@/api/systemData/dictionary' | |
| 41 | + import { previewDataInterface } from '@/api/systemData/dataInterface' | |
| 42 | + export default { | |
| 43 | + components: {}, | |
| 44 | + props: [], | |
| 45 | + data() { | |
| 46 | + return { | |
| 47 | + loading: false, | |
| 48 | + visible: false, | |
| 49 | + isDetail: false, | |
| 50 | + dataForm: { | |
| 51 | + id:'', | |
| 52 | + price:undefined, | |
| 53 | + type:undefined, | |
| 54 | + creatorTime:undefined, | |
| 55 | + lastModifyTime:undefined, | |
| 56 | + }, | |
| 57 | + rules: { | |
| 58 | + price:[ | |
| 59 | + { | |
| 60 | + required:true, | |
| 61 | + message:'请输入价格', | |
| 62 | + trigger:'blur' | |
| 63 | + }, | |
| 64 | + { | |
| 65 | + pattern:/^[1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0$/, | |
| 66 | + message:'请输入正确的金额', | |
| 67 | + trigger:'blur' | |
| 68 | + }, | |
| 69 | + ], | |
| 70 | + type:[ | |
| 71 | + { | |
| 72 | + required:true, | |
| 73 | + message:'请输入类型', | |
| 74 | + trigger:'change' | |
| 75 | + }, | |
| 76 | + ], | |
| 77 | + }, | |
| 78 | + typeOptions:[{"fullName":"盲盒价格","id":"1"},{"fullName":"门票价格","id":"2"}], | |
| 79 | + } | |
| 80 | + }, | |
| 81 | + computed: {}, | |
| 82 | + watch: {}, | |
| 83 | + created() { | |
| 84 | + }, | |
| 85 | + mounted() { | |
| 86 | + }, | |
| 87 | + methods: { | |
| 88 | + goBack() { | |
| 89 | + this.$emit('refresh') | |
| 90 | + }, | |
| 91 | + init(id, isDetail) { | |
| 92 | + this.dataForm.id = id || 0; | |
| 93 | + this.visible = true; | |
| 94 | + this.isDetail = isDetail || false; | |
| 95 | + this.$nextTick(() => { | |
| 96 | + this.$refs['elForm'].resetFields(); | |
| 97 | + if (this.dataForm.id) { | |
| 98 | + request({ | |
| 99 | + url: '/api/Blind/TbSettingPrice/' + this.dataForm.id, | |
| 100 | + method: 'get' | |
| 101 | + }).then(res =>{ | |
| 102 | + this.dataForm = res.data; | |
| 103 | + }) | |
| 104 | + } | |
| 105 | + }) | |
| 106 | + }, | |
| 107 | + dataFormSubmit() { | |
| 108 | + this.$refs['elForm'].validate((valid) => { | |
| 109 | + if (valid) { | |
| 110 | + if (!this.dataForm.id) { | |
| 111 | + request({ | |
| 112 | + url: `/api/Blind/TbSettingPrice`, | |
| 113 | + method: 'post', | |
| 114 | + data: this.dataForm, | |
| 115 | + }).then((res) => { | |
| 116 | + this.$message({ | |
| 117 | + message: res.msg, | |
| 118 | + type: 'success', | |
| 119 | + duration: 1000, | |
| 120 | + onClose: () => { | |
| 121 | + this.visible = false, | |
| 122 | + this.$emit('refresh', true) | |
| 123 | + } | |
| 124 | + }) | |
| 125 | + }) | |
| 126 | + } else { | |
| 127 | + request({ | |
| 128 | + url: '/api/Blind/TbSettingPrice/' + this.dataForm.id, | |
| 129 | + method: 'PUT', | |
| 130 | + data: this.dataForm | |
| 131 | + }).then((res) => { | |
| 132 | + this.$message({ | |
| 133 | + message: res.msg, | |
| 134 | + type: 'success', | |
| 135 | + duration: 1000, | |
| 136 | + onClose: () => { | |
| 137 | + this.visible = false | |
| 138 | + this.$emit('refresh', true) | |
| 139 | + } | |
| 140 | + }) | |
| 141 | + }) | |
| 142 | + } | |
| 143 | + } | |
| 144 | + }) | |
| 145 | + }, | |
| 146 | + } | |
| 147 | + } | |
| 148 | +</script> | ... | ... |
antis-ncc-admin/src/views/tbSettingPrice/index.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <div class="NCC-common-layout"> | |
| 3 | + <div class="NCC-common-layout-center"> | |
| 4 | + <el-row class="NCC-common-search-box" :gutter="16"> | |
| 5 | + <el-form @submit.native.prevent> | |
| 6 | + <el-col :span="6"> | |
| 7 | + <el-form-item label="类型"> | |
| 8 | + <el-select v-model="query.type" placeholder="类型" clearable > | |
| 9 | + <el-option v-for="(item, index) in typeOptions" :key="index" :label="item.fullName" :value="item.id" /> | |
| 10 | + </el-select> | |
| 11 | + </el-form-item> | |
| 12 | + </el-col> | |
| 13 | + <el-col :span="6"> | |
| 14 | + <el-form-item> | |
| 15 | + <el-button type="primary" icon="el-icon-search" @click="search()">查询</el-button> | |
| 16 | + <el-button icon="el-icon-refresh-right" @click="reset()">重置</el-button> | |
| 17 | + </el-form-item> | |
| 18 | + </el-col> | |
| 19 | + </el-form> | |
| 20 | + </el-row> | |
| 21 | + <div class="NCC-common-layout-main NCC-flex-main"> | |
| 22 | + <div class="NCC-common-head"> | |
| 23 | + <div> | |
| 24 | + <el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()">新增</el-button> | |
| 25 | + <el-button type="text" icon="el-icon-download" @click="exportData()">导出</el-button> | |
| 26 | + <el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()">批量删除</el-button> | |
| 27 | + </div> | |
| 28 | + <div class="NCC-common-head-right"> | |
| 29 | + <el-tooltip effect="dark" content="刷新" placement="top"> | |
| 30 | + <el-link icon="icon-ym icon-ym-Refresh NCC-common-head-icon" :underline="false" @click="reset()" /> | |
| 31 | + </el-tooltip> | |
| 32 | + <screenfull isContainer /> | |
| 33 | + </div> | |
| 34 | + </div> | |
| 35 | + <NCC-table v-loading="listLoading" :data="list" has-c @selection-change="handleSelectionChange"> | |
| 36 | + <el-table-column prop="price" label="价格" align="left" /> | |
| 37 | + <el-table-column label="类型" prop="type" align="left"> | |
| 38 | + <template slot-scope="scope">{{ scope.row.type | dynamicText(typeOptions) }}</template> | |
| 39 | + </el-table-column> | |
| 40 | + <el-table-column prop="creatorTime" label="创建时间" align="left" :formatter="ncc.tableDateFormat" /> | |
| 41 | + <el-table-column prop="lastModifyTime" label="修改时间" align="left" :formatter="ncc.tableDateFormat" /> | |
| 42 | + <el-table-column label="操作" fixed="right" width="100"> | |
| 43 | + <template slot-scope="scope"> | |
| 44 | + <el-button type="text" @click="addOrUpdateHandle(scope.row.id)" >编辑</el-button> | |
| 45 | + <el-button type="text" @click="handleDel(scope.row.id)" class="NCC-table-delBtn" >删除</el-button> | |
| 46 | + </template> | |
| 47 | + </el-table-column> | |
| 48 | + </NCC-table> | |
| 49 | + <pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initData" /> | |
| 50 | + </div> | |
| 51 | + </div> | |
| 52 | + <NCC-Form v-if="formVisible" ref="NCCForm" @refresh="refresh" /> | |
| 53 | + <ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" /> | |
| 54 | + </div> | |
| 55 | +</template> | |
| 56 | +<script> | |
| 57 | + import request from '@/utils/request' | |
| 58 | + import { getDictionaryDataSelector } from '@/api/systemData/dictionary' | |
| 59 | + import NCCForm from './Form' | |
| 60 | + import ExportBox from './ExportBox' | |
| 61 | + import { previewDataInterface } from '@/api/systemData/dataInterface' | |
| 62 | + export default { | |
| 63 | + components: { NCCForm, ExportBox }, | |
| 64 | + data() { | |
| 65 | + return { | |
| 66 | + query: { | |
| 67 | + type:undefined, | |
| 68 | + }, | |
| 69 | + list: [], | |
| 70 | + listLoading: true, | |
| 71 | + multipleSelection: [], total: 0, | |
| 72 | + listQuery: { | |
| 73 | + currentPage: 1, | |
| 74 | + pageSize: 20, | |
| 75 | + sort: "desc", | |
| 76 | + sidx: "", | |
| 77 | + }, | |
| 78 | + formVisible: false, | |
| 79 | + exportBoxVisible: false, | |
| 80 | + columnList: [ | |
| 81 | + { prop: 'price', label: '价格' }, | |
| 82 | + { prop: 'type', label: '类型' }, | |
| 83 | + { prop: 'creatorTime', label: '创建时间' }, | |
| 84 | + { prop: 'lastModifyTime', label: '修改时间' }, | |
| 85 | + ], | |
| 86 | + typeOptions:[{"fullName":"盲盒价格","id":"1"},{"fullName":"门票价格","id":"2"}], | |
| 87 | + } | |
| 88 | + }, | |
| 89 | + computed: {}, | |
| 90 | + created() { | |
| 91 | + this.initData() | |
| 92 | + }, | |
| 93 | + methods: { | |
| 94 | + initData() { | |
| 95 | + this.listLoading = true; | |
| 96 | + let _query = { | |
| 97 | + ...this.listQuery, | |
| 98 | + ...this.query | |
| 99 | + }; | |
| 100 | + let query = {} | |
| 101 | + for (let key in _query) { | |
| 102 | + if (Array.isArray(_query[key])) { | |
| 103 | + query[key] = _query[key].join() | |
| 104 | + } else { | |
| 105 | + query[key] = _query[key] | |
| 106 | + } | |
| 107 | + } | |
| 108 | + request({ | |
| 109 | + url: `/api/Blind/TbSettingPrice`, | |
| 110 | + method: 'GET', | |
| 111 | + data: query | |
| 112 | + }).then(res => { | |
| 113 | + this.list = res.data.list | |
| 114 | + this.total = res.data.pagination.total | |
| 115 | + this.listLoading = false | |
| 116 | + }) | |
| 117 | + }, | |
| 118 | + handleDel(id) { | |
| 119 | + this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', { | |
| 120 | + type: 'warning' | |
| 121 | + }).then(() => { | |
| 122 | + request({ | |
| 123 | + url: `/api/Blind/TbSettingPrice/${id}`, | |
| 124 | + method: 'DELETE' | |
| 125 | + }).then(res => { | |
| 126 | + this.$message({ | |
| 127 | + type: 'success', | |
| 128 | + message: res.msg, | |
| 129 | + onClose: () => { | |
| 130 | + this.initData() | |
| 131 | + } | |
| 132 | + }); | |
| 133 | + }) | |
| 134 | + }).catch(() => { | |
| 135 | + }); | |
| 136 | + }, | |
| 137 | + handleSelectionChange(val) { | |
| 138 | + const res = val.map(item => item.id) | |
| 139 | + this.multipleSelection = res | |
| 140 | + }, | |
| 141 | + handleBatchRemoveDel() { | |
| 142 | + if (!this.multipleSelection.length) { | |
| 143 | + this.$message({ | |
| 144 | + type: 'error', | |
| 145 | + message: '请选择一条数据', | |
| 146 | + duration: 1500, | |
| 147 | + }) | |
| 148 | + return | |
| 149 | + } | |
| 150 | + const ids = this.multipleSelection | |
| 151 | + this.$confirm('您确定要删除这些数据吗, 是否继续?', '提示', { | |
| 152 | + type: 'warning' | |
| 153 | + }).then(() => { | |
| 154 | + request({ | |
| 155 | + url: `/api/Blind/TbSettingPrice/batchRemove`, | |
| 156 | + method: 'POST', | |
| 157 | + data: ids , | |
| 158 | + }).then(res => { | |
| 159 | + this.$message({ | |
| 160 | + type: 'success', | |
| 161 | + message: res.msg, | |
| 162 | + onClose: () => { | |
| 163 | + this.initData() | |
| 164 | + } | |
| 165 | + }); | |
| 166 | + }) | |
| 167 | + }).catch(() => { }) | |
| 168 | + }, | |
| 169 | + addOrUpdateHandle(id, isDetail) { | |
| 170 | + this.formVisible = true | |
| 171 | + this.$nextTick(() => { | |
| 172 | + this.$refs.NCCForm.init(id, isDetail) | |
| 173 | + }) | |
| 174 | + }, | |
| 175 | + exportData() { | |
| 176 | + this.exportBoxVisible = true | |
| 177 | + this.$nextTick(() => { | |
| 178 | + this.$refs.ExportBox.init(this.columnList) | |
| 179 | + }) | |
| 180 | + }, | |
| 181 | + download(data) { | |
| 182 | + let query = { ...data, ...this.listQuery, ...this.query } | |
| 183 | + request({ | |
| 184 | + url: `/api/Blind/TbSettingPrice/Actions/Export`, | |
| 185 | + method: 'GET', | |
| 186 | + data: query | |
| 187 | + }).then(res => { | |
| 188 | + if (!res.data.url) return | |
| 189 | + window.location.href = this.define.comUrl + res.data.url | |
| 190 | + this.$refs.ExportBox.visible = false | |
| 191 | + this.exportBoxVisible = false | |
| 192 | + }) | |
| 193 | + }, | |
| 194 | + search() { | |
| 195 | + this.listQuery = { | |
| 196 | + currentPage: 1, | |
| 197 | + pageSize: 20, | |
| 198 | + sort: "desc", | |
| 199 | + sidx: "", | |
| 200 | + } | |
| 201 | + this.initData() | |
| 202 | + }, | |
| 203 | + refresh(isrRefresh) { | |
| 204 | + this.formVisible = false | |
| 205 | + if (isrRefresh) this.reset() | |
| 206 | + }, | |
| 207 | + reset() { | |
| 208 | + for (let key in this.query) { | |
| 209 | + this.query[key] = undefined | |
| 210 | + } | |
| 211 | + this.listQuery = { | |
| 212 | + currentPage: 1, | |
| 213 | + pageSize: 20, | |
| 214 | + sort: "desc", | |
| 215 | + sidx: "", | |
| 216 | + } | |
| 217 | + this.initData() | |
| 218 | + } | |
| 219 | + } | |
| 220 | + } | |
| 221 | +</script> | |
| 0 | 222 | \ No newline at end of file | ... | ... |
antis-ncc-admin/src/views/tbTicketsOrder/ExportBox.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <el-dialog title="导出数据" :close-on-click-modal="false" :visible.sync="visible" | |
| 3 | + class="NCC-dialog NCC-dialog_center" lock-scroll width="600px"> | |
| 4 | + <el-form label-position="top" label-width="80px"> | |
| 5 | + <el-form-item label="数据选择"> | |
| 6 | + <el-radio-group v-model="type"> | |
| 7 | + <el-radio :label="0">当前页面数据</el-radio> | |
| 8 | + <el-radio :label="1">全部页面数据</el-radio> | |
| 9 | + </el-radio-group> | |
| 10 | + </el-form-item> | |
| 11 | + <el-form-item label="导出字段"> | |
| 12 | + <el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" | |
| 13 | + @change="handleCheckAllChange">全选</el-checkbox> | |
| 14 | + <el-checkbox-group v-model="columns" @change="handleCheckedChange"> | |
| 15 | + <el-checkbox v-for="item in columnList" :label="item.prop" :key="item.prop"> | |
| 16 | + {{item.label}} | |
| 17 | + </el-checkbox> | |
| 18 | + </el-checkbox-group> | |
| 19 | + </el-form-item> | |
| 20 | + </el-form> | |
| 21 | + <span slot="footer" class="dialog-footer"> | |
| 22 | + <el-button @click="visible=false">取 消</el-button> | |
| 23 | + <el-button type="primary" @click="downLoad">导 出</el-button> | |
| 24 | + </span> | |
| 25 | + </el-dialog> | |
| 26 | +</template> | |
| 27 | + | |
| 28 | +<script> | |
| 29 | +export default { | |
| 30 | + data() { | |
| 31 | + return { | |
| 32 | + visible: false, | |
| 33 | + btnLoading: false, | |
| 34 | + type: 0, | |
| 35 | + columns: [], | |
| 36 | + checkAll: true, | |
| 37 | + isIndeterminate: false, | |
| 38 | + columnList: [] | |
| 39 | + } | |
| 40 | + }, | |
| 41 | + methods: { | |
| 42 | + init(columnList) { | |
| 43 | + this.visible = true | |
| 44 | + this.columnList = columnList | |
| 45 | + this.columns = columnList.map(o => o.prop) | |
| 46 | + }, | |
| 47 | + handleCheckAllChange(val) { | |
| 48 | + this.columns = val ? this.columnList.map(o => o.prop) : []; | |
| 49 | + this.isIndeterminate = false; | |
| 50 | + }, | |
| 51 | + handleCheckedChange(value) { | |
| 52 | + let checkedCount = value.length; | |
| 53 | + this.checkAll = checkedCount === this.columnList.length; | |
| 54 | + this.isIndeterminate = checkedCount > 0 && checkedCount < this.columnList.length; | |
| 55 | + }, | |
| 56 | + downLoad() { | |
| 57 | + this.$emit('download', { dataType: this.type, selectKey: this.columns.join(',') }) | |
| 58 | + } | |
| 59 | + } | |
| 60 | +} | |
| 61 | +</script> | |
| 62 | +<style lang="scss" scoped> | |
| 63 | +>>> .el-dialog__body { | |
| 64 | + padding: 20px !important; | |
| 65 | +} | |
| 66 | +</style> | |
| 0 | 67 | \ No newline at end of file | ... | ... |
antis-ncc-admin/src/views/tbTicketsOrder/Form.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <el-dialog :title="!dataForm.id ? '新建' : isDetail ? '详情':'编辑'" :close-on-click-modal="false" :visible.sync="visible" class="NCC-dialog NCC-dialog_center" lock-scroll width="600px"> | |
| 3 | + <el-row :gutter="15" class="" > | |
| 4 | + <el-form ref="elForm" :model="dataForm" size="small" label-width="100px" label-position="right" :disabled="!!isDetail" :rules="rules"> | |
| 5 | + <el-col :span="24"> | |
| 6 | + <el-form-item label="用户" prop="userId"> | |
| 7 | + <user-select v-model="dataForm.userId" placeholder="请选择" clearable required > | |
| 8 | + </user-select> | |
| 9 | + </el-form-item> | |
| 10 | + </el-col> | |
| 11 | + <!-- <el-col :span="24"> | |
| 12 | + <el-form-item label="订单号" prop="orderNumber"> | |
| 13 | + <el-input v-model="dataForm.orderNumber" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 14 | + </el-input> | |
| 15 | + </el-form-item> | |
| 16 | + </el-col> --> | |
| 17 | + <el-col :span="24"> | |
| 18 | + <el-form-item label="真实姓名" prop="name"> | |
| 19 | + <el-input v-model="dataForm.name" placeholder="请输入" clearable required :style='{"width":"100%"}' > | |
| 20 | + </el-input> | |
| 21 | + </el-form-item> | |
| 22 | + </el-col> | |
| 23 | + <el-col :span="24"> | |
| 24 | + <el-form-item label="身份证号码" prop="idCard"> | |
| 25 | + <el-input v-model="dataForm.idCard" placeholder="请输入" clearable required :style='{"width":"100%"}' > | |
| 26 | + </el-input> | |
| 27 | + </el-form-item> | |
| 28 | + </el-col> | |
| 29 | + <el-col :span="24"> | |
| 30 | + <el-form-item label="电话号码" prop="phone"> | |
| 31 | + <el-input v-model="dataForm.phone" placeholder="请输入" clearable required :style='{"width":"100%"}' > | |
| 32 | + </el-input> | |
| 33 | + </el-form-item> | |
| 34 | + </el-col> | |
| 35 | + <!-- <el-col :span="24"> | |
| 36 | + <el-form-item label="状态" prop="status"> | |
| 37 | + <el-select v-model="dataForm.status" placeholder="请选择" clearable required :style='{"width":"100%"}' > | |
| 38 | + <el-option v-for="(item, index) in statusOptions" :key="index" :label="item.fullName" :value="item.id" ></el-option> | |
| 39 | + </el-select> | |
| 40 | + </el-form-item> | |
| 41 | + </el-col> --> | |
| 42 | + <!-- <el-col :span="24"> | |
| 43 | + <el-form-item label="金额" prop="totalPrice"> | |
| 44 | + <el-input v-model="dataForm.totalPrice" placeholder="请输入" clearable :style='{"width":"100%"}' > | |
| 45 | + </el-input> | |
| 46 | + </el-form-item> | |
| 47 | + </el-col> --> | |
| 48 | + <el-col :span="24"> | |
| 49 | + <el-form-item label="订单" prop="orderId"> | |
| 50 | + <el-select v-model="dataForm.orderId" placeholder="请选择" clearable :style='{"width":"100%"}' > | |
| 51 | + <el-option v-for="(item, index) in orderIdOptions" :key="index" :label="item.F_OrderNumber" :value="item.F_Id" ></el-option> | |
| 52 | + </el-select> | |
| 53 | + </el-form-item> | |
| 54 | + </el-col> | |
| 55 | + <el-col :span="24" v-if="false" > | |
| 56 | + <el-form-item label="创建时间" prop="creatorTime"> | |
| 57 | + <el-input v-model="dataForm.creatorTime" placeholder="系统自动生成" readonly > | |
| 58 | + </el-input> | |
| 59 | + </el-form-item> | |
| 60 | + </el-col> | |
| 61 | + <el-col :span="24" v-if="false" > | |
| 62 | + <el-form-item label="修改时间" prop="lastModifyTime"> | |
| 63 | + <el-input v-model="dataForm.lastModifyTime" placeholder="系统自动生成" readonly > | |
| 64 | + </el-input> | |
| 65 | + </el-form-item> | |
| 66 | + </el-col> | |
| 67 | + </el-form> | |
| 68 | + </el-row> | |
| 69 | + <span slot="footer" class="dialog-footer"> | |
| 70 | + <el-button @click="visible = false">取 消</el-button> | |
| 71 | + <el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail">确 定</el-button> | |
| 72 | + </span> | |
| 73 | + </el-dialog> | |
| 74 | +</template> | |
| 75 | +<script> | |
| 76 | + import request from '@/utils/request' | |
| 77 | + import { getDictionaryDataSelector } from '@/api/systemData/dictionary' | |
| 78 | + import { previewDataInterface } from '@/api/systemData/dataInterface' | |
| 79 | + export default { | |
| 80 | + components: {}, | |
| 81 | + props: [], | |
| 82 | + data() { | |
| 83 | + return { | |
| 84 | + loading: false, | |
| 85 | + visible: false, | |
| 86 | + isDetail: false, | |
| 87 | + dataForm: { | |
| 88 | + id:'', | |
| 89 | + userId:undefined, | |
| 90 | + orderNumber:undefined, | |
| 91 | + name:undefined, | |
| 92 | + idCard:undefined, | |
| 93 | + phone:undefined, | |
| 94 | + status:undefined, | |
| 95 | + totalPrice:undefined, | |
| 96 | + orderId:undefined, | |
| 97 | + creatorTime:undefined, | |
| 98 | + lastModifyTime:undefined, | |
| 99 | + }, | |
| 100 | + rules: { | |
| 101 | + userId:[ | |
| 102 | + { | |
| 103 | + required:true, | |
| 104 | + message:'请输入用户', | |
| 105 | + trigger:'change' | |
| 106 | + }, | |
| 107 | + ], | |
| 108 | + name:[ | |
| 109 | + { | |
| 110 | + required:true, | |
| 111 | + message:'请输入真实姓名', | |
| 112 | + trigger:'blur' | |
| 113 | + }, | |
| 114 | + ], | |
| 115 | + idCard:[ | |
| 116 | + { | |
| 117 | + required:true, | |
| 118 | + message:'请输入身份证号码', | |
| 119 | + trigger:'blur' | |
| 120 | + }, | |
| 121 | + { | |
| 122 | + pattern:/^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/, | |
| 123 | + message:'请输入正确的身份证号码', | |
| 124 | + trigger:'blur' | |
| 125 | + }, | |
| 126 | + ], | |
| 127 | + phone:[ | |
| 128 | + { | |
| 129 | + required:true, | |
| 130 | + message:'请输入电话号码', | |
| 131 | + trigger:'blur' | |
| 132 | + }, | |
| 133 | + { | |
| 134 | + pattern:/^1[3456789]\d{9}$|^0\d{2,3}-?\d{7,8}$/, | |
| 135 | + message:'请输入正确的联系方式', | |
| 136 | + trigger:'blur' | |
| 137 | + }, | |
| 138 | + ], | |
| 139 | + // status:[ | |
| 140 | + // { | |
| 141 | + // required:true, | |
| 142 | + // message:'请输入状态', | |
| 143 | + // trigger:'change' | |
| 144 | + // }, | |
| 145 | + // ], | |
| 146 | + // totalPrice:[ | |
| 147 | + // { | |
| 148 | + // pattern:/^[1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0$/, | |
| 149 | + // message:'请输入正确的金额', | |
| 150 | + // trigger:'blur' | |
| 151 | + // }, | |
| 152 | + // ], | |
| 153 | + }, | |
| 154 | + statusOptions:[{"fullName":"未付款","id":"1"},{"fullName":"已付款","id":"2"},{"fullName":"已完成","id":"3"}], | |
| 155 | + orderIdOptions : [], | |
| 156 | + } | |
| 157 | + }, | |
| 158 | + computed: {}, | |
| 159 | + watch: {}, | |
| 160 | + created() { | |
| 161 | + this.getorderIdOptions(); | |
| 162 | + }, | |
| 163 | + mounted() { | |
| 164 | + }, | |
| 165 | + methods: { | |
| 166 | + getorderIdOptions(){ | |
| 167 | + previewDataInterface('394660105041216773').then(res => { | |
| 168 | + this.orderIdOptions = res.data | |
| 169 | + }); | |
| 170 | + }, | |
| 171 | + goBack() { | |
| 172 | + this.$emit('refresh') | |
| 173 | + }, | |
| 174 | + init(id, isDetail) { | |
| 175 | + this.dataForm.id = id || 0; | |
| 176 | + this.visible = true; | |
| 177 | + this.isDetail = isDetail || false; | |
| 178 | + this.$nextTick(() => { | |
| 179 | + this.$refs['elForm'].resetFields(); | |
| 180 | + if (this.dataForm.id) { | |
| 181 | + request({ | |
| 182 | + url: '/api/Blind/TbTicketsOrder/' + this.dataForm.id, | |
| 183 | + method: 'get' | |
| 184 | + }).then(res =>{ | |
| 185 | + this.dataForm = res.data; | |
| 186 | + }) | |
| 187 | + } | |
| 188 | + }) | |
| 189 | + }, | |
| 190 | + dataFormSubmit() { | |
| 191 | + this.$refs['elForm'].validate((valid) => { | |
| 192 | + if (valid) { | |
| 193 | + if (!this.dataForm.id) { | |
| 194 | + request({ | |
| 195 | + url: `/api/Blind/TbTicketsOrder`, | |
| 196 | + method: 'post', | |
| 197 | + data: this.dataForm, | |
| 198 | + }).then((res) => { | |
| 199 | + this.$message({ | |
| 200 | + message: res.msg, | |
| 201 | + type: 'success', | |
| 202 | + duration: 1000, | |
| 203 | + onClose: () => { | |
| 204 | + this.visible = false, | |
| 205 | + this.$emit('refresh', true) | |
| 206 | + } | |
| 207 | + }) | |
| 208 | + }) | |
| 209 | + } else { | |
| 210 | + request({ | |
| 211 | + url: '/api/Blind/TbTicketsOrder/' + this.dataForm.id, | |
| 212 | + method: 'PUT', | |
| 213 | + data: this.dataForm | |
| 214 | + }).then((res) => { | |
| 215 | + this.$message({ | |
| 216 | + message: res.msg, | |
| 217 | + type: 'success', | |
| 218 | + duration: 1000, | |
| 219 | + onClose: () => { | |
| 220 | + this.visible = false | |
| 221 | + this.$emit('refresh', true) | |
| 222 | + } | |
| 223 | + }) | |
| 224 | + }) | |
| 225 | + } | |
| 226 | + } | |
| 227 | + }) | |
| 228 | + }, | |
| 229 | + } | |
| 230 | + } | |
| 231 | +</script> | ... | ... |
antis-ncc-admin/src/views/tbTicketsOrder/index.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <div class="NCC-common-layout"> | |
| 3 | + <div class="NCC-common-layout-center"> | |
| 4 | + <el-row class="NCC-common-search-box" :gutter="16"> | |
| 5 | + <el-form @submit.native.prevent> | |
| 6 | + <el-col :span="6"> | |
| 7 | + <el-form-item label="用户"> | |
| 8 | + <userSelect v-model="query.userId" placeholder="请选择用户" /> | |
| 9 | + </el-form-item> | |
| 10 | + </el-col> | |
| 11 | + <el-col :span="6"> | |
| 12 | + <el-form-item label="订单号"> | |
| 13 | + <el-input v-model="query.orderNumber" placeholder="订单号" clearable /> | |
| 14 | + </el-form-item> | |
| 15 | + </el-col> | |
| 16 | + <el-col :span="6"> | |
| 17 | + <el-form-item label="真实姓名"> | |
| 18 | + <el-input v-model="query.name" placeholder="真实姓名" clearable /> | |
| 19 | + </el-form-item> | |
| 20 | + </el-col> | |
| 21 | + <template v-if="showAll"> | |
| 22 | + <el-col :span="6"> | |
| 23 | + <el-form-item label="身份证号码"> | |
| 24 | + <el-input v-model="query.idCard" placeholder="身份证号码" clearable /> | |
| 25 | + </el-form-item> | |
| 26 | + </el-col> | |
| 27 | + <el-col :span="6"> | |
| 28 | + <el-form-item label="电话号码"> | |
| 29 | + <el-input v-model="query.phone" placeholder="电话号码" clearable /> | |
| 30 | + </el-form-item> | |
| 31 | + </el-col> | |
| 32 | + <el-col :span="6"> | |
| 33 | + <el-form-item label="状态"> | |
| 34 | + <el-select v-model="query.status" placeholder="状态" clearable > | |
| 35 | + <el-option v-for="(item, index) in statusOptions" :key="index" :label="item.fullName" :value="item.id" /> | |
| 36 | + </el-select> | |
| 37 | + </el-form-item> | |
| 38 | + </el-col> | |
| 39 | + <el-col :span="6"> | |
| 40 | + <el-form-item label="订单"> | |
| 41 | + <el-select v-model="query.orderId" placeholder="订单" clearable > | |
| 42 | + <el-option v-for="(item, index) in orderIdOptions" :key="index" :label="item.F_OrderNumber" :value="item.F_Id" /> | |
| 43 | + </el-select> | |
| 44 | + </el-form-item> | |
| 45 | + </el-col> | |
| 46 | + </template> | |
| 47 | + <el-col :span="6"> | |
| 48 | + <el-form-item> | |
| 49 | + <el-button type="primary" icon="el-icon-search" @click="search()">查询</el-button> | |
| 50 | + <el-button icon="el-icon-refresh-right" @click="reset()">重置</el-button> | |
| 51 | + <el-button type="text" icon="el-icon-arrow-down" @click="showAll=true" v-if="!showAll">展开</el-button> | |
| 52 | + <el-button type="text" icon="el-icon-arrow-up" @click="showAll=false" v-else>收起</el-button> | |
| 53 | + </el-form-item> | |
| 54 | + </el-col> | |
| 55 | + </el-form> | |
| 56 | + </el-row> | |
| 57 | + <div class="NCC-common-layout-main NCC-flex-main"> | |
| 58 | + <div class="NCC-common-head"> | |
| 59 | + <div> | |
| 60 | + <el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()">新增</el-button> | |
| 61 | + <el-button type="text" icon="el-icon-download" @click="exportData()">导出</el-button> | |
| 62 | + <el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()">批量删除</el-button> | |
| 63 | + </div> | |
| 64 | + <div class="NCC-common-head-right"> | |
| 65 | + <el-tooltip effect="dark" content="刷新" placement="top"> | |
| 66 | + <el-link icon="icon-ym icon-ym-Refresh NCC-common-head-icon" :underline="false" @click="reset()" /> | |
| 67 | + </el-tooltip> | |
| 68 | + <screenfull isContainer /> | |
| 69 | + </div> | |
| 70 | + </div> | |
| 71 | + <NCC-table v-loading="listLoading" :data="list" has-c @selection-change="handleSelectionChange"> | |
| 72 | + <el-table-column prop="RealName" label="用户" align="left" > | |
| 73 | + <template slot-scope="scope"> | |
| 74 | + {{scope.row.user&&scope.row.user.RealName}} | |
| 75 | + </template> | |
| 76 | + </el-table-column> | |
| 77 | + <el-table-column prop="orderNumber" label="订单号" align="left" > | |
| 78 | + </el-table-column> | |
| 79 | + <el-table-column prop="name" label="真实姓名" align="left" /> | |
| 80 | + <el-table-column prop="idCard" label="身份证号码" align="left" /> | |
| 81 | + <el-table-column prop="phone" label="电话号码" align="left" /> | |
| 82 | + <el-table-column label="状态" prop="status" align="left"> | |
| 83 | + <template slot-scope="scope">{{ scope.row.status | dynamicText(statusOptions) }}</template> | |
| 84 | + </el-table-column> | |
| 85 | + <el-table-column prop="totalPrice" label="金额" align="left" /> | |
| 86 | + <el-table-column label="订单" prop="orderId" align="left"> | |
| 87 | + <template slot-scope="scope">{{ scope.row.orderId | dynamicText(orderIdOptions) }}</template> | |
| 88 | + </el-table-column> | |
| 89 | + <el-table-column prop="creatorTime" label="创建时间" align="left" :formatter="ncc.tableDateFormat"/> | |
| 90 | + <el-table-column prop="lastModifyTime" label="修改时间" align="left" :formatter="ncc.tableDateFormat"/> | |
| 91 | + <el-table-column label="操作" fixed="right" width="100"> | |
| 92 | + <template slot-scope="scope"> | |
| 93 | + <el-button type="text" @click="addOrUpdateHandle(scope.row.id)" >编辑</el-button> | |
| 94 | + <el-button type="text" @click="handleDel(scope.row.id)" class="NCC-table-delBtn" >删除</el-button> | |
| 95 | + </template> | |
| 96 | + </el-table-column> | |
| 97 | + </NCC-table> | |
| 98 | + <pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initData" /> | |
| 99 | + </div> | |
| 100 | + </div> | |
| 101 | + <NCC-Form v-if="formVisible" ref="NCCForm" @refresh="refresh" /> | |
| 102 | + <ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" /> | |
| 103 | + </div> | |
| 104 | +</template> | |
| 105 | +<script> | |
| 106 | + import request from '@/utils/request' | |
| 107 | + import { getDictionaryDataSelector } from '@/api/systemData/dictionary' | |
| 108 | + import NCCForm from './Form' | |
| 109 | + import ExportBox from './ExportBox' | |
| 110 | + import { previewDataInterface } from '@/api/systemData/dataInterface' | |
| 111 | + export default { | |
| 112 | + components: { NCCForm, ExportBox }, | |
| 113 | + data() { | |
| 114 | + return { | |
| 115 | + showAll: false, | |
| 116 | + query: { | |
| 117 | + userId:undefined, | |
| 118 | + orderNumber:undefined, | |
| 119 | + name:undefined, | |
| 120 | + idCard:undefined, | |
| 121 | + phone:undefined, | |
| 122 | + status:undefined, | |
| 123 | + orderId:undefined, | |
| 124 | + }, | |
| 125 | + list: [], | |
| 126 | + listLoading: true, | |
| 127 | + multipleSelection: [], total: 0, | |
| 128 | + listQuery: { | |
| 129 | + currentPage: 1, | |
| 130 | + pageSize: 20, | |
| 131 | + sort: "desc", | |
| 132 | + sidx: "", | |
| 133 | + }, | |
| 134 | + formVisible: false, | |
| 135 | + exportBoxVisible: false, | |
| 136 | + columnList: [ | |
| 137 | + { prop: 'userId', label: '用户' }, | |
| 138 | + { prop: 'orderNumber', label: '订单号' }, | |
| 139 | + { prop: 'name', label: '真实姓名' }, | |
| 140 | + { prop: 'idCard', label: '身份证号码' }, | |
| 141 | + { prop: 'phone', label: '电话号码' }, | |
| 142 | + { prop: 'status', label: '状态' }, | |
| 143 | + { prop: 'totalPrice', label: '金额' }, | |
| 144 | + { prop: 'orderId', label: '订单' }, | |
| 145 | + { prop: 'creatorTime', label: '创建时间' }, | |
| 146 | + { prop: 'lastModifyTime', label: '修改时间' }, | |
| 147 | + ], | |
| 148 | + statusOptions:[{"fullName":"未付款","id":"1"},{"fullName":"已付款","id":"2"},{"fullName":"已完成","id":"3"}], | |
| 149 | + orderIdOptions : [], | |
| 150 | + } | |
| 151 | + }, | |
| 152 | + computed: {}, | |
| 153 | + created() { | |
| 154 | + this.initData() | |
| 155 | + this.getorderIdOptions(); | |
| 156 | + }, | |
| 157 | + methods: { | |
| 158 | + getorderIdOptions(){ | |
| 159 | + previewDataInterface('394660105041216773').then(res => { | |
| 160 | + this.orderIdOptions = res.data | |
| 161 | + }); | |
| 162 | + }, | |
| 163 | + initData() { | |
| 164 | + this.listLoading = true; | |
| 165 | + let _query = { | |
| 166 | + ...this.listQuery, | |
| 167 | + ...this.query | |
| 168 | + }; | |
| 169 | + let query = {} | |
| 170 | + for (let key in _query) { | |
| 171 | + if (Array.isArray(_query[key])) { | |
| 172 | + query[key] = _query[key].join() | |
| 173 | + } else { | |
| 174 | + query[key] = _query[key] | |
| 175 | + } | |
| 176 | + } | |
| 177 | + request({ | |
| 178 | + url: `/api/Blind/TbTicketsOrder`, | |
| 179 | + method: 'GET', | |
| 180 | + data: query | |
| 181 | + }).then(res => { | |
| 182 | + this.list = res.data.list | |
| 183 | + this.total = res.data.pagination.total | |
| 184 | + this.listLoading = false | |
| 185 | + }) | |
| 186 | + }, | |
| 187 | + handleDel(id) { | |
| 188 | + this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', { | |
| 189 | + type: 'warning' | |
| 190 | + }).then(() => { | |
| 191 | + request({ | |
| 192 | + url: `/api/Blind/TbTicketsOrder/${id}`, | |
| 193 | + method: 'DELETE' | |
| 194 | + }).then(res => { | |
| 195 | + this.$message({ | |
| 196 | + type: 'success', | |
| 197 | + message: res.msg, | |
| 198 | + onClose: () => { | |
| 199 | + this.initData() | |
| 200 | + } | |
| 201 | + }); | |
| 202 | + }) | |
| 203 | + }).catch(() => { | |
| 204 | + }); | |
| 205 | + }, | |
| 206 | + handleSelectionChange(val) { | |
| 207 | + const res = val.map(item => item.id) | |
| 208 | + this.multipleSelection = res | |
| 209 | + }, | |
| 210 | + handleBatchRemoveDel() { | |
| 211 | + if (!this.multipleSelection.length) { | |
| 212 | + this.$message({ | |
| 213 | + type: 'error', | |
| 214 | + message: '请选择一条数据', | |
| 215 | + duration: 1500, | |
| 216 | + }) | |
| 217 | + return | |
| 218 | + } | |
| 219 | + const ids = this.multipleSelection | |
| 220 | + this.$confirm('您确定要删除这些数据吗, 是否继续?', '提示', { | |
| 221 | + type: 'warning' | |
| 222 | + }).then(() => { | |
| 223 | + request({ | |
| 224 | + url: `/api/Blind/TbTicketsOrder/batchRemove`, | |
| 225 | + method: 'POST', | |
| 226 | + data: ids , | |
| 227 | + }).then(res => { | |
| 228 | + this.$message({ | |
| 229 | + type: 'success', | |
| 230 | + message: res.msg, | |
| 231 | + onClose: () => { | |
| 232 | + this.initData() | |
| 233 | + } | |
| 234 | + }); | |
| 235 | + }) | |
| 236 | + }).catch(() => { }) | |
| 237 | + }, | |
| 238 | + addOrUpdateHandle(id, isDetail) { | |
| 239 | + this.formVisible = true | |
| 240 | + this.$nextTick(() => { | |
| 241 | + this.$refs.NCCForm.init(id, isDetail) | |
| 242 | + }) | |
| 243 | + }, | |
| 244 | + exportData() { | |
| 245 | + this.exportBoxVisible = true | |
| 246 | + this.$nextTick(() => { | |
| 247 | + this.$refs.ExportBox.init(this.columnList) | |
| 248 | + }) | |
| 249 | + }, | |
| 250 | + download(data) { | |
| 251 | + let query = { ...data, ...this.listQuery, ...this.query } | |
| 252 | + request({ | |
| 253 | + url: `/api/Blind/TbTicketsOrder/Actions/Export`, | |
| 254 | + method: 'GET', | |
| 255 | + data: query | |
| 256 | + }).then(res => { | |
| 257 | + if (!res.data.url) return | |
| 258 | + window.location.href = this.define.comUrl + res.data.url | |
| 259 | + this.$refs.ExportBox.visible = false | |
| 260 | + this.exportBoxVisible = false | |
| 261 | + }) | |
| 262 | + }, | |
| 263 | + search() { | |
| 264 | + this.listQuery = { | |
| 265 | + currentPage: 1, | |
| 266 | + pageSize: 20, | |
| 267 | + sort: "desc", | |
| 268 | + sidx: "", | |
| 269 | + } | |
| 270 | + this.initData() | |
| 271 | + }, | |
| 272 | + refresh(isrRefresh) { | |
| 273 | + this.formVisible = false | |
| 274 | + if (isrRefresh) this.reset() | |
| 275 | + }, | |
| 276 | + reset() { | |
| 277 | + for (let key in this.query) { | |
| 278 | + this.query[key] = undefined | |
| 279 | + } | |
| 280 | + this.listQuery = { | |
| 281 | + currentPage: 1, | |
| 282 | + pageSize: 20, | |
| 283 | + sort: "desc", | |
| 284 | + sidx: "", | |
| 285 | + } | |
| 286 | + this.initData() | |
| 287 | + } | |
| 288 | + } | |
| 289 | + } | |
| 290 | +</script> | |
| 0 | 291 | \ No newline at end of file | ... | ... |
antis-ncc-admin/src/views/tbTravelSpot/ExportBox.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <el-dialog title="导出数据" :close-on-click-modal="false" :visible.sync="visible" | |
| 3 | + class="NCC-dialog NCC-dialog_center" lock-scroll width="600px"> | |
| 4 | + <el-form label-position="top" label-width="80px"> | |
| 5 | + <el-form-item label="数据选择"> | |
| 6 | + <el-radio-group v-model="type"> | |
| 7 | + <el-radio :label="0">当前页面数据</el-radio> | |
| 8 | + <el-radio :label="1">全部页面数据</el-radio> | |
| 9 | + </el-radio-group> | |
| 10 | + </el-form-item> | |
| 11 | + <el-form-item label="导出字段"> | |
| 12 | + <el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" | |
| 13 | + @change="handleCheckAllChange">全选</el-checkbox> | |
| 14 | + <el-checkbox-group v-model="columns" @change="handleCheckedChange"> | |
| 15 | + <el-checkbox v-for="item in columnList" :label="item.prop" :key="item.prop"> | |
| 16 | + {{item.label}} | |
| 17 | + </el-checkbox> | |
| 18 | + </el-checkbox-group> | |
| 19 | + </el-form-item> | |
| 20 | + </el-form> | |
| 21 | + <span slot="footer" class="dialog-footer"> | |
| 22 | + <el-button @click="visible=false">取 消</el-button> | |
| 23 | + <el-button type="primary" @click="downLoad">导 出</el-button> | |
| 24 | + </span> | |
| 25 | + </el-dialog> | |
| 26 | +</template> | |
| 27 | + | |
| 28 | +<script> | |
| 29 | +export default { | |
| 30 | + data() { | |
| 31 | + return { | |
| 32 | + visible: false, | |
| 33 | + btnLoading: false, | |
| 34 | + type: 0, | |
| 35 | + columns: [], | |
| 36 | + checkAll: true, | |
| 37 | + isIndeterminate: false, | |
| 38 | + columnList: [] | |
| 39 | + } | |
| 40 | + }, | |
| 41 | + methods: { | |
| 42 | + init(columnList) { | |
| 43 | + this.visible = true | |
| 44 | + this.columnList = columnList | |
| 45 | + this.columns = columnList.map(o => o.prop) | |
| 46 | + }, | |
| 47 | + handleCheckAllChange(val) { | |
| 48 | + this.columns = val ? this.columnList.map(o => o.prop) : []; | |
| 49 | + this.isIndeterminate = false; | |
| 50 | + }, | |
| 51 | + handleCheckedChange(value) { | |
| 52 | + let checkedCount = value.length; | |
| 53 | + this.checkAll = checkedCount === this.columnList.length; | |
| 54 | + this.isIndeterminate = checkedCount > 0 && checkedCount < this.columnList.length; | |
| 55 | + }, | |
| 56 | + downLoad() { | |
| 57 | + this.$emit('download', { dataType: this.type, selectKey: this.columns.join(',') }) | |
| 58 | + } | |
| 59 | + } | |
| 60 | +} | |
| 61 | +</script> | |
| 62 | +<style lang="scss" scoped> | |
| 63 | +>>> .el-dialog__body { | |
| 64 | + padding: 20px !important; | |
| 65 | +} | |
| 66 | +</style> | |
| 0 | 67 | \ No newline at end of file | ... | ... |
antis-ncc-admin/src/views/tbTravelSpot/Form.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <el-dialog :title="!dataForm.id ? '新建' : isDetail ? '详情':'编辑'" :close-on-click-modal="false" :visible.sync="visible" class="NCC-dialog NCC-dialog_center" lock-scroll width="600px"> | |
| 3 | + <el-row :gutter="15" class="" > | |
| 4 | + <el-form ref="elForm" :model="dataForm" size="small" label-width="100px" label-position="right" :disabled="!!isDetail" :rules="rules"> | |
| 5 | + <el-col :span="24"> | |
| 6 | + <el-form-item label="图片信息" prop="homeBanner"> | |
| 7 | + <NCC-UploadImg v-model="dataForm.homeBanner" required :fileSize="5" sizeUnit="MB" :limit="1" > | |
| 8 | + </NCC-UploadImg> | |
| 9 | + </el-form-item> | |
| 10 | + </el-col> | |
| 11 | + <el-col :span="24"> | |
| 12 | + <el-form-item label="景点图片" prop="banner"> | |
| 13 | + <NCC-UploadImg v-model="dataForm.banner" required :fileSize="5" sizeUnit="MB" :limit="9" > | |
| 14 | + </NCC-UploadImg> | |
| 15 | + </el-form-item> | |
| 16 | + </el-col> | |
| 17 | + <el-col :span="24"> | |
| 18 | + <el-form-item label="标题" prop="title"> | |
| 19 | + <el-input v-model="dataForm.title" placeholder="请输入" clearable required :style='{"width":"100%"}' > | |
| 20 | + </el-input> | |
| 21 | + </el-form-item> | |
| 22 | + </el-col> | |
| 23 | + <el-col :span="24"> | |
| 24 | + <el-form-item label="备注" prop="remark"> | |
| 25 | + <el-input v-model="dataForm.remark" placeholder="请输入" required show-word-limit :style='{"width":"100%"}' type='textarea' :autosize='{"minRows":4,"maxRows":4}' > | |
| 26 | + </el-input> | |
| 27 | + </el-form-item> | |
| 28 | + </el-col> | |
| 29 | + <el-col :span="24"> | |
| 30 | + <el-form-item label="富文本" prop="editors"> | |
| 31 | + <NCC-Quill v-model="dataForm.editors" placeholder="请输入内容..." required > | |
| 32 | + </NCC-Quill> | |
| 33 | + </el-form-item> | |
| 34 | + </el-col> | |
| 35 | + <el-col :span="24"> | |
| 36 | + <el-form-item label="原价" prop="oldMoneys"> | |
| 37 | + <el-input v-model="dataForm.oldMoneys" placeholder="请输入" clearable required :style='{"width":"100%"}' > | |
| 38 | + </el-input> | |
| 39 | + </el-form-item> | |
| 40 | + </el-col> | |
| 41 | + <el-col :span="24"> | |
| 42 | + <el-form-item label="现价" prop="nowMoneys"> | |
| 43 | + <el-input v-model="dataForm.nowMoneys" placeholder="请输入" clearable required :style='{"width":"100%"}' > | |
| 44 | + </el-input> | |
| 45 | + </el-form-item> | |
| 46 | + </el-col> | |
| 47 | + <el-col :span="24" v-if="false" > | |
| 48 | + <el-form-item label="创建时间" prop="creatorTime"> | |
| 49 | + <el-input v-model="dataForm.creatorTime" placeholder="系统自动生成" readonly > | |
| 50 | + </el-input> | |
| 51 | + </el-form-item> | |
| 52 | + </el-col> | |
| 53 | + <el-col :span="24" v-if="false" > | |
| 54 | + <el-form-item label="修改时间" prop="lastModifyTime"> | |
| 55 | + <el-input v-model="dataForm.lastModifyTime" placeholder="系统自动生成" readonly > | |
| 56 | + </el-input> | |
| 57 | + </el-form-item> | |
| 58 | + </el-col> | |
| 59 | + </el-form> | |
| 60 | + </el-row> | |
| 61 | + <span slot="footer" class="dialog-footer"> | |
| 62 | + <el-button @click="visible = false">取 消</el-button> | |
| 63 | + <el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail">确 定</el-button> | |
| 64 | + </span> | |
| 65 | + </el-dialog> | |
| 66 | +</template> | |
| 67 | +<script> | |
| 68 | + import request from '@/utils/request' | |
| 69 | + import { getDictionaryDataSelector } from '@/api/systemData/dictionary' | |
| 70 | + import { previewDataInterface } from '@/api/systemData/dataInterface' | |
| 71 | + export default { | |
| 72 | + components: {}, | |
| 73 | + props: [], | |
| 74 | + data() { | |
| 75 | + return { | |
| 76 | + loading: false, | |
| 77 | + visible: false, | |
| 78 | + isDetail: false, | |
| 79 | + dataForm: { | |
| 80 | + id:'', | |
| 81 | + homeBanner:[], | |
| 82 | + banner:[], | |
| 83 | + title:undefined, | |
| 84 | + remark:undefined, | |
| 85 | + editors:undefined, | |
| 86 | + oldMoneys:undefined, | |
| 87 | + nowMoneys:undefined, | |
| 88 | + creatorTime:undefined, | |
| 89 | + lastModifyTime:undefined, | |
| 90 | + }, | |
| 91 | + rules: { | |
| 92 | + homeBanner:[ | |
| 93 | + { | |
| 94 | + required:true, | |
| 95 | + message:'请输入图片信息', | |
| 96 | + trigger:'click' | |
| 97 | + }, | |
| 98 | + ], | |
| 99 | + banner:[ | |
| 100 | + { | |
| 101 | + required:true, | |
| 102 | + message:'请输入景点图片', | |
| 103 | + trigger:'click' | |
| 104 | + }, | |
| 105 | + ], | |
| 106 | + title:[ | |
| 107 | + { | |
| 108 | + required:true, | |
| 109 | + message:'请输入标题', | |
| 110 | + trigger:'blur' | |
| 111 | + }, | |
| 112 | + ], | |
| 113 | + remark:[ | |
| 114 | + { | |
| 115 | + required:true, | |
| 116 | + message:'请输入备注', | |
| 117 | + trigger:'blur' | |
| 118 | + }, | |
| 119 | + ], | |
| 120 | + editors:[ | |
| 121 | + { | |
| 122 | + required:true, | |
| 123 | + message:'请输入富文本', | |
| 124 | + trigger:'blur' | |
| 125 | + }, | |
| 126 | + ], | |
| 127 | + oldMoneys:[ | |
| 128 | + { | |
| 129 | + required:true, | |
| 130 | + message:'请输入原价', | |
| 131 | + trigger:'blur' | |
| 132 | + }, | |
| 133 | + { | |
| 134 | + pattern:/^[1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0$/, | |
| 135 | + message:'请输入正确的金额', | |
| 136 | + trigger:'blur' | |
| 137 | + }, | |
| 138 | + ], | |
| 139 | + nowMoneys:[ | |
| 140 | + { | |
| 141 | + required:true, | |
| 142 | + message:'请输入现价', | |
| 143 | + trigger:'blur' | |
| 144 | + }, | |
| 145 | + { | |
| 146 | + pattern:/^[1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0$/, | |
| 147 | + message:'请输入正确的金额', | |
| 148 | + trigger:'blur' | |
| 149 | + }, | |
| 150 | + ], | |
| 151 | + }, | |
| 152 | + } | |
| 153 | + }, | |
| 154 | + computed: {}, | |
| 155 | + watch: {}, | |
| 156 | + created() { | |
| 157 | + }, | |
| 158 | + mounted() { | |
| 159 | + }, | |
| 160 | + methods: { | |
| 161 | + goBack() { | |
| 162 | + this.$emit('refresh') | |
| 163 | + }, | |
| 164 | + init(id, isDetail) { | |
| 165 | + this.dataForm.id = id || 0; | |
| 166 | + this.visible = true; | |
| 167 | + this.isDetail = isDetail || false; | |
| 168 | + this.$nextTick(() => { | |
| 169 | + this.$refs['elForm'].resetFields(); | |
| 170 | + if (this.dataForm.id) { | |
| 171 | + request({ | |
| 172 | + url: '/api/Blind/TbTravelSpot/' + this.dataForm.id, | |
| 173 | + method: 'get' | |
| 174 | + }).then(res =>{ | |
| 175 | + this.dataForm = res.data; | |
| 176 | + if(!this.dataForm.homeBanner)this.dataForm.homeBanner=[]; | |
| 177 | + if(!this.dataForm.banner)this.dataForm.banner=[]; | |
| 178 | + }) | |
| 179 | + } | |
| 180 | + }) | |
| 181 | + }, | |
| 182 | + dataFormSubmit() { | |
| 183 | + this.$refs['elForm'].validate((valid) => { | |
| 184 | + if (valid) { | |
| 185 | + if (!this.dataForm.id) { | |
| 186 | + request({ | |
| 187 | + url: `/api/Blind/TbTravelSpot`, | |
| 188 | + method: 'post', | |
| 189 | + data: this.dataForm, | |
| 190 | + }).then((res) => { | |
| 191 | + this.$message({ | |
| 192 | + message: res.msg, | |
| 193 | + type: 'success', | |
| 194 | + duration: 1000, | |
| 195 | + onClose: () => { | |
| 196 | + this.visible = false, | |
| 197 | + this.$emit('refresh', true) | |
| 198 | + } | |
| 199 | + }) | |
| 200 | + }) | |
| 201 | + } else { | |
| 202 | + request({ | |
| 203 | + url: '/api/Blind/TbTravelSpot/' + this.dataForm.id, | |
| 204 | + method: 'PUT', | |
| 205 | + data: this.dataForm | |
| 206 | + }).then((res) => { | |
| 207 | + this.$message({ | |
| 208 | + message: res.msg, | |
| 209 | + type: 'success', | |
| 210 | + duration: 1000, | |
| 211 | + onClose: () => { | |
| 212 | + this.visible = false | |
| 213 | + this.$emit('refresh', true) | |
| 214 | + } | |
| 215 | + }) | |
| 216 | + }) | |
| 217 | + } | |
| 218 | + } | |
| 219 | + }) | |
| 220 | + }, | |
| 221 | + } | |
| 222 | + } | |
| 223 | +</script> | ... | ... |
antis-ncc-admin/src/views/tbTravelSpot/index.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <div class="NCC-common-layout"> | |
| 3 | + <div class="NCC-common-layout-center"> | |
| 4 | + <el-row class="NCC-common-search-box" :gutter="16"> | |
| 5 | + <el-form @submit.native.prevent> | |
| 6 | + <el-col :span="6"> | |
| 7 | + <el-form-item label="标题"> | |
| 8 | + <el-input v-model="query.title" placeholder="标题" clearable /> | |
| 9 | + </el-form-item> | |
| 10 | + </el-col> | |
| 11 | + <el-col :span="6"> | |
| 12 | + <el-form-item label="备注"> | |
| 13 | + <el-input v-model="query.remark" placeholder="备注" /> | |
| 14 | + </el-form-item> | |
| 15 | + </el-col> | |
| 16 | + <el-col :span="6"> | |
| 17 | + <el-form-item> | |
| 18 | + <el-button type="primary" icon="el-icon-search" @click="search()">查询</el-button> | |
| 19 | + <el-button icon="el-icon-refresh-right" @click="reset()">重置</el-button> | |
| 20 | + </el-form-item> | |
| 21 | + </el-col> | |
| 22 | + </el-form> | |
| 23 | + </el-row> | |
| 24 | + <div class="NCC-common-layout-main NCC-flex-main"> | |
| 25 | + <div class="NCC-common-head"> | |
| 26 | + <div> | |
| 27 | + <el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()">新增</el-button> | |
| 28 | + <el-button type="text" icon="el-icon-download" @click="exportData()">导出</el-button> | |
| 29 | + <el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()">批量删除</el-button> | |
| 30 | + </div> | |
| 31 | + <div class="NCC-common-head-right"> | |
| 32 | + <el-tooltip effect="dark" content="刷新" placement="top"> | |
| 33 | + <el-link icon="icon-ym icon-ym-Refresh NCC-common-head-icon" :underline="false" @click="reset()" /> | |
| 34 | + </el-tooltip> | |
| 35 | + <screenfull isContainer /> | |
| 36 | + </div> | |
| 37 | + </div> | |
| 38 | + <NCC-table v-loading="listLoading" :data="list" has-c @selection-change="handleSelectionChange"> | |
| 39 | + <el-table-column prop="title" label="标题" align="left" /> | |
| 40 | + <el-table-column prop="remark" label="备注" align="left" /> | |
| 41 | + <el-table-column prop="creatorTime" label="创建时间" align="left" :formatter="ncc.tableDateFormat"/> | |
| 42 | + <el-table-column prop="lastModifyTime" label="修改时间" align="left" :formatter="ncc.tableDateFormat"/> | |
| 43 | + <el-table-column label="操作" fixed="right" width="100"> | |
| 44 | + <template slot-scope="scope"> | |
| 45 | + <el-button type="text" @click="addOrUpdateHandle(scope.row.id)" >编辑</el-button> | |
| 46 | + <el-button type="text" @click="handleDel(scope.row.id)" class="NCC-table-delBtn" >删除</el-button> | |
| 47 | + </template> | |
| 48 | + </el-table-column> | |
| 49 | + </NCC-table> | |
| 50 | + <pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initData" /> | |
| 51 | + </div> | |
| 52 | + </div> | |
| 53 | + <NCC-Form v-if="formVisible" ref="NCCForm" @refresh="refresh" /> | |
| 54 | + <ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" /> | |
| 55 | + </div> | |
| 56 | +</template> | |
| 57 | +<script> | |
| 58 | + import request from '@/utils/request' | |
| 59 | + import { getDictionaryDataSelector } from '@/api/systemData/dictionary' | |
| 60 | + import NCCForm from './Form' | |
| 61 | + import ExportBox from './ExportBox' | |
| 62 | + import { previewDataInterface } from '@/api/systemData/dataInterface' | |
| 63 | + export default { | |
| 64 | + components: { NCCForm, ExportBox }, | |
| 65 | + data() { | |
| 66 | + return { | |
| 67 | + query: { | |
| 68 | + title:undefined, | |
| 69 | + remark:undefined, | |
| 70 | + }, | |
| 71 | + list: [], | |
| 72 | + listLoading: true, | |
| 73 | + multipleSelection: [], total: 0, | |
| 74 | + listQuery: { | |
| 75 | + currentPage: 1, | |
| 76 | + pageSize: 20, | |
| 77 | + sort: "desc", | |
| 78 | + sidx: "", | |
| 79 | + }, | |
| 80 | + formVisible: false, | |
| 81 | + exportBoxVisible: false, | |
| 82 | + columnList: [ | |
| 83 | + { prop: 'title', label: '标题' }, | |
| 84 | + { prop: 'remark', label: '备注' }, | |
| 85 | + { prop: 'creatorTime', label: '创建时间' }, | |
| 86 | + { prop: 'lastModifyTime', label: '修改时间' }, | |
| 87 | + ], | |
| 88 | + } | |
| 89 | + }, | |
| 90 | + computed: {}, | |
| 91 | + created() { | |
| 92 | + this.initData() | |
| 93 | + }, | |
| 94 | + methods: { | |
| 95 | + initData() { | |
| 96 | + this.listLoading = true; | |
| 97 | + let _query = { | |
| 98 | + ...this.listQuery, | |
| 99 | + ...this.query | |
| 100 | + }; | |
| 101 | + let query = {} | |
| 102 | + for (let key in _query) { | |
| 103 | + if (Array.isArray(_query[key])) { | |
| 104 | + query[key] = _query[key].join() | |
| 105 | + } else { | |
| 106 | + query[key] = _query[key] | |
| 107 | + } | |
| 108 | + } | |
| 109 | + request({ | |
| 110 | + url: `/api/Blind/TbTravelSpot`, | |
| 111 | + method: 'GET', | |
| 112 | + data: query | |
| 113 | + }).then(res => { | |
| 114 | + this.list = res.data.list | |
| 115 | + this.total = res.data.pagination.total | |
| 116 | + this.listLoading = false | |
| 117 | + }) | |
| 118 | + }, | |
| 119 | + handleDel(id) { | |
| 120 | + this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', { | |
| 121 | + type: 'warning' | |
| 122 | + }).then(() => { | |
| 123 | + request({ | |
| 124 | + url: `/api/Blind/TbTravelSpot/${id}`, | |
| 125 | + method: 'DELETE' | |
| 126 | + }).then(res => { | |
| 127 | + this.$message({ | |
| 128 | + type: 'success', | |
| 129 | + message: res.msg, | |
| 130 | + onClose: () => { | |
| 131 | + this.initData() | |
| 132 | + } | |
| 133 | + }); | |
| 134 | + }) | |
| 135 | + }).catch(() => { | |
| 136 | + }); | |
| 137 | + }, | |
| 138 | + handleSelectionChange(val) { | |
| 139 | + const res = val.map(item => item.id) | |
| 140 | + this.multipleSelection = res | |
| 141 | + }, | |
| 142 | + handleBatchRemoveDel() { | |
| 143 | + if (!this.multipleSelection.length) { | |
| 144 | + this.$message({ | |
| 145 | + type: 'error', | |
| 146 | + message: '请选择一条数据', | |
| 147 | + duration: 1500, | |
| 148 | + }) | |
| 149 | + return | |
| 150 | + } | |
| 151 | + const ids = this.multipleSelection | |
| 152 | + this.$confirm('您确定要删除这些数据吗, 是否继续?', '提示', { | |
| 153 | + type: 'warning' | |
| 154 | + }).then(() => { | |
| 155 | + request({ | |
| 156 | + url: `/api/Blind/TbTravelSpot/batchRemove`, | |
| 157 | + method: 'POST', | |
| 158 | + data: ids , | |
| 159 | + }).then(res => { | |
| 160 | + this.$message({ | |
| 161 | + type: 'success', | |
| 162 | + message: res.msg, | |
| 163 | + onClose: () => { | |
| 164 | + this.initData() | |
| 165 | + } | |
| 166 | + }); | |
| 167 | + }) | |
| 168 | + }).catch(() => { }) | |
| 169 | + }, | |
| 170 | + addOrUpdateHandle(id, isDetail) { | |
| 171 | + this.formVisible = true | |
| 172 | + this.$nextTick(() => { | |
| 173 | + this.$refs.NCCForm.init(id, isDetail) | |
| 174 | + }) | |
| 175 | + }, | |
| 176 | + exportData() { | |
| 177 | + this.exportBoxVisible = true | |
| 178 | + this.$nextTick(() => { | |
| 179 | + this.$refs.ExportBox.init(this.columnList) | |
| 180 | + }) | |
| 181 | + }, | |
| 182 | + download(data) { | |
| 183 | + let query = { ...data, ...this.listQuery, ...this.query } | |
| 184 | + request({ | |
| 185 | + url: `/api/Blind/TbTravelSpot/Actions/Export`, | |
| 186 | + method: 'GET', | |
| 187 | + data: query | |
| 188 | + }).then(res => { | |
| 189 | + if (!res.data.url) return | |
| 190 | + window.location.href = this.define.comUrl + res.data.url | |
| 191 | + this.$refs.ExportBox.visible = false | |
| 192 | + this.exportBoxVisible = false | |
| 193 | + }) | |
| 194 | + }, | |
| 195 | + search() { | |
| 196 | + this.listQuery = { | |
| 197 | + currentPage: 1, | |
| 198 | + pageSize: 20, | |
| 199 | + sort: "desc", | |
| 200 | + sidx: "", | |
| 201 | + } | |
| 202 | + this.initData() | |
| 203 | + }, | |
| 204 | + refresh(isrRefresh) { | |
| 205 | + this.formVisible = false | |
| 206 | + if (isrRefresh) this.reset() | |
| 207 | + }, | |
| 208 | + reset() { | |
| 209 | + for (let key in this.query) { | |
| 210 | + this.query[key] = undefined | |
| 211 | + } | |
| 212 | + this.listQuery = { | |
| 213 | + currentPage: 1, | |
| 214 | + pageSize: 20, | |
| 215 | + sort: "desc", | |
| 216 | + sidx: "", | |
| 217 | + } | |
| 218 | + this.initData() | |
| 219 | + } | |
| 220 | + } | |
| 221 | + } | |
| 222 | +</script> | |
| 0 | 223 | \ No newline at end of file | ... | ... |
antis-ncc-admin/src/views/tbUserAgreement/ExportBox.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <el-dialog title="导出数据" :close-on-click-modal="false" :visible.sync="visible" | |
| 3 | + class="NCC-dialog NCC-dialog_center" lock-scroll width="600px"> | |
| 4 | + <el-form label-position="top" label-width="80px"> | |
| 5 | + <el-form-item label="数据选择"> | |
| 6 | + <el-radio-group v-model="type"> | |
| 7 | + <el-radio :label="0">当前页面数据</el-radio> | |
| 8 | + <el-radio :label="1">全部页面数据</el-radio> | |
| 9 | + </el-radio-group> | |
| 10 | + </el-form-item> | |
| 11 | + <el-form-item label="导出字段"> | |
| 12 | + <el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" | |
| 13 | + @change="handleCheckAllChange">全选</el-checkbox> | |
| 14 | + <el-checkbox-group v-model="columns" @change="handleCheckedChange"> | |
| 15 | + <el-checkbox v-for="item in columnList" :label="item.prop" :key="item.prop"> | |
| 16 | + {{item.label}} | |
| 17 | + </el-checkbox> | |
| 18 | + </el-checkbox-group> | |
| 19 | + </el-form-item> | |
| 20 | + </el-form> | |
| 21 | + <span slot="footer" class="dialog-footer"> | |
| 22 | + <el-button @click="visible=false">取 消</el-button> | |
| 23 | + <el-button type="primary" @click="downLoad">导 出</el-button> | |
| 24 | + </span> | |
| 25 | + </el-dialog> | |
| 26 | +</template> | |
| 27 | + | |
| 28 | +<script> | |
| 29 | +export default { | |
| 30 | + data() { | |
| 31 | + return { | |
| 32 | + visible: false, | |
| 33 | + btnLoading: false, | |
| 34 | + type: 0, | |
| 35 | + columns: [], | |
| 36 | + checkAll: true, | |
| 37 | + isIndeterminate: false, | |
| 38 | + columnList: [] | |
| 39 | + } | |
| 40 | + }, | |
| 41 | + methods: { | |
| 42 | + init(columnList) { | |
| 43 | + this.visible = true | |
| 44 | + this.columnList = columnList | |
| 45 | + this.columns = columnList.map(o => o.prop) | |
| 46 | + }, | |
| 47 | + handleCheckAllChange(val) { | |
| 48 | + this.columns = val ? this.columnList.map(o => o.prop) : []; | |
| 49 | + this.isIndeterminate = false; | |
| 50 | + }, | |
| 51 | + handleCheckedChange(value) { | |
| 52 | + let checkedCount = value.length; | |
| 53 | + this.checkAll = checkedCount === this.columnList.length; | |
| 54 | + this.isIndeterminate = checkedCount > 0 && checkedCount < this.columnList.length; | |
| 55 | + }, | |
| 56 | + downLoad() { | |
| 57 | + this.$emit('download', { dataType: this.type, selectKey: this.columns.join(',') }) | |
| 58 | + } | |
| 59 | + } | |
| 60 | +} | |
| 61 | +</script> | |
| 62 | +<style lang="scss" scoped> | |
| 63 | +>>> .el-dialog__body { | |
| 64 | + padding: 20px !important; | |
| 65 | +} | |
| 66 | +</style> | |
| 0 | 67 | \ No newline at end of file | ... | ... |
antis-ncc-admin/src/views/tbUserAgreement/Form.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <el-dialog :title="!dataForm.id ? '新建' : isDetail ? '详情':'编辑'" :close-on-click-modal="false" :visible.sync="visible" class="NCC-dialog NCC-dialog_center" lock-scroll width="600px"> | |
| 3 | + <el-row :gutter="15" class="" > | |
| 4 | + <el-form ref="elForm" :model="dataForm" size="small" label-width="100px" label-position="right" :disabled="!!isDetail" :rules="rules"> | |
| 5 | + <el-col :span="24"> | |
| 6 | + <el-form-item label="协议内容" prop="contents"> | |
| 7 | + <NCC-Quill v-model="dataForm.contents" placeholder="请输入内容..." required > | |
| 8 | + </NCC-Quill> | |
| 9 | + </el-form-item> | |
| 10 | + </el-col> | |
| 11 | + <el-col :span="24" v-if="false" > | |
| 12 | + <el-form-item label="创建时间" prop="creatorTime"> | |
| 13 | + <el-input v-model="dataForm.creatorTime" placeholder="系统自动生成" readonly > | |
| 14 | + </el-input> | |
| 15 | + </el-form-item> | |
| 16 | + </el-col> | |
| 17 | + <el-col :span="24" v-if="false" > | |
| 18 | + <el-form-item label="修改时间" prop="lastModifyTime"> | |
| 19 | + <el-input v-model="dataForm.lastModifyTime" placeholder="系统自动生成" readonly > | |
| 20 | + </el-input> | |
| 21 | + </el-form-item> | |
| 22 | + </el-col> | |
| 23 | + </el-form> | |
| 24 | + </el-row> | |
| 25 | + <span slot="footer" class="dialog-footer"> | |
| 26 | + <el-button @click="visible = false">取 消</el-button> | |
| 27 | + <el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail">确 定</el-button> | |
| 28 | + </span> | |
| 29 | + </el-dialog> | |
| 30 | +</template> | |
| 31 | +<script> | |
| 32 | + import request from '@/utils/request' | |
| 33 | + import { getDictionaryDataSelector } from '@/api/systemData/dictionary' | |
| 34 | + import { previewDataInterface } from '@/api/systemData/dataInterface' | |
| 35 | + export default { | |
| 36 | + components: {}, | |
| 37 | + props: [], | |
| 38 | + data() { | |
| 39 | + return { | |
| 40 | + loading: false, | |
| 41 | + visible: false, | |
| 42 | + isDetail: false, | |
| 43 | + dataForm: { | |
| 44 | + id:'', | |
| 45 | + contents:undefined, | |
| 46 | + creatorTime:undefined, | |
| 47 | + lastModifyTime:undefined, | |
| 48 | + }, | |
| 49 | + rules: { | |
| 50 | + contents:[ | |
| 51 | + { | |
| 52 | + required:true, | |
| 53 | + message:'请输入协议内容', | |
| 54 | + trigger:'blur' | |
| 55 | + }, | |
| 56 | + ], | |
| 57 | + }, | |
| 58 | + } | |
| 59 | + }, | |
| 60 | + computed: {}, | |
| 61 | + watch: {}, | |
| 62 | + created() { | |
| 63 | + }, | |
| 64 | + mounted() { | |
| 65 | + }, | |
| 66 | + methods: { | |
| 67 | + goBack() { | |
| 68 | + this.$emit('refresh') | |
| 69 | + }, | |
| 70 | + init(id, isDetail) { | |
| 71 | + this.dataForm.id = id || 0; | |
| 72 | + this.visible = true; | |
| 73 | + this.isDetail = isDetail || false; | |
| 74 | + this.$nextTick(() => { | |
| 75 | + this.$refs['elForm'].resetFields(); | |
| 76 | + if (this.dataForm.id) { | |
| 77 | + request({ | |
| 78 | + url: '/api/Blind/TbUserAgreement/' + this.dataForm.id, | |
| 79 | + method: 'get' | |
| 80 | + }).then(res =>{ | |
| 81 | + this.dataForm = res.data; | |
| 82 | + }) | |
| 83 | + } | |
| 84 | + }) | |
| 85 | + }, | |
| 86 | + dataFormSubmit() { | |
| 87 | + this.$refs['elForm'].validate((valid) => { | |
| 88 | + if (valid) { | |
| 89 | + if (!this.dataForm.id) { | |
| 90 | + request({ | |
| 91 | + url: `/api/Blind/TbUserAgreement`, | |
| 92 | + method: 'post', | |
| 93 | + data: this.dataForm, | |
| 94 | + }).then((res) => { | |
| 95 | + this.$message({ | |
| 96 | + message: res.msg, | |
| 97 | + type: 'success', | |
| 98 | + duration: 1000, | |
| 99 | + onClose: () => { | |
| 100 | + this.visible = false, | |
| 101 | + this.$emit('refresh', true) | |
| 102 | + } | |
| 103 | + }) | |
| 104 | + }) | |
| 105 | + } else { | |
| 106 | + request({ | |
| 107 | + url: '/api/Blind/TbUserAgreement/' + this.dataForm.id, | |
| 108 | + method: 'PUT', | |
| 109 | + data: this.dataForm | |
| 110 | + }).then((res) => { | |
| 111 | + this.$message({ | |
| 112 | + message: res.msg, | |
| 113 | + type: 'success', | |
| 114 | + duration: 1000, | |
| 115 | + onClose: () => { | |
| 116 | + this.visible = false | |
| 117 | + this.$emit('refresh', true) | |
| 118 | + } | |
| 119 | + }) | |
| 120 | + }) | |
| 121 | + } | |
| 122 | + } | |
| 123 | + }) | |
| 124 | + }, | |
| 125 | + } | |
| 126 | + } | |
| 127 | +</script> | ... | ... |
antis-ncc-admin/src/views/tbUserAgreement/index.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <div class="NCC-common-layout"> | |
| 3 | + <div class="NCC-common-layout-center"> | |
| 4 | + <el-row class="NCC-common-search-box" :gutter="16"> | |
| 5 | + <el-form @submit.native.prevent> | |
| 6 | + <el-col :span="6"> | |
| 7 | + <el-form-item> | |
| 8 | + <el-button type="primary" icon="el-icon-search" @click="search()">查询</el-button> | |
| 9 | + <el-button icon="el-icon-refresh-right" @click="reset()">重置</el-button> | |
| 10 | + </el-form-item> | |
| 11 | + </el-col> | |
| 12 | + </el-form> | |
| 13 | + </el-row> | |
| 14 | + <div class="NCC-common-layout-main NCC-flex-main"> | |
| 15 | + <div class="NCC-common-head"> | |
| 16 | + <div> | |
| 17 | + <el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()">新增</el-button> | |
| 18 | + <el-button type="text" icon="el-icon-download" @click="exportData()">导出</el-button> | |
| 19 | + <el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()">批量删除</el-button> | |
| 20 | + </div> | |
| 21 | + <div class="NCC-common-head-right"> | |
| 22 | + <el-tooltip effect="dark" content="刷新" placement="top"> | |
| 23 | + <el-link icon="icon-ym icon-ym-Refresh NCC-common-head-icon" :underline="false" @click="reset()" /> | |
| 24 | + </el-tooltip> | |
| 25 | + <screenfull isContainer /> | |
| 26 | + </div> | |
| 27 | + </div> | |
| 28 | + <NCC-table v-loading="listLoading" :data="list" has-c @selection-change="handleSelectionChange"> | |
| 29 | + <el-table-column prop="creatorTime" label="创建时间" align="left" :formatter="ncc.tableDateFormat"/> | |
| 30 | + <el-table-column prop="lastModifyTime" label="修改时间" align="left" :formatter="ncc.tableDateFormat"/> | |
| 31 | + <el-table-column label="操作" fixed="right" width="100"> | |
| 32 | + <template slot-scope="scope"> | |
| 33 | + <el-button type="text" @click="addOrUpdateHandle(scope.row.id)" >编辑</el-button> | |
| 34 | + <el-button type="text" @click="handleDel(scope.row.id)" class="NCC-table-delBtn" >删除</el-button> | |
| 35 | + </template> | |
| 36 | + </el-table-column> | |
| 37 | + </NCC-table> | |
| 38 | + <pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initData" /> | |
| 39 | + </div> | |
| 40 | + </div> | |
| 41 | + <NCC-Form v-if="formVisible" ref="NCCForm" @refresh="refresh" /> | |
| 42 | + <ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" /> | |
| 43 | + </div> | |
| 44 | +</template> | |
| 45 | +<script> | |
| 46 | + import request from '@/utils/request' | |
| 47 | + import { getDictionaryDataSelector } from '@/api/systemData/dictionary' | |
| 48 | + import NCCForm from './Form' | |
| 49 | + import ExportBox from './ExportBox' | |
| 50 | + import { previewDataInterface } from '@/api/systemData/dataInterface' | |
| 51 | + export default { | |
| 52 | + components: { NCCForm, ExportBox }, | |
| 53 | + data() { | |
| 54 | + return { | |
| 55 | + query: { | |
| 56 | + }, | |
| 57 | + list: [], | |
| 58 | + listLoading: true, | |
| 59 | + multipleSelection: [], total: 0, | |
| 60 | + listQuery: { | |
| 61 | + currentPage: 1, | |
| 62 | + pageSize: 20, | |
| 63 | + sort: "desc", | |
| 64 | + sidx: "", | |
| 65 | + }, | |
| 66 | + formVisible: false, | |
| 67 | + exportBoxVisible: false, | |
| 68 | + columnList: [ | |
| 69 | + { prop: 'creatorTime', label: '创建时间' }, | |
| 70 | + { prop: 'lastModifyTime', label: '修改时间' }, | |
| 71 | + ], | |
| 72 | + } | |
| 73 | + }, | |
| 74 | + computed: {}, | |
| 75 | + created() { | |
| 76 | + this.initData() | |
| 77 | + }, | |
| 78 | + methods: { | |
| 79 | + initData() { | |
| 80 | + this.listLoading = true; | |
| 81 | + let _query = { | |
| 82 | + ...this.listQuery, | |
| 83 | + ...this.query | |
| 84 | + }; | |
| 85 | + let query = {} | |
| 86 | + for (let key in _query) { | |
| 87 | + if (Array.isArray(_query[key])) { | |
| 88 | + query[key] = _query[key].join() | |
| 89 | + } else { | |
| 90 | + query[key] = _query[key] | |
| 91 | + } | |
| 92 | + } | |
| 93 | + request({ | |
| 94 | + url: `/api/Blind/TbUserAgreement`, | |
| 95 | + method: 'GET', | |
| 96 | + data: query | |
| 97 | + }).then(res => { | |
| 98 | + this.list = res.data.list | |
| 99 | + this.total = res.data.pagination.total | |
| 100 | + this.listLoading = false | |
| 101 | + }) | |
| 102 | + }, | |
| 103 | + handleDel(id) { | |
| 104 | + this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', { | |
| 105 | + type: 'warning' | |
| 106 | + }).then(() => { | |
| 107 | + request({ | |
| 108 | + url: `/api/Blind/TbUserAgreement/${id}`, | |
| 109 | + method: 'DELETE' | |
| 110 | + }).then(res => { | |
| 111 | + this.$message({ | |
| 112 | + type: 'success', | |
| 113 | + message: res.msg, | |
| 114 | + onClose: () => { | |
| 115 | + this.initData() | |
| 116 | + } | |
| 117 | + }); | |
| 118 | + }) | |
| 119 | + }).catch(() => { | |
| 120 | + }); | |
| 121 | + }, | |
| 122 | + handleSelectionChange(val) { | |
| 123 | + const res = val.map(item => item.id) | |
| 124 | + this.multipleSelection = res | |
| 125 | + }, | |
| 126 | + handleBatchRemoveDel() { | |
| 127 | + if (!this.multipleSelection.length) { | |
| 128 | + this.$message({ | |
| 129 | + type: 'error', | |
| 130 | + message: '请选择一条数据', | |
| 131 | + duration: 1500, | |
| 132 | + }) | |
| 133 | + return | |
| 134 | + } | |
| 135 | + const ids = this.multipleSelection | |
| 136 | + this.$confirm('您确定要删除这些数据吗, 是否继续?', '提示', { | |
| 137 | + type: 'warning' | |
| 138 | + }).then(() => { | |
| 139 | + request({ | |
| 140 | + url: `/api/Blind/TbUserAgreement/batchRemove`, | |
| 141 | + method: 'POST', | |
| 142 | + data: ids , | |
| 143 | + }).then(res => { | |
| 144 | + this.$message({ | |
| 145 | + type: 'success', | |
| 146 | + message: res.msg, | |
| 147 | + onClose: () => { | |
| 148 | + this.initData() | |
| 149 | + } | |
| 150 | + }); | |
| 151 | + }) | |
| 152 | + }).catch(() => { }) | |
| 153 | + }, | |
| 154 | + addOrUpdateHandle(id, isDetail) { | |
| 155 | + this.formVisible = true | |
| 156 | + this.$nextTick(() => { | |
| 157 | + this.$refs.NCCForm.init(id, isDetail) | |
| 158 | + }) | |
| 159 | + }, | |
| 160 | + exportData() { | |
| 161 | + this.exportBoxVisible = true | |
| 162 | + this.$nextTick(() => { | |
| 163 | + this.$refs.ExportBox.init(this.columnList) | |
| 164 | + }) | |
| 165 | + }, | |
| 166 | + download(data) { | |
| 167 | + let query = { ...data, ...this.listQuery, ...this.query } | |
| 168 | + request({ | |
| 169 | + url: `/api/Blind/TbUserAgreement/Actions/Export`, | |
| 170 | + method: 'GET', | |
| 171 | + data: query | |
| 172 | + }).then(res => { | |
| 173 | + if (!res.data.url) return | |
| 174 | + window.location.href = this.define.comUrl + res.data.url | |
| 175 | + this.$refs.ExportBox.visible = false | |
| 176 | + this.exportBoxVisible = false | |
| 177 | + }) | |
| 178 | + }, | |
| 179 | + search() { | |
| 180 | + this.listQuery = { | |
| 181 | + currentPage: 1, | |
| 182 | + pageSize: 20, | |
| 183 | + sort: "desc", | |
| 184 | + sidx: "", | |
| 185 | + } | |
| 186 | + this.initData() | |
| 187 | + }, | |
| 188 | + refresh(isrRefresh) { | |
| 189 | + this.formVisible = false | |
| 190 | + if (isrRefresh) this.reset() | |
| 191 | + }, | |
| 192 | + reset() { | |
| 193 | + for (let key in this.query) { | |
| 194 | + this.query[key] = undefined | |
| 195 | + } | |
| 196 | + this.listQuery = { | |
| 197 | + currentPage: 1, | |
| 198 | + pageSize: 20, | |
| 199 | + sort: "desc", | |
| 200 | + sidx: "", | |
| 201 | + } | |
| 202 | + this.initData() | |
| 203 | + } | |
| 204 | + } | |
| 205 | + } | |
| 206 | +</script> | |
| 0 | 207 | \ No newline at end of file | ... | ... |
antis-ncc-admin/src/views/tbVideo/Form.vue
| ... | ... | @@ -75,7 +75,7 @@ |
| 75 | 75 | this.$refs['elForm'].resetFields(); |
| 76 | 76 | if (this.dataForm.id) { |
| 77 | 77 | request({ |
| 78 | - url: '/api/Education/TbVideo/' + this.dataForm.id, | |
| 78 | + url: '/api/Blind/TbVideo/' + this.dataForm.id, | |
| 79 | 79 | method: 'get' |
| 80 | 80 | }).then(res =>{ |
| 81 | 81 | this.dataForm = res.data; |
| ... | ... | @@ -89,7 +89,7 @@ |
| 89 | 89 | if (valid) { |
| 90 | 90 | if (!this.dataForm.id) { |
| 91 | 91 | request({ |
| 92 | - url: `/api/Education/TbVideo`, | |
| 92 | + url: `/api/Blind/TbVideo`, | |
| 93 | 93 | method: 'post', |
| 94 | 94 | data: this.dataForm, |
| 95 | 95 | }).then((res) => { | ... | ... |
antis-ncc-admin/src/views/tbVideo/index.vue
| ... | ... | @@ -91,7 +91,7 @@ |
| 91 | 91 | } |
| 92 | 92 | } |
| 93 | 93 | request({ |
| 94 | - url: `/api/Education/TbVideo`, | |
| 94 | + url: `/api/Blind/TbVideo`, | |
| 95 | 95 | method: 'GET', |
| 96 | 96 | data: query |
| 97 | 97 | }).then(res => { |
| ... | ... | @@ -105,7 +105,7 @@ |
| 105 | 105 | type: 'warning' |
| 106 | 106 | }).then(() => { |
| 107 | 107 | request({ |
| 108 | - url: `/api/Education/TbVideo/${id}`, | |
| 108 | + url: `/api/Blind/TbVideo/${id}`, | |
| 109 | 109 | method: 'DELETE' |
| 110 | 110 | }).then(res => { |
| 111 | 111 | this.$message({ |
| ... | ... | @@ -137,7 +137,7 @@ |
| 137 | 137 | type: 'warning' |
| 138 | 138 | }).then(() => { |
| 139 | 139 | request({ |
| 140 | - url: `/api/Education/TbVideo/batchRemove`, | |
| 140 | + url: `/api/Blind/TbVideo/batchRemove`, | |
| 141 | 141 | method: 'POST', |
| 142 | 142 | data: ids , |
| 143 | 143 | }).then(res => { |
| ... | ... | @@ -166,7 +166,7 @@ |
| 166 | 166 | download(data) { |
| 167 | 167 | let query = { ...data, ...this.listQuery, ...this.query } |
| 168 | 168 | request({ |
| 169 | - url: `/api/Education/TbVideo/Actions/Export`, | |
| 169 | + url: `/api/Blind/TbVideo/Actions/Export`, | |
| 170 | 170 | method: 'GET', |
| 171 | 171 | data: query |
| 172 | 172 | }).then(res => { | ... | ... |
antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路/Dto/TbMbtLineCrInput.cs
0 → 100644
| 1 | +using System; | |
| 2 | +using System.Collections.Generic; | |
| 3 | +using NCC.Common.Model; | |
| 4 | + | |
| 5 | +namespace NCC.Blind.Entitys.Dto.TbMbtLine | |
| 6 | +{ | |
| 7 | + /// <summary> | |
| 8 | + /// MBT人格线路修改输入参数 | |
| 9 | + /// </summary> | |
| 10 | + public class TbMbtLineCrInput | |
| 11 | + { | |
| 12 | + /// <summary> | |
| 13 | + /// 标题 | |
| 14 | + /// </summary> | |
| 15 | + public string name { get; set; } | |
| 16 | + | |
| 17 | + /// <summary> | |
| 18 | + /// MBT人格ID | |
| 19 | + /// </summary> | |
| 20 | + public string mbtId { get; set; } | |
| 21 | + | |
| 22 | + /// <summary> | |
| 23 | + /// 线路概况 | |
| 24 | + /// </summary> | |
| 25 | + public string remark { get; set; } | |
| 26 | + | |
| 27 | + /// <summary> | |
| 28 | + /// 线路图片 | |
| 29 | + /// </summary> | |
| 30 | + public List<FileControlsModel> banner { get; set; } | |
| 31 | + | |
| 32 | + /// <summary> | |
| 33 | + /// 创建时间 | |
| 34 | + /// </summary> | |
| 35 | + public DateTime? creatorTime { get; set; } | |
| 36 | + | |
| 37 | + /// <summary> | |
| 38 | + /// 修改时间 | |
| 39 | + /// </summary> | |
| 40 | + public DateTime? lastModifyTime { get; set; } | |
| 41 | + | |
| 42 | + } | |
| 43 | +} | ... | ... |
antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路/Dto/TbMbtLineInfoOutput.cs
0 → 100644
| 1 | +using System; | |
| 2 | +using System.Collections.Generic; | |
| 3 | +using NCC.Common.Model; | |
| 4 | + | |
| 5 | +namespace NCC.Blind.Entitys.Dto.TbMbtLine | |
| 6 | +{ | |
| 7 | + /// <summary> | |
| 8 | + /// MBT人格线路输出参数 | |
| 9 | + /// </summary> | |
| 10 | + public class TbMbtLineInfoOutput | |
| 11 | + { | |
| 12 | + /// <summary> | |
| 13 | + /// 主键 | |
| 14 | + /// </summary> | |
| 15 | + public string id { get; set; } | |
| 16 | + | |
| 17 | + /// <summary> | |
| 18 | + /// 标题 | |
| 19 | + /// </summary> | |
| 20 | + public string name { get; set; } | |
| 21 | + | |
| 22 | + /// <summary> | |
| 23 | + /// MBT人格ID | |
| 24 | + /// </summary> | |
| 25 | + public string mbtId { get; set; } | |
| 26 | + | |
| 27 | + /// <summary> | |
| 28 | + /// 线路概况 | |
| 29 | + /// </summary> | |
| 30 | + public string remark { get; set; } | |
| 31 | + | |
| 32 | + /// <summary> | |
| 33 | + /// 线路图片 | |
| 34 | + /// </summary> | |
| 35 | + public List<FileControlsModel> banner { get; set; } | |
| 36 | + | |
| 37 | + /// <summary> | |
| 38 | + /// 创建时间 | |
| 39 | + /// </summary> | |
| 40 | + public DateTime? creatorTime { get; set; } | |
| 41 | + | |
| 42 | + /// <summary> | |
| 43 | + /// 修改时间 | |
| 44 | + /// </summary> | |
| 45 | + public DateTime? lastModifyTime { get; set; } | |
| 46 | + | |
| 47 | + } | |
| 48 | +} | ... | ... |
antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路/Dto/TbMbtLineListOutput.cs
0 → 100644
| 1 | +using Aspose.Words.Lists; | |
| 2 | +using NCC.Common.Model; | |
| 3 | +using NCC.Education.Entitys; | |
| 4 | +using Newtonsoft.Json; | |
| 5 | +using System; | |
| 6 | +using System.Collections.Generic; | |
| 7 | + | |
| 8 | +namespace NCC.Blind.Entitys.Dto.TbMbtLine | |
| 9 | +{ | |
| 10 | + /// <summary> | |
| 11 | + /// MBT人格线路输入参数 | |
| 12 | + /// </summary> | |
| 13 | + public class TbMbtLineListOutput | |
| 14 | + { | |
| 15 | + /// <summary> | |
| 16 | + /// 主键 | |
| 17 | + /// </summary> | |
| 18 | + public string id { get; set; } | |
| 19 | + | |
| 20 | + /// <summary> | |
| 21 | + /// 标题 | |
| 22 | + /// </summary> | |
| 23 | + public string name { get; set; } | |
| 24 | + | |
| 25 | + /// <summary> | |
| 26 | + /// MBT人格ID | |
| 27 | + /// </summary> | |
| 28 | + public string mbtId { get; set; } | |
| 29 | + | |
| 30 | + /// <summary> | |
| 31 | + /// MBT人格信息 | |
| 32 | + /// </summary> | |
| 33 | + public TbMbtCharacterEntity mbt { get; set; } | |
| 34 | + | |
| 35 | + /// <summary> | |
| 36 | + /// 线路概况 | |
| 37 | + /// </summary> | |
| 38 | + public string remark { get; set; } | |
| 39 | + | |
| 40 | + /// <summary> | |
| 41 | + /// 创建时间 | |
| 42 | + /// </summary> | |
| 43 | + public DateTime? creatorTime { get; set; } | |
| 44 | + | |
| 45 | + /// <summary> | |
| 46 | + /// 修改时间 | |
| 47 | + /// </summary> | |
| 48 | + public DateTime? lastModifyTime { get; set; } | |
| 49 | + /// <summary> | |
| 50 | + /// 图片信息 | |
| 51 | + /// </summary> | |
| 52 | + public string banner { get; set; } | |
| 53 | + /// <summary> | |
| 54 | + /// 图片信息 | |
| 55 | + /// </summary> | |
| 56 | + public List<FileControlsModel> Banner { get | |
| 57 | + { | |
| 58 | + try | |
| 59 | + { | |
| 60 | + return JsonConvert.DeserializeObject<List<FileControlsModel>>(banner); | |
| 61 | + }catch(Exception ex) | |
| 62 | + { | |
| 63 | + return new List<FileControlsModel>(); | |
| 64 | + } | |
| 65 | + } } | |
| 66 | + | |
| 67 | + } | |
| 68 | +} | ... | ... |
antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路/Dto/TbMbtLineListQueryInput.cs
0 → 100644
| 1 | +using NCC.Common.Filter; | |
| 2 | +using System.Collections.Generic; | |
| 3 | + | |
| 4 | +namespace NCC.Blind.Entitys.Dto.TbMbtLine | |
| 5 | +{ | |
| 6 | + /// <summary> | |
| 7 | + /// MBT人格线路列表查询输入 | |
| 8 | + /// </summary> | |
| 9 | + public class TbMbtLineListQueryInput : PageInputBase | |
| 10 | + { | |
| 11 | + /// <summary> | |
| 12 | + /// 选择导出数据key | |
| 13 | + /// </summary> | |
| 14 | + public string selectKey { get; set; } | |
| 15 | + | |
| 16 | + /// <summary> | |
| 17 | + /// | |
| 18 | + /// </summary> | |
| 19 | + public int dataType { get; set; } | |
| 20 | + | |
| 21 | + | |
| 22 | + /// <summary> | |
| 23 | + /// 标题 | |
| 24 | + /// </summary> | |
| 25 | + public string name { get; set; } | |
| 26 | + | |
| 27 | + /// <summary> | |
| 28 | + /// MBT人格ID | |
| 29 | + /// </summary> | |
| 30 | + public string mbtId { get; set; } | |
| 31 | + | |
| 32 | + /// <summary> | |
| 33 | + /// 线路概况 | |
| 34 | + /// </summary> | |
| 35 | + public string remark { get; set; } | |
| 36 | + | |
| 37 | + } | |
| 38 | +} | ... | ... |
antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路/Dto/TbMbtLineUpInput.cs
0 → 100644
| 1 | +using System; | |
| 2 | +using System.Collections.Generic; | |
| 3 | + | |
| 4 | +namespace NCC.Blind.Entitys.Dto.TbMbtLine | |
| 5 | +{ | |
| 6 | + /// <summary> | |
| 7 | + /// MBT人格线路更新输入参数 | |
| 8 | + /// </summary> | |
| 9 | + public class TbMbtLineUpInput : TbMbtLineCrInput | |
| 10 | + { | |
| 11 | + /// <summary> | |
| 12 | + /// 主键 | |
| 13 | + /// </summary> | |
| 14 | + public string id { get; set; } | |
| 15 | + | |
| 16 | + } | |
| 17 | +} | ... | ... |
antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路/Entity/TbMbtLineEntity.cs
0 → 100644
| 1 | +using NCC.Common.Const; | |
| 2 | +using SqlSugar; | |
| 3 | +using System; | |
| 4 | + | |
| 5 | +namespace NCC.Blind.Entitys | |
| 6 | +{ | |
| 7 | + /// <summary> | |
| 8 | + /// MBT人格线路 | |
| 9 | + /// </summary> | |
| 10 | + [SugarTable("tb_MbtLine")] | |
| 11 | + [Tenant(ClaimConst.TENANT_ID)] | |
| 12 | + public class TbMbtLineEntity | |
| 13 | + { | |
| 14 | + /// <summary> | |
| 15 | + /// 主键 | |
| 16 | + /// </summary> | |
| 17 | + [SugarColumn(ColumnName = "F_Id", IsPrimaryKey = true)] | |
| 18 | + public string Id { get; set; } | |
| 19 | + | |
| 20 | + /// <summary> | |
| 21 | + /// 标题 | |
| 22 | + /// </summary> | |
| 23 | + [SugarColumn(ColumnName = "F_Name")] | |
| 24 | + public string Name { get; set; } | |
| 25 | + | |
| 26 | + /// <summary> | |
| 27 | + /// MBT人格ID | |
| 28 | + /// </summary> | |
| 29 | + [SugarColumn(ColumnName = "F_MbtId")] | |
| 30 | + public string MbtId { get; set; } | |
| 31 | + | |
| 32 | + /// <summary> | |
| 33 | + /// 线路概况 | |
| 34 | + /// </summary> | |
| 35 | + [SugarColumn(ColumnName = "F_Remark")] | |
| 36 | + public string Remark { get; set; } | |
| 37 | + | |
| 38 | + /// <summary> | |
| 39 | + /// 线路图片 | |
| 40 | + /// </summary> | |
| 41 | + [SugarColumn(ColumnName = "F_Banner")] | |
| 42 | + public string Banner { get; set; } | |
| 43 | + | |
| 44 | + /// <summary> | |
| 45 | + /// 创建时间 | |
| 46 | + /// </summary> | |
| 47 | + [SugarColumn(ColumnName = "F_CreatorTime")] | |
| 48 | + public DateTime? CreatorTime { get; set; } | |
| 49 | + | |
| 50 | + /// <summary> | |
| 51 | + /// 修改时间 | |
| 52 | + /// </summary> | |
| 53 | + [SugarColumn(ColumnName = "F_LastModifyTime")] | |
| 54 | + public DateTime? LastModifyTime { get; set; } | |
| 55 | + | |
| 56 | + } | |
| 57 | +} | |
| 0 | 58 | \ No newline at end of file | ... | ... |
antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路/Mapper/TbMbtLineMapper.cs
0 → 100644
| 1 | +using NCC.Common.Helper; | |
| 2 | +using NCC.Common.Model; | |
| 3 | +using NCC.Blind.Entitys.Dto.TbMbtLine; | |
| 4 | +using Mapster; | |
| 5 | +using System.Collections.Generic; | |
| 6 | + | |
| 7 | +namespace NCC.Blind.Entitys.Mapper.TbMbtLine | |
| 8 | +{ | |
| 9 | + public class Mapper : IRegister | |
| 10 | + { | |
| 11 | + public void Register(TypeAdapterConfig config) | |
| 12 | + { | |
| 13 | + config.ForType<TbMbtLineCrInput, TbMbtLineEntity>() | |
| 14 | + .Map(dest => dest.Banner, src => src.banner.ToJson()) | |
| 15 | + ; | |
| 16 | + config.ForType<TbMbtLineEntity, TbMbtLineInfoOutput>() | |
| 17 | + .Map(dest => dest.banner, src => src.Banner.ToObject<List<FileControlsModel>>()) | |
| 18 | + ; | |
| 19 | + } | |
| 20 | + } | |
| 21 | +} | ... | ... |
antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路节点/Dto/TbMbtLineNodeCrInput.cs
0 → 100644
| 1 | +using System; | |
| 2 | +using System.Collections.Generic; | |
| 3 | +using NCC.Common.Model; | |
| 4 | + | |
| 5 | +namespace NCC.Blind.Entitys.Dto.TbMbtLineNode | |
| 6 | +{ | |
| 7 | + /// <summary> | |
| 8 | + /// MBT人格线路节点修改输入参数 | |
| 9 | + /// </summary> | |
| 10 | + public class TbMbtLineNodeCrInput | |
| 11 | + { | |
| 12 | + /// <summary> | |
| 13 | + /// MBT人格线路ID | |
| 14 | + /// </summary> | |
| 15 | + public string mbtLineId { get; set; } | |
| 16 | + | |
| 17 | + /// <summary> | |
| 18 | + /// 节点标题 | |
| 19 | + /// </summary> | |
| 20 | + public string title { get; set; } | |
| 21 | + | |
| 22 | + /// <summary> | |
| 23 | + /// 节点简介 | |
| 24 | + /// </summary> | |
| 25 | + public string description { get; set; } | |
| 26 | + | |
| 27 | + /// <summary> | |
| 28 | + /// 节点图片 | |
| 29 | + /// </summary> | |
| 30 | + public List<FileControlsModel> banner { get; set; } | |
| 31 | + | |
| 32 | + /// <summary> | |
| 33 | + /// 节点注意事项 | |
| 34 | + /// </summary> | |
| 35 | + public string remark { get; set; } | |
| 36 | + | |
| 37 | + /// <summary> | |
| 38 | + /// 创建时间 | |
| 39 | + /// </summary> | |
| 40 | + public DateTime? creatorTime { get; set; } | |
| 41 | + | |
| 42 | + /// <summary> | |
| 43 | + /// 修改时间 | |
| 44 | + /// </summary> | |
| 45 | + public DateTime? lastModifyTime { get; set; } | |
| 46 | + /// <summary> | |
| 47 | + /// 排序 | |
| 48 | + /// </summary> | |
| 49 | + public int? sorts { get; set; } | |
| 50 | + | |
| 51 | + } | |
| 52 | +} | ... | ... |
antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路节点/Dto/TbMbtLineNodeInfoOutput.cs
0 → 100644
| 1 | +using System; | |
| 2 | +using System.Collections.Generic; | |
| 3 | +using NCC.Common.Model; | |
| 4 | + | |
| 5 | +namespace NCC.Blind.Entitys.Dto.TbMbtLineNode | |
| 6 | +{ | |
| 7 | + /// <summary> | |
| 8 | + /// MBT人格线路节点输出参数 | |
| 9 | + /// </summary> | |
| 10 | + public class TbMbtLineNodeInfoOutput | |
| 11 | + { | |
| 12 | + /// <summary> | |
| 13 | + /// 主键 | |
| 14 | + /// </summary> | |
| 15 | + public string id { get; set; } | |
| 16 | + | |
| 17 | + /// <summary> | |
| 18 | + /// MBT人格线路ID | |
| 19 | + /// </summary> | |
| 20 | + public string mbtLineId { get; set; } | |
| 21 | + | |
| 22 | + /// <summary> | |
| 23 | + /// 节点标题 | |
| 24 | + /// </summary> | |
| 25 | + public string title { get; set; } | |
| 26 | + | |
| 27 | + /// <summary> | |
| 28 | + /// 节点简介 | |
| 29 | + /// </summary> | |
| 30 | + public string description { get; set; } | |
| 31 | + | |
| 32 | + /// <summary> | |
| 33 | + /// 节点图片 | |
| 34 | + /// </summary> | |
| 35 | + public List<FileControlsModel> banner { get; set; } | |
| 36 | + | |
| 37 | + /// <summary> | |
| 38 | + /// 节点注意事项 | |
| 39 | + /// </summary> | |
| 40 | + public string remark { get; set; } | |
| 41 | + | |
| 42 | + /// <summary> | |
| 43 | + /// 创建时间 | |
| 44 | + /// </summary> | |
| 45 | + public DateTime? creatorTime { get; set; } | |
| 46 | + | |
| 47 | + /// <summary> | |
| 48 | + /// 修改时间 | |
| 49 | + /// </summary> | |
| 50 | + public DateTime? lastModifyTime { get; set; } | |
| 51 | + /// <summary> | |
| 52 | + /// 排序 | |
| 53 | + /// </summary> | |
| 54 | + public int? sorts { get; set; } | |
| 55 | + | |
| 56 | + } | |
| 57 | +} | ... | ... |
antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路节点/Dto/TbMbtLineNodeListOutput.cs
0 → 100644
| 1 | +using Aspose.Words.Lists; | |
| 2 | +using NCC.Common.Model; | |
| 3 | +using Newtonsoft.Json; | |
| 4 | +using System; | |
| 5 | +using System.Collections.Generic; | |
| 6 | + | |
| 7 | +namespace NCC.Blind.Entitys.Dto.TbMbtLineNode | |
| 8 | +{ | |
| 9 | + /// <summary> | |
| 10 | + /// MBT人格线路节点输入参数 | |
| 11 | + /// </summary> | |
| 12 | + public class TbMbtLineNodeListOutput | |
| 13 | + { | |
| 14 | + /// <summary> | |
| 15 | + /// 主键 | |
| 16 | + /// </summary> | |
| 17 | + public string id { get; set; } | |
| 18 | + | |
| 19 | + /// <summary> | |
| 20 | + /// MBT人格线路ID | |
| 21 | + /// </summary> | |
| 22 | + public string mbtLineId { get; set; } | |
| 23 | + /// <summary> | |
| 24 | + /// MBT人格线路信息 | |
| 25 | + /// </summary> | |
| 26 | + public TbMbtLineEntity mbtLine { get; set; } | |
| 27 | + | |
| 28 | + /// <summary> | |
| 29 | + /// 节点标题 | |
| 30 | + /// </summary> | |
| 31 | + public string title { get; set; } | |
| 32 | + | |
| 33 | + /// <summary> | |
| 34 | + /// 节点简介 | |
| 35 | + /// </summary> | |
| 36 | + public string description { get; set; } | |
| 37 | + | |
| 38 | + /// <summary> | |
| 39 | + /// 节点注意事项 | |
| 40 | + /// </summary> | |
| 41 | + public string remark { get; set; } | |
| 42 | + | |
| 43 | + /// <summary> | |
| 44 | + /// 创建时间 | |
| 45 | + /// </summary> | |
| 46 | + public DateTime? creatorTime { get; set; } | |
| 47 | + | |
| 48 | + /// <summary> | |
| 49 | + /// 修改时间 | |
| 50 | + /// </summary> | |
| 51 | + public DateTime? lastModifyTime { get; set; } | |
| 52 | + /// <summary> | |
| 53 | + /// 排序 | |
| 54 | + /// </summary> | |
| 55 | + public int? sorts { get; set; } | |
| 56 | + | |
| 57 | + /// <summary> | |
| 58 | + /// 图片信息 | |
| 59 | + /// </summary> | |
| 60 | + public string banner { get; set; } | |
| 61 | + /// <summary> | |
| 62 | + /// 图片信息 | |
| 63 | + /// </summary> | |
| 64 | + public List<FileControlsModel> Banner { get | |
| 65 | + { | |
| 66 | + try | |
| 67 | + { | |
| 68 | + return JsonConvert.DeserializeObject<List<FileControlsModel>>(banner); | |
| 69 | + }catch(Exception ex) | |
| 70 | + { | |
| 71 | + return new List<FileControlsModel>(); | |
| 72 | + } | |
| 73 | + } } | |
| 74 | + | |
| 75 | + } | |
| 76 | +} | ... | ... |
antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路节点/Dto/TbMbtLineNodeListQueryInput.cs
0 → 100644
| 1 | +using NCC.Common.Filter; | |
| 2 | +using System.Collections.Generic; | |
| 3 | + | |
| 4 | +namespace NCC.Blind.Entitys.Dto.TbMbtLineNode | |
| 5 | +{ | |
| 6 | + /// <summary> | |
| 7 | + /// MBT人格线路节点列表查询输入 | |
| 8 | + /// </summary> | |
| 9 | + public class TbMbtLineNodeListQueryInput : PageInputBase | |
| 10 | + { | |
| 11 | + /// <summary> | |
| 12 | + /// 选择导出数据key | |
| 13 | + /// </summary> | |
| 14 | + public string selectKey { get; set; } | |
| 15 | + | |
| 16 | + /// <summary> | |
| 17 | + /// | |
| 18 | + /// </summary> | |
| 19 | + public int dataType { get; set; } | |
| 20 | + | |
| 21 | + | |
| 22 | + /// <summary> | |
| 23 | + /// MBT人格线路ID | |
| 24 | + /// </summary> | |
| 25 | + public string mbtLineId { get; set; } | |
| 26 | + | |
| 27 | + /// <summary> | |
| 28 | + /// 节点标题 | |
| 29 | + /// </summary> | |
| 30 | + public string title { get; set; } | |
| 31 | + | |
| 32 | + /// <summary> | |
| 33 | + /// 节点简介 | |
| 34 | + /// </summary> | |
| 35 | + public string description { get; set; } | |
| 36 | + | |
| 37 | + /// <summary> | |
| 38 | + /// 节点注意事项 | |
| 39 | + /// </summary> | |
| 40 | + public string remark { get; set; } | |
| 41 | + | |
| 42 | + } | |
| 43 | +} | ... | ... |
antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路节点/Dto/TbMbtLineNodeUpInput.cs
0 → 100644
| 1 | +using System; | |
| 2 | +using System.Collections.Generic; | |
| 3 | + | |
| 4 | +namespace NCC.Blind.Entitys.Dto.TbMbtLineNode | |
| 5 | +{ | |
| 6 | + /// <summary> | |
| 7 | + /// MBT人格线路节点更新输入参数 | |
| 8 | + /// </summary> | |
| 9 | + public class TbMbtLineNodeUpInput : TbMbtLineNodeCrInput | |
| 10 | + { | |
| 11 | + /// <summary> | |
| 12 | + /// 主键 | |
| 13 | + /// </summary> | |
| 14 | + public string id { get; set; } | |
| 15 | + | |
| 16 | + } | |
| 17 | +} | ... | ... |
antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路节点/Entity/TbMbtLineNodeEntity.cs
0 → 100644
| 1 | +using NCC.Common.Const; | |
| 2 | +using SqlSugar; | |
| 3 | +using System; | |
| 4 | + | |
| 5 | +namespace NCC.Blind.Entitys | |
| 6 | +{ | |
| 7 | + /// <summary> | |
| 8 | + /// MBT人格线路节点 | |
| 9 | + /// </summary> | |
| 10 | + [SugarTable("tb_MbtLineNode")] | |
| 11 | + [Tenant(ClaimConst.TENANT_ID)] | |
| 12 | + public class TbMbtLineNodeEntity | |
| 13 | + { | |
| 14 | + /// <summary> | |
| 15 | + /// 主键 | |
| 16 | + /// </summary> | |
| 17 | + [SugarColumn(ColumnName = "F_Id", IsPrimaryKey = true)] | |
| 18 | + public string Id { get; set; } | |
| 19 | + | |
| 20 | + /// <summary> | |
| 21 | + /// MBT人格线路ID | |
| 22 | + /// </summary> | |
| 23 | + [SugarColumn(ColumnName = "F_MbtLineId")] | |
| 24 | + public string MbtLineId { get; set; } | |
| 25 | + | |
| 26 | + /// <summary> | |
| 27 | + /// 节点标题 | |
| 28 | + /// </summary> | |
| 29 | + [SugarColumn(ColumnName = "F_Title")] | |
| 30 | + public string Title { get; set; } | |
| 31 | + | |
| 32 | + /// <summary> | |
| 33 | + /// 节点简介 | |
| 34 | + /// </summary> | |
| 35 | + [SugarColumn(ColumnName = "F_Description")] | |
| 36 | + public string Description { get; set; } | |
| 37 | + | |
| 38 | + /// <summary> | |
| 39 | + /// 节点图片 | |
| 40 | + /// </summary> | |
| 41 | + [SugarColumn(ColumnName = "F_Banner")] | |
| 42 | + public string Banner { get; set; } | |
| 43 | + | |
| 44 | + /// <summary> | |
| 45 | + /// 节点注意事项 | |
| 46 | + /// </summary> | |
| 47 | + [SugarColumn(ColumnName = "F_Remark")] | |
| 48 | + public string Remark { get; set; } | |
| 49 | + | |
| 50 | + /// <summary> | |
| 51 | + /// 创建时间 | |
| 52 | + /// </summary> | |
| 53 | + [SugarColumn(ColumnName = "F_CreatorTime")] | |
| 54 | + public DateTime? CreatorTime { get; set; } | |
| 55 | + | |
| 56 | + /// <summary> | |
| 57 | + /// 修改时间 | |
| 58 | + /// </summary> | |
| 59 | + [SugarColumn(ColumnName = "F_LastModifyTime")] | |
| 60 | + public DateTime? LastModifyTime { get; set; } | |
| 61 | + | |
| 62 | + /// <summary> | |
| 63 | + /// 排序 | |
| 64 | + /// </summary> | |
| 65 | + [SugarColumn(ColumnName = "F_Sorts")] | |
| 66 | + public int? Sorts { get; set; } | |
| 67 | + | |
| 68 | + } | |
| 69 | +} | |
| 0 | 70 | \ No newline at end of file | ... | ... |
antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路节点/Mapper/TbMbtLineNodeMapper.cs
0 → 100644
| 1 | +using NCC.Common.Helper; | |
| 2 | +using NCC.Common.Model; | |
| 3 | +using NCC.Blind.Entitys.Dto.TbMbtLineNode; | |
| 4 | +using Mapster; | |
| 5 | +using System.Collections.Generic; | |
| 6 | + | |
| 7 | +namespace NCC.Blind.Entitys.Mapper.TbMbtLineNode | |
| 8 | +{ | |
| 9 | + public class Mapper : IRegister | |
| 10 | + { | |
| 11 | + public void Register(TypeAdapterConfig config) | |
| 12 | + { | |
| 13 | + config.ForType<TbMbtLineNodeCrInput, TbMbtLineNodeEntity>() | |
| 14 | + .Map(dest => dest.Banner, src => src.banner.ToJson()) | |
| 15 | + ; | |
| 16 | + config.ForType<TbMbtLineNodeEntity, TbMbtLineNodeInfoOutput>() | |
| 17 | + .Map(dest => dest.banner, src => src.Banner.ToObject<List<FileControlsModel>>()) | |
| 18 | + ; | |
| 19 | + } | |
| 20 | + } | |
| 21 | +} | ... | ... |
antis-ncc-net-core/NCC.BlindBox.Entitys/NCC.BlindBox.Entitys.csproj
| 1 | -<Project Sdk="Microsoft.NET.Sdk"> | |
| 1 | +<Project Sdk="Microsoft.NET.Sdk"> | |
| 2 | 2 | |
| 3 | 3 | <PropertyGroup> |
| 4 | 4 | <TargetFramework>net5.0</TargetFramework> |
| 5 | + <GenerateDocumentationFile>True</GenerateDocumentationFile> | |
| 5 | 6 | </PropertyGroup> |
| 6 | 7 | |
| 7 | 8 | <ItemGroup> |
| 8 | 9 | <ProjectReference Include="..\src\Infrastructure\NCC.Expand.Thirdparty\NCC.Expand.Thirdparty.csproj" /> |
| 9 | 10 | <ProjectReference Include="..\src\Modularity\Common\NCC.Common\NCC.Common.csproj" /> |
| 11 | + <ProjectReference Include="..\src\Modularity\System\NCC.System.Entitys\NCC.System.Entitys.csproj" /> | |
| 10 | 12 | </ItemGroup> |
| 11 | 13 | |
| 12 | 14 | </Project> | ... | ... |
antis-ncc-net-core/NCC.BlindBox.Entitys/价格设定/Dto/TbSettingPriceCrInput.cs
0 → 100644
| 1 | +using System; | |
| 2 | +using System.Collections.Generic; | |
| 3 | + | |
| 4 | +namespace NCC.Blind.Entitys.Dto.TbSettingPrice | |
| 5 | +{ | |
| 6 | + /// <summary> | |
| 7 | + /// 价格设定修改输入参数 | |
| 8 | + /// </summary> | |
| 9 | + public class TbSettingPriceCrInput | |
| 10 | + { | |
| 11 | + /// <summary> | |
| 12 | + /// 价格 | |
| 13 | + /// </summary> | |
| 14 | + public decimal price { get; set; } | |
| 15 | + | |
| 16 | + /// <summary> | |
| 17 | + /// 类型 1--盲盒价格 2--门票价格 | |
| 18 | + /// </summary> | |
| 19 | + public string type { get; set; } | |
| 20 | + | |
| 21 | + /// <summary> | |
| 22 | + /// 创建时间 | |
| 23 | + /// </summary> | |
| 24 | + public DateTime? creatorTime { get; set; } | |
| 25 | + | |
| 26 | + /// <summary> | |
| 27 | + /// 修改时间 | |
| 28 | + /// </summary> | |
| 29 | + public DateTime? lastModifyTime { get; set; } | |
| 30 | + | |
| 31 | + } | |
| 32 | +} | ... | ... |
antis-ncc-net-core/NCC.BlindBox.Entitys/价格设定/Dto/TbSettingPriceInfoOutput.cs
0 → 100644
| 1 | +using System; | |
| 2 | +using System.Collections.Generic; | |
| 3 | + | |
| 4 | +namespace NCC.Blind.Entitys.Dto.TbSettingPrice | |
| 5 | +{ | |
| 6 | + /// <summary> | |
| 7 | + /// 价格设定输出参数 | |
| 8 | + /// </summary> | |
| 9 | + public class TbSettingPriceInfoOutput | |
| 10 | + { | |
| 11 | + /// <summary> | |
| 12 | + /// 主键 | |
| 13 | + /// </summary> | |
| 14 | + public string id { get; set; } | |
| 15 | + | |
| 16 | + /// <summary> | |
| 17 | + /// 价格 | |
| 18 | + /// </summary> | |
| 19 | + public decimal price { get; set; } | |
| 20 | + | |
| 21 | + /// <summary> | |
| 22 | + /// 类型 1--盲盒价格 2--门票价格 | |
| 23 | + /// </summary> | |
| 24 | + public string type { get; set; } | |
| 25 | + | |
| 26 | + /// <summary> | |
| 27 | + /// 创建时间 | |
| 28 | + /// </summary> | |
| 29 | + public DateTime? creatorTime { get; set; } | |
| 30 | + | |
| 31 | + /// <summary> | |
| 32 | + /// 修改时间 | |
| 33 | + /// </summary> | |
| 34 | + public DateTime? lastModifyTime { get; set; } | |
| 35 | + | |
| 36 | + } | |
| 37 | +} | ... | ... |
antis-ncc-net-core/NCC.BlindBox.Entitys/价格设定/Dto/TbSettingPriceListOutput.cs
0 → 100644
| 1 | +using System; | |
| 2 | + | |
| 3 | +namespace NCC.Blind.Entitys.Dto.TbSettingPrice | |
| 4 | +{ | |
| 5 | + /// <summary> | |
| 6 | + /// 价格设定输入参数 | |
| 7 | + /// </summary> | |
| 8 | + public class TbSettingPriceListOutput | |
| 9 | + { | |
| 10 | + /// <summary> | |
| 11 | + /// 主键 | |
| 12 | + /// </summary> | |
| 13 | + public string id { get; set; } | |
| 14 | + | |
| 15 | + /// <summary> | |
| 16 | + /// 价格 | |
| 17 | + /// </summary> | |
| 18 | + public decimal price { get; set; } | |
| 19 | + | |
| 20 | + /// <summary> | |
| 21 | + /// 类型 1--盲盒价格 2--门票价格 | |
| 22 | + /// </summary> | |
| 23 | + public string type { get; set; } | |
| 24 | + | |
| 25 | + /// <summary> | |
| 26 | + /// 创建时间 | |
| 27 | + /// </summary> | |
| 28 | + public DateTime? creatorTime { get; set; } | |
| 29 | + | |
| 30 | + /// <summary> | |
| 31 | + /// 修改时间 | |
| 32 | + /// </summary> | |
| 33 | + public DateTime? lastModifyTime { get; set; } | |
| 34 | + | |
| 35 | + } | |
| 36 | +} | ... | ... |
antis-ncc-net-core/NCC.BlindBox.Entitys/价格设定/Dto/TbSettingPriceListQueryInput.cs
0 → 100644
| 1 | +using NCC.Common.Filter; | |
| 2 | +using System.Collections.Generic; | |
| 3 | + | |
| 4 | +namespace NCC.Blind.Entitys.Dto.TbSettingPrice | |
| 5 | +{ | |
| 6 | + /// <summary> | |
| 7 | + /// 价格设定列表查询输入 | |
| 8 | + /// </summary> | |
| 9 | + public class TbSettingPriceListQueryInput : PageInputBase | |
| 10 | + { | |
| 11 | + /// <summary> | |
| 12 | + /// 选择导出数据key | |
| 13 | + /// </summary> | |
| 14 | + public string selectKey { get; set; } | |
| 15 | + | |
| 16 | + /// <summary> | |
| 17 | + /// | |
| 18 | + /// </summary> | |
| 19 | + public int dataType { get; set; } | |
| 20 | + | |
| 21 | + | |
| 22 | + /// <summary> | |
| 23 | + /// 类型 1--盲盒价格 2--门票价格 | |
| 24 | + /// </summary> | |
| 25 | + public string type { get; set; } | |
| 26 | + | |
| 27 | + } | |
| 28 | +} | ... | ... |
antis-ncc-net-core/NCC.BlindBox.Entitys/价格设定/Dto/TbSettingPriceUpInput.cs
0 → 100644
| 1 | +using System; | |
| 2 | +using System.Collections.Generic; | |
| 3 | + | |
| 4 | +namespace NCC.Blind.Entitys.Dto.TbSettingPrice | |
| 5 | +{ | |
| 6 | + /// <summary> | |
| 7 | + /// 价格设定更新输入参数 | |
| 8 | + /// </summary> | |
| 9 | + public class TbSettingPriceUpInput : TbSettingPriceCrInput | |
| 10 | + { | |
| 11 | + /// <summary> | |
| 12 | + /// 主键 | |
| 13 | + /// </summary> | |
| 14 | + public string id { get; set; } | |
| 15 | + | |
| 16 | + } | |
| 17 | +} | ... | ... |
antis-ncc-net-core/NCC.BlindBox.Entitys/价格设定/Entity/TbSettingPriceEntity.cs
0 → 100644
| 1 | +using NCC.Common.Const; | |
| 2 | +using SqlSugar; | |
| 3 | +using System; | |
| 4 | + | |
| 5 | +namespace NCC.Blind.Entitys | |
| 6 | +{ | |
| 7 | + /// <summary> | |
| 8 | + /// 价格设定 | |
| 9 | + /// </summary> | |
| 10 | + [SugarTable("tb_SettingPrice")] | |
| 11 | + [Tenant(ClaimConst.TENANT_ID)] | |
| 12 | + public class TbSettingPriceEntity | |
| 13 | + { | |
| 14 | + /// <summary> | |
| 15 | + /// 主键 | |
| 16 | + /// </summary> | |
| 17 | + [SugarColumn(ColumnName = "F_Id", IsPrimaryKey = true)] | |
| 18 | + public string Id { get; set; } | |
| 19 | + | |
| 20 | + /// <summary> | |
| 21 | + /// 价格 | |
| 22 | + /// </summary> | |
| 23 | + [SugarColumn(ColumnName = "F_Price")] | |
| 24 | + public decimal Price { get; set; } | |
| 25 | + | |
| 26 | + /// <summary> | |
| 27 | + /// 类型 1--盲盒价格 2--门票价格 | |
| 28 | + /// </summary> | |
| 29 | + [SugarColumn(ColumnName = "F_Type")] | |
| 30 | + public string Type { get; set; } | |
| 31 | + | |
| 32 | + /// <summary> | |
| 33 | + /// 创建时间 | |
| 34 | + /// </summary> | |
| 35 | + [SugarColumn(ColumnName = "F_CreatorTime")] | |
| 36 | + public DateTime? CreatorTime { get; set; } | |
| 37 | + | |
| 38 | + /// <summary> | |
| 39 | + /// 修改时间 | |
| 40 | + /// </summary> | |
| 41 | + [SugarColumn(ColumnName = "F_LastModifyTime")] | |
| 42 | + public DateTime? LastModifyTime { get; set; } | |
| 43 | + | |
| 44 | + } | |
| 45 | +} | |
| 0 | 46 | \ No newline at end of file | ... | ... |
antis-ncc-net-core/NCC.BlindBox.Entitys/价格设定/Mapper/TbSettingPriceMapper.cs
0 → 100644
| 1 | +using NCC.Common.Helper; | |
| 2 | +using NCC.Blind.Entitys.Dto.TbSettingPrice; | |
| 3 | +using Mapster; | |
| 4 | +using System.Collections.Generic; | |
| 5 | + | |
| 6 | +namespace NCC.Blind.Entitys.Mapper.TbSettingPrice | |
| 7 | +{ | |
| 8 | + public class Mapper : IRegister | |
| 9 | + { | |
| 10 | + public void Register(TypeAdapterConfig config) | |
| 11 | + { | |
| 12 | + } | |
| 13 | + } | |
| 14 | +} | ... | ... |
antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路/Dto/TbAreaLineCrInput.cs
0 → 100644
| 1 | +using System; | |
| 2 | +using System.Collections.Generic; | |
| 3 | +using NCC.Common.Model; | |
| 4 | + | |
| 5 | +namespace NCC.Blind.Entitys.Dto.TbAreaLine | |
| 6 | +{ | |
| 7 | + /// <summary> | |
| 8 | + /// 地域线路修改输入参数 | |
| 9 | + /// </summary> | |
| 10 | + public class TbAreaLineCrInput | |
| 11 | + { | |
| 12 | + /// <summary> | |
| 13 | + /// 线路标题 | |
| 14 | + /// </summary> | |
| 15 | + public string title { get; set; } | |
| 16 | + | |
| 17 | + /// <summary> | |
| 18 | + /// 地域ID | |
| 19 | + /// </summary> | |
| 20 | + public string areaId { get; set; } | |
| 21 | + | |
| 22 | + /// <summary> | |
| 23 | + /// 线路概况 | |
| 24 | + /// </summary> | |
| 25 | + public string remark { get; set; } | |
| 26 | + | |
| 27 | + /// <summary> | |
| 28 | + /// 创建时间 | |
| 29 | + /// </summary> | |
| 30 | + public DateTime? creatorTime { get; set; } | |
| 31 | + | |
| 32 | + /// <summary> | |
| 33 | + /// 修改时间 | |
| 34 | + /// </summary> | |
| 35 | + public DateTime? lastModifyTime { get; set; } | |
| 36 | + | |
| 37 | + /// <summary> | |
| 38 | + /// 线路图片 | |
| 39 | + /// </summary> | |
| 40 | + public List<FileControlsModel> banner { get; set; } | |
| 41 | + | |
| 42 | + } | |
| 43 | +} | ... | ... |
antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路/Dto/TbAreaLineInfoOutput.cs
0 → 100644
| 1 | +using System; | |
| 2 | +using System.Collections.Generic; | |
| 3 | +using NCC.Common.Model; | |
| 4 | + | |
| 5 | +namespace NCC.Blind.Entitys.Dto.TbAreaLine | |
| 6 | +{ | |
| 7 | + /// <summary> | |
| 8 | + /// 地域线路输出参数 | |
| 9 | + /// </summary> | |
| 10 | + public class TbAreaLineInfoOutput | |
| 11 | + { | |
| 12 | + /// <summary> | |
| 13 | + /// 主键 | |
| 14 | + /// </summary> | |
| 15 | + public string id { get; set; } | |
| 16 | + | |
| 17 | + /// <summary> | |
| 18 | + /// 线路标题 | |
| 19 | + /// </summary> | |
| 20 | + public string title { get; set; } | |
| 21 | + | |
| 22 | + /// <summary> | |
| 23 | + /// 地域ID | |
| 24 | + /// </summary> | |
| 25 | + public string areaId { get; set; } | |
| 26 | + | |
| 27 | + /// <summary> | |
| 28 | + /// 线路概况 | |
| 29 | + /// </summary> | |
| 30 | + public string remark { get; set; } | |
| 31 | + | |
| 32 | + /// <summary> | |
| 33 | + /// 创建时间 | |
| 34 | + /// </summary> | |
| 35 | + public DateTime? creatorTime { get; set; } | |
| 36 | + | |
| 37 | + /// <summary> | |
| 38 | + /// 修改时间 | |
| 39 | + /// </summary> | |
| 40 | + public DateTime? lastModifyTime { get; set; } | |
| 41 | + | |
| 42 | + /// <summary> | |
| 43 | + /// 线路图片 | |
| 44 | + /// </summary> | |
| 45 | + public List<FileControlsModel> banner { get; set; } | |
| 46 | + | |
| 47 | + } | |
| 48 | +} | ... | ... |
antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路/Dto/TbAreaLineListOutput.cs
0 → 100644
| 1 | +using Aspose.Words.Lists; | |
| 2 | +using NCC.Common.Model; | |
| 3 | +using NCC.Education.Entitys; | |
| 4 | +using Newtonsoft.Json; | |
| 5 | +using System; | |
| 6 | +using System.Collections.Generic; | |
| 7 | + | |
| 8 | +namespace NCC.Blind.Entitys.Dto.TbAreaLine | |
| 9 | +{ | |
| 10 | + /// <summary> | |
| 11 | + /// 地域线路输入参数 | |
| 12 | + /// </summary> | |
| 13 | + public class TbAreaLineListOutput | |
| 14 | + { | |
| 15 | + /// <summary> | |
| 16 | + /// 主键 | |
| 17 | + /// </summary> | |
| 18 | + public string id { get; set; } | |
| 19 | + | |
| 20 | + /// <summary> | |
| 21 | + /// 线路标题 | |
| 22 | + /// </summary> | |
| 23 | + public string title { get; set; } | |
| 24 | + | |
| 25 | + /// <summary> | |
| 26 | + /// 地域ID | |
| 27 | + /// </summary> | |
| 28 | + public string areaId { get; set; } | |
| 29 | + | |
| 30 | + /// <summary> | |
| 31 | + /// 地域信息 | |
| 32 | + /// </summary> | |
| 33 | + public TbAreaEntity area { get; set; } | |
| 34 | + | |
| 35 | + /// <summary> | |
| 36 | + /// 线路概况 | |
| 37 | + /// </summary> | |
| 38 | + public string remark { get; set; } | |
| 39 | + | |
| 40 | + /// <summary> | |
| 41 | + /// 创建时间 | |
| 42 | + /// </summary> | |
| 43 | + public DateTime? creatorTime { get; set; } | |
| 44 | + | |
| 45 | + /// <summary> | |
| 46 | + /// 修改时间 | |
| 47 | + /// </summary> | |
| 48 | + public DateTime? lastModifyTime { get; set; } | |
| 49 | + | |
| 50 | + /// <summary> | |
| 51 | + /// 图片信息 | |
| 52 | + /// </summary> | |
| 53 | + public string banner { get; set; } | |
| 54 | + | |
| 55 | + /// <summary> | |
| 56 | + /// 图片信息 | |
| 57 | + /// </summary> | |
| 58 | + public List<FileControlsModel> Banner { get | |
| 59 | + { | |
| 60 | + try | |
| 61 | + { | |
| 62 | + return JsonConvert.DeserializeObject<List<FileControlsModel>>(banner); | |
| 63 | + }catch(Exception ex) | |
| 64 | + { | |
| 65 | + return new List<FileControlsModel>(); | |
| 66 | + } | |
| 67 | + } } | |
| 68 | + | |
| 69 | + } | |
| 70 | +} | ... | ... |
antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路/Dto/TbAreaLineListQueryInput.cs
0 → 100644
| 1 | +using NCC.Common.Filter; | |
| 2 | +using System.Collections.Generic; | |
| 3 | + | |
| 4 | +namespace NCC.Blind.Entitys.Dto.TbAreaLine | |
| 5 | +{ | |
| 6 | + /// <summary> | |
| 7 | + /// 地域线路列表查询输入 | |
| 8 | + /// </summary> | |
| 9 | + public class TbAreaLineListQueryInput : PageInputBase | |
| 10 | + { | |
| 11 | + /// <summary> | |
| 12 | + /// 选择导出数据key | |
| 13 | + /// </summary> | |
| 14 | + public string selectKey { get; set; } | |
| 15 | + | |
| 16 | + /// <summary> | |
| 17 | + /// | |
| 18 | + /// </summary> | |
| 19 | + public int dataType { get; set; } | |
| 20 | + | |
| 21 | + | |
| 22 | + /// <summary> | |
| 23 | + /// 线路标题 | |
| 24 | + /// </summary> | |
| 25 | + public string title { get; set; } | |
| 26 | + | |
| 27 | + /// <summary> | |
| 28 | + /// 地域ID | |
| 29 | + /// </summary> | |
| 30 | + public string areaId { get; set; } | |
| 31 | + | |
| 32 | + /// <summary> | |
| 33 | + /// 线路概况 | |
| 34 | + /// </summary> | |
| 35 | + public string remark { get; set; } | |
| 36 | + | |
| 37 | + } | |
| 38 | +} | ... | ... |
antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路/Dto/TbAreaLineUpInput.cs
0 → 100644
| 1 | +using System; | |
| 2 | +using System.Collections.Generic; | |
| 3 | + | |
| 4 | +namespace NCC.Blind.Entitys.Dto.TbAreaLine | |
| 5 | +{ | |
| 6 | + /// <summary> | |
| 7 | + /// 地域线路更新输入参数 | |
| 8 | + /// </summary> | |
| 9 | + public class TbAreaLineUpInput : TbAreaLineCrInput | |
| 10 | + { | |
| 11 | + /// <summary> | |
| 12 | + /// 主键 | |
| 13 | + /// </summary> | |
| 14 | + public string id { get; set; } | |
| 15 | + | |
| 16 | + } | |
| 17 | +} | ... | ... |
antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路/Entity/TbAreaLineEntity.cs
0 → 100644
| 1 | +using NCC.Common.Const; | |
| 2 | +using SqlSugar; | |
| 3 | +using System; | |
| 4 | + | |
| 5 | +namespace NCC.Blind.Entitys | |
| 6 | +{ | |
| 7 | + /// <summary> | |
| 8 | + /// 地域线路 | |
| 9 | + /// </summary> | |
| 10 | + [SugarTable("tb_AreaLine")] | |
| 11 | + [Tenant(ClaimConst.TENANT_ID)] | |
| 12 | + public class TbAreaLineEntity | |
| 13 | + { | |
| 14 | + /// <summary> | |
| 15 | + /// 主键 | |
| 16 | + /// </summary> | |
| 17 | + [SugarColumn(ColumnName = "F_Id", IsPrimaryKey = true)] | |
| 18 | + public string Id { get; set; } | |
| 19 | + | |
| 20 | + /// <summary> | |
| 21 | + /// 线路标题 | |
| 22 | + /// </summary> | |
| 23 | + [SugarColumn(ColumnName = "F_Title")] | |
| 24 | + public string Title { get; set; } | |
| 25 | + | |
| 26 | + /// <summary> | |
| 27 | + /// 地域ID | |
| 28 | + /// </summary> | |
| 29 | + [SugarColumn(ColumnName = "F_AreaId")] | |
| 30 | + public string AreaId { get; set; } | |
| 31 | + | |
| 32 | + /// <summary> | |
| 33 | + /// 线路概况 | |
| 34 | + /// </summary> | |
| 35 | + [SugarColumn(ColumnName = "F_Remark")] | |
| 36 | + public string Remark { get; set; } | |
| 37 | + | |
| 38 | + /// <summary> | |
| 39 | + /// 创建时间 | |
| 40 | + /// </summary> | |
| 41 | + [SugarColumn(ColumnName = "F_CreatorTime")] | |
| 42 | + public DateTime? CreatorTime { get; set; } | |
| 43 | + | |
| 44 | + /// <summary> | |
| 45 | + /// 修改时间 | |
| 46 | + /// </summary> | |
| 47 | + [SugarColumn(ColumnName = "F_LastModifyTime")] | |
| 48 | + public DateTime? LastModifyTime { get; set; } | |
| 49 | + | |
| 50 | + /// <summary> | |
| 51 | + /// 线路图片 | |
| 52 | + /// </summary> | |
| 53 | + [SugarColumn(ColumnName = "F_Banner")] | |
| 54 | + public string Banner { get; set; } | |
| 55 | + | |
| 56 | + } | |
| 57 | +} | |
| 0 | 58 | \ No newline at end of file | ... | ... |
antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路/Mapper/TbAreaLineMapper.cs
0 → 100644
| 1 | +using NCC.Common.Helper; | |
| 2 | +using NCC.Common.Model; | |
| 3 | +using NCC.Blind.Entitys.Dto.TbAreaLine; | |
| 4 | +using Mapster; | |
| 5 | +using System.Collections.Generic; | |
| 6 | + | |
| 7 | +namespace NCC.Blind.Entitys.Mapper.TbAreaLine | |
| 8 | +{ | |
| 9 | + public class Mapper : IRegister | |
| 10 | + { | |
| 11 | + public void Register(TypeAdapterConfig config) | |
| 12 | + { | |
| 13 | + config.ForType<TbAreaLineCrInput, TbAreaLineEntity>() | |
| 14 | + .Map(dest => dest.Banner, src => src.banner.ToJson()) | |
| 15 | + ; | |
| 16 | + config.ForType<TbAreaLineEntity, TbAreaLineInfoOutput>() | |
| 17 | + .Map(dest => dest.banner, src => src.Banner.ToObject<List<FileControlsModel>>()) | |
| 18 | + ; | |
| 19 | + } | |
| 20 | + } | |
| 21 | +} | ... | ... |
antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路节点/Dto/TbAreaLineNodeCrInput.cs
0 → 100644
| 1 | +using System; | |
| 2 | +using System.Collections.Generic; | |
| 3 | +using NCC.Common.Model; | |
| 4 | + | |
| 5 | +namespace NCC.Blind.Entitys.Dto.TbAreaLineNode | |
| 6 | +{ | |
| 7 | + /// <summary> | |
| 8 | + /// 地域线路节点修改输入参数 | |
| 9 | + /// </summary> | |
| 10 | + public class TbAreaLineNodeCrInput | |
| 11 | + { | |
| 12 | + /// <summary> | |
| 13 | + /// 地域线路ID | |
| 14 | + /// </summary> | |
| 15 | + public string areaLineId { get; set; } | |
| 16 | + | |
| 17 | + /// <summary> | |
| 18 | + /// 节点标题 | |
| 19 | + /// </summary> | |
| 20 | + public string title { get; set; } | |
| 21 | + | |
| 22 | + /// <summary> | |
| 23 | + /// 节点简介 | |
| 24 | + /// </summary> | |
| 25 | + public string description { get; set; } | |
| 26 | + | |
| 27 | + /// <summary> | |
| 28 | + /// 节点图片 | |
| 29 | + /// </summary> | |
| 30 | + public List<FileControlsModel> banner { get; set; } | |
| 31 | + | |
| 32 | + /// <summary> | |
| 33 | + /// 节点注意事项 | |
| 34 | + /// </summary> | |
| 35 | + public string remark { get; set; } | |
| 36 | + | |
| 37 | + /// <summary> | |
| 38 | + /// 创建时间 | |
| 39 | + /// </summary> | |
| 40 | + public DateTime? creatorTime { get; set; } | |
| 41 | + | |
| 42 | + /// <summary> | |
| 43 | + /// 修改时间 | |
| 44 | + /// </summary> | |
| 45 | + public DateTime? lastModifyTime { get; set; } | |
| 46 | + | |
| 47 | + /// <summary> | |
| 48 | + /// 排序 | |
| 49 | + /// </summary> | |
| 50 | + public int? sorts { get; set; } | |
| 51 | + | |
| 52 | + } | |
| 53 | +} | ... | ... |
antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路节点/Dto/TbAreaLineNodeInfoOutput.cs
0 → 100644
| 1 | +using System; | |
| 2 | +using System.Collections.Generic; | |
| 3 | +using NCC.Common.Model; | |
| 4 | + | |
| 5 | +namespace NCC.Blind.Entitys.Dto.TbAreaLineNode | |
| 6 | +{ | |
| 7 | + /// <summary> | |
| 8 | + /// 地域线路节点输出参数 | |
| 9 | + /// </summary> | |
| 10 | + public class TbAreaLineNodeInfoOutput | |
| 11 | + { | |
| 12 | + /// <summary> | |
| 13 | + /// 主键 | |
| 14 | + /// </summary> | |
| 15 | + public string id { get; set; } | |
| 16 | + | |
| 17 | + /// <summary> | |
| 18 | + /// 地域线路ID | |
| 19 | + /// </summary> | |
| 20 | + public string areaLineId { get; set; } | |
| 21 | + | |
| 22 | + /// <summary> | |
| 23 | + /// 节点标题 | |
| 24 | + /// </summary> | |
| 25 | + public string title { get; set; } | |
| 26 | + | |
| 27 | + /// <summary> | |
| 28 | + /// 节点简介 | |
| 29 | + /// </summary> | |
| 30 | + public string description { get; set; } | |
| 31 | + | |
| 32 | + /// <summary> | |
| 33 | + /// 节点图片 | |
| 34 | + /// </summary> | |
| 35 | + public List<FileControlsModel> banner { get; set; } | |
| 36 | + | |
| 37 | + /// <summary> | |
| 38 | + /// 节点注意事项 | |
| 39 | + /// </summary> | |
| 40 | + public string remark { get; set; } | |
| 41 | + | |
| 42 | + /// <summary> | |
| 43 | + /// 创建时间 | |
| 44 | + /// </summary> | |
| 45 | + public DateTime? creatorTime { get; set; } | |
| 46 | + | |
| 47 | + /// <summary> | |
| 48 | + /// 修改时间 | |
| 49 | + /// </summary> | |
| 50 | + public DateTime? lastModifyTime { get; set; } | |
| 51 | + | |
| 52 | + /// <summary> | |
| 53 | + /// 排序 | |
| 54 | + /// </summary> | |
| 55 | + public int? sorts { get; set; } | |
| 56 | + | |
| 57 | + /// <summary> | |
| 58 | + /// 是否填写了个人信息 1--未填写 2--已填写 | |
| 59 | + /// </summary> | |
| 60 | + public string isAppend { get; set; } | |
| 61 | + | |
| 62 | + } | |
| 63 | +} | ... | ... |
antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路节点/Dto/TbAreaLineNodeListOutput.cs
0 → 100644
| 1 | +using Aspose.Words.Lists; | |
| 2 | +using NCC.Common.Model; | |
| 3 | +using Newtonsoft.Json; | |
| 4 | +using System; | |
| 5 | +using System.Collections.Generic; | |
| 6 | + | |
| 7 | +namespace NCC.Blind.Entitys.Dto.TbAreaLineNode | |
| 8 | +{ | |
| 9 | + /// <summary> | |
| 10 | + /// 地域线路节点输入参数 | |
| 11 | + /// </summary> | |
| 12 | + public class TbAreaLineNodeListOutput | |
| 13 | + { | |
| 14 | + /// <summary> | |
| 15 | + /// 主键 | |
| 16 | + /// </summary> | |
| 17 | + public string id { get; set; } | |
| 18 | + | |
| 19 | + /// <summary> | |
| 20 | + /// 地域线路ID | |
| 21 | + /// </summary> | |
| 22 | + public string areaLineId { get; set; } | |
| 23 | + /// <summary> | |
| 24 | + /// 地域线路信息 | |
| 25 | + /// </summary> | |
| 26 | + public TbAreaLineEntity areaLine { get; set; } | |
| 27 | + | |
| 28 | + /// <summary> | |
| 29 | + /// 节点标题 | |
| 30 | + /// </summary> | |
| 31 | + public string title { get; set; } | |
| 32 | + | |
| 33 | + /// <summary> | |
| 34 | + /// 节点简介 | |
| 35 | + /// </summary> | |
| 36 | + public string description { get; set; } | |
| 37 | + | |
| 38 | + /// <summary> | |
| 39 | + /// 节点注意事项 | |
| 40 | + /// </summary> | |
| 41 | + public string remark { get; set; } | |
| 42 | + | |
| 43 | + /// <summary> | |
| 44 | + /// 创建时间 | |
| 45 | + /// </summary> | |
| 46 | + public DateTime? creatorTime { get; set; } | |
| 47 | + | |
| 48 | + /// <summary> | |
| 49 | + /// 修改时间 | |
| 50 | + /// </summary> | |
| 51 | + public DateTime? lastModifyTime { get; set; } | |
| 52 | + | |
| 53 | + /// <summary> | |
| 54 | + /// 图片信息 | |
| 55 | + /// </summary> | |
| 56 | + public string banner { get; set; } | |
| 57 | + | |
| 58 | + /// <summary> | |
| 59 | + /// 图片信息 | |
| 60 | + /// </summary> | |
| 61 | + public List<FileControlsModel> Banner { get | |
| 62 | + { | |
| 63 | + try | |
| 64 | + { | |
| 65 | + return JsonConvert.DeserializeObject<List<FileControlsModel>>(banner); | |
| 66 | + }catch(Exception ex) | |
| 67 | + { | |
| 68 | + return new List<FileControlsModel>(); | |
| 69 | + } | |
| 70 | + } } | |
| 71 | + | |
| 72 | + /// <summary> | |
| 73 | + /// 排序 | |
| 74 | + /// </summary> | |
| 75 | + public int? sorts { get; set; } | |
| 76 | + | |
| 77 | + | |
| 78 | + } | |
| 79 | +} | ... | ... |
antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路节点/Dto/TbAreaLineNodeListQueryInput.cs
0 → 100644
| 1 | +using NCC.Common.Filter; | |
| 2 | +using System.Collections.Generic; | |
| 3 | + | |
| 4 | +namespace NCC.Blind.Entitys.Dto.TbAreaLineNode | |
| 5 | +{ | |
| 6 | + /// <summary> | |
| 7 | + /// 地域线路节点列表查询输入 | |
| 8 | + /// </summary> | |
| 9 | + public class TbAreaLineNodeListQueryInput : PageInputBase | |
| 10 | + { | |
| 11 | + /// <summary> | |
| 12 | + /// 选择导出数据key | |
| 13 | + /// </summary> | |
| 14 | + public string selectKey { get; set; } | |
| 15 | + | |
| 16 | + /// <summary> | |
| 17 | + /// | |
| 18 | + /// </summary> | |
| 19 | + public int dataType { get; set; } | |
| 20 | + | |
| 21 | + | |
| 22 | + /// <summary> | |
| 23 | + /// 地域线路ID | |
| 24 | + /// </summary> | |
| 25 | + public string areaLineId { get; set; } | |
| 26 | + | |
| 27 | + /// <summary> | |
| 28 | + /// 节点标题 | |
| 29 | + /// </summary> | |
| 30 | + public string title { get; set; } | |
| 31 | + | |
| 32 | + /// <summary> | |
| 33 | + /// 节点简介 | |
| 34 | + /// </summary> | |
| 35 | + public string description { get; set; } | |
| 36 | + | |
| 37 | + /// <summary> | |
| 38 | + /// 节点注意事项 | |
| 39 | + /// </summary> | |
| 40 | + public string remark { get; set; } | |
| 41 | + | |
| 42 | + } | |
| 43 | +} | ... | ... |
antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路节点/Dto/TbAreaLineNodeUpInput.cs
0 → 100644
| 1 | +using System; | |
| 2 | +using System.Collections.Generic; | |
| 3 | + | |
| 4 | +namespace NCC.Blind.Entitys.Dto.TbAreaLineNode | |
| 5 | +{ | |
| 6 | + /// <summary> | |
| 7 | + /// 地域线路节点更新输入参数 | |
| 8 | + /// </summary> | |
| 9 | + public class TbAreaLineNodeUpInput : TbAreaLineNodeCrInput | |
| 10 | + { | |
| 11 | + /// <summary> | |
| 12 | + /// 主键 | |
| 13 | + /// </summary> | |
| 14 | + public string id { get; set; } | |
| 15 | + | |
| 16 | + } | |
| 17 | +} | ... | ... |
antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路节点/Entity/TbAreaLineNodeEntity.cs
0 → 100644
| 1 | +using NCC.Common.Const; | |
| 2 | +using SqlSugar; | |
| 3 | +using System; | |
| 4 | + | |
| 5 | +namespace NCC.Blind.Entitys | |
| 6 | +{ | |
| 7 | + /// <summary> | |
| 8 | + /// 地域线路节点 | |
| 9 | + /// </summary> | |
| 10 | + [SugarTable("tb_AreaLineNode")] | |
| 11 | + [Tenant(ClaimConst.TENANT_ID)] | |
| 12 | + public class TbAreaLineNodeEntity | |
| 13 | + { | |
| 14 | + /// <summary> | |
| 15 | + /// 主键 | |
| 16 | + /// </summary> | |
| 17 | + [SugarColumn(ColumnName = "F_Id", IsPrimaryKey = true)] | |
| 18 | + public string Id { get; set; } | |
| 19 | + | |
| 20 | + /// <summary> | |
| 21 | + /// 地域线路ID | |
| 22 | + /// </summary> | |
| 23 | + [SugarColumn(ColumnName = "F_AreaLineId")] | |
| 24 | + public string AreaLineId { get; set; } | |
| 25 | + | |
| 26 | + /// <summary> | |
| 27 | + /// 节点标题 | |
| 28 | + /// </summary> | |
| 29 | + [SugarColumn(ColumnName = "F_Title")] | |
| 30 | + public string Title { get; set; } | |
| 31 | + | |
| 32 | + /// <summary> | |
| 33 | + /// 节点简介 | |
| 34 | + /// </summary> | |
| 35 | + [SugarColumn(ColumnName = "F_Description")] | |
| 36 | + public string Description { get; set; } | |
| 37 | + | |
| 38 | + /// <summary> | |
| 39 | + /// 节点图片 | |
| 40 | + /// </summary> | |
| 41 | + [SugarColumn(ColumnName = "F_Banner")] | |
| 42 | + public string Banner { get; set; } | |
| 43 | + | |
| 44 | + /// <summary> | |
| 45 | + /// 节点注意事项 | |
| 46 | + /// </summary> | |
| 47 | + [SugarColumn(ColumnName = "F_Remark")] | |
| 48 | + public string Remark { get; set; } | |
| 49 | + | |
| 50 | + /// <summary> | |
| 51 | + /// 创建时间 | |
| 52 | + /// </summary> | |
| 53 | + [SugarColumn(ColumnName = "F_CreatorTime")] | |
| 54 | + public DateTime? CreatorTime { get; set; } | |
| 55 | + | |
| 56 | + /// <summary> | |
| 57 | + /// 修改时间 | |
| 58 | + /// </summary> | |
| 59 | + [SugarColumn(ColumnName = "F_LastModifyTime")] | |
| 60 | + public DateTime? LastModifyTime { get; set; } | |
| 61 | + | |
| 62 | + /// <summary> | |
| 63 | + /// 排序 | |
| 64 | + /// </summary> | |
| 65 | + [SugarColumn(ColumnName = "F_Sorts")] | |
| 66 | + public int? Sorts { get; set; } | |
| 67 | + | |
| 68 | + | |
| 69 | + } | |
| 70 | +} | |
| 0 | 71 | \ No newline at end of file | ... | ... |
antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路节点/Mapper/TbAreaLineNodeMapper.cs
0 → 100644
| 1 | +using NCC.Common.Helper; | |
| 2 | +using NCC.Common.Model; | |
| 3 | +using NCC.Blind.Entitys.Dto.TbAreaLineNode; | |
| 4 | +using Mapster; | |
| 5 | +using System.Collections.Generic; | |
| 6 | + | |
| 7 | +namespace NCC.Blind.Entitys.Mapper.TbAreaLineNode | |
| 8 | +{ | |
| 9 | + public class Mapper : IRegister | |
| 10 | + { | |
| 11 | + public void Register(TypeAdapterConfig config) | |
| 12 | + { | |
| 13 | + config.ForType<TbAreaLineNodeCrInput, TbAreaLineNodeEntity>() | |
| 14 | + .Map(dest => dest.Banner, src => src.banner.ToJson()) | |
| 15 | + ; | |
| 16 | + config.ForType<TbAreaLineNodeEntity, TbAreaLineNodeInfoOutput>() | |
| 17 | + .Map(dest => dest.banner, src => src.Banner.ToObject<List<FileControlsModel>>()) | |
| 18 | + ; | |
| 19 | + } | |
| 20 | + } | |
| 21 | +} | ... | ... |
antis-ncc-net-core/NCC.BlindBox.Entitys/抽奖记录/Dto/TbBoxLogCrInput.cs
0 → 100644
| 1 | +using System; | |
| 2 | +using System.Collections.Generic; | |
| 3 | + | |
| 4 | +namespace NCC.Blind.Entitys.Dto.TbBoxLog | |
| 5 | +{ | |
| 6 | + /// <summary> | |
| 7 | + /// 抽奖记录修改输入参数 | |
| 8 | + /// </summary> | |
| 9 | + public class TbBoxLogCrInput | |
| 10 | + { | |
| 11 | + /// <summary> | |
| 12 | + /// 用户ID | |
| 13 | + /// </summary> | |
| 14 | + public string userId { get; set; } | |
| 15 | + | |
| 16 | + /// <summary> | |
| 17 | + /// 盲盒订单ID | |
| 18 | + /// </summary> | |
| 19 | + public string boxOrderId { get; set; } | |
| 20 | + | |
| 21 | + /// <summary> | |
| 22 | + /// 路线 1--地域路线 2--人格路线 | |
| 23 | + /// </summary> | |
| 24 | + public string type { get; set; } | |
| 25 | + | |
| 26 | + /// <summary> | |
| 27 | + /// 地域线路ID | |
| 28 | + /// </summary> | |
| 29 | + public string areaLineId { get; set; } | |
| 30 | + | |
| 31 | + /// <summary> | |
| 32 | + /// 人格线路ID | |
| 33 | + /// </summary> | |
| 34 | + public string mbtLineId { get; set; } | |
| 35 | + | |
| 36 | + /// <summary> | |
| 37 | + /// 创建时间 | |
| 38 | + /// </summary> | |
| 39 | + public DateTime? creatorTime { get; set; } | |
| 40 | + | |
| 41 | + /// <summary> | |
| 42 | + /// 修改时间 | |
| 43 | + /// </summary> | |
| 44 | + public DateTime? lastModifyTime { get; set; } | |
| 45 | + | |
| 46 | + /// <summary> | |
| 47 | + /// 地域ID | |
| 48 | + /// </summary> | |
| 49 | + public string areaId { get; set; } | |
| 50 | + | |
| 51 | + /// <summary> | |
| 52 | + /// 人格ID | |
| 53 | + /// </summary> | |
| 54 | + public string mbtId { get; set; } | |
| 55 | + | |
| 56 | + } | |
| 57 | +} | ... | ... |
antis-ncc-net-core/NCC.BlindBox.Entitys/抽奖记录/Dto/TbBoxLogInfoOutput.cs
0 → 100644
| 1 | +using System; | |
| 2 | +using System.Collections.Generic; | |
| 3 | + | |
| 4 | +namespace NCC.Blind.Entitys.Dto.TbBoxLog | |
| 5 | +{ | |
| 6 | + /// <summary> | |
| 7 | + /// 抽奖记录输出参数 | |
| 8 | + /// </summary> | |
| 9 | + public class TbBoxLogInfoOutput | |
| 10 | + { | |
| 11 | + /// <summary> | |
| 12 | + /// 主键 | |
| 13 | + /// </summary> | |
| 14 | + public string id { get; set; } | |
| 15 | + | |
| 16 | + /// <summary> | |
| 17 | + /// 用户ID | |
| 18 | + /// </summary> | |
| 19 | + public string userId { get; set; } | |
| 20 | + | |
| 21 | + /// <summary> | |
| 22 | + /// 盲盒订单ID | |
| 23 | + /// </summary> | |
| 24 | + public string boxOrderId { get; set; } | |
| 25 | + | |
| 26 | + /// <summary> | |
| 27 | + /// 路线 1--地域路线 2--人格路线 | |
| 28 | + /// </summary> | |
| 29 | + public string type { get; set; } | |
| 30 | + | |
| 31 | + /// <summary> | |
| 32 | + /// 地域线路ID | |
| 33 | + /// </summary> | |
| 34 | + public string areaLineId { get; set; } | |
| 35 | + | |
| 36 | + /// <summary> | |
| 37 | + /// 人格线路ID | |
| 38 | + /// </summary> | |
| 39 | + public string mbtLineId { get; set; } | |
| 40 | + | |
| 41 | + /// <summary> | |
| 42 | + /// 创建时间 | |
| 43 | + /// </summary> | |
| 44 | + public DateTime? creatorTime { get; set; } | |
| 45 | + | |
| 46 | + /// <summary> | |
| 47 | + /// 修改时间 | |
| 48 | + /// </summary> | |
| 49 | + public DateTime? lastModifyTime { get; set; } | |
| 50 | + | |
| 51 | + /// <summary> | |
| 52 | + /// 地域ID | |
| 53 | + /// </summary> | |
| 54 | + public string areaId { get; set; } | |
| 55 | + | |
| 56 | + /// <summary> | |
| 57 | + /// 人格ID | |
| 58 | + /// </summary> | |
| 59 | + public string mbtId { get; set; } | |
| 60 | + | |
| 61 | + } | |
| 62 | +} | ... | ... |
antis-ncc-net-core/NCC.BlindBox.Entitys/抽奖记录/Dto/TbBoxLogListOutput.cs
0 → 100644
| 1 | +using NCC.Education.Entitys; | |
| 2 | +using NCC.System.Entitys.Permission; | |
| 3 | +using System; | |
| 4 | + | |
| 5 | +namespace NCC.Blind.Entitys.Dto.TbBoxLog | |
| 6 | +{ | |
| 7 | + /// <summary> | |
| 8 | + /// 抽奖记录输入参数 | |
| 9 | + /// </summary> | |
| 10 | + public class TbBoxLogListOutput | |
| 11 | + { | |
| 12 | + /// <summary> | |
| 13 | + /// 主键 | |
| 14 | + /// </summary> | |
| 15 | + public string id { get; set; } | |
| 16 | + | |
| 17 | + /// <summary> | |
| 18 | + /// 用户ID | |
| 19 | + /// </summary> | |
| 20 | + public string userId { get; set; } | |
| 21 | + | |
| 22 | + /// <summary> | |
| 23 | + /// 用户信息 | |
| 24 | + /// </summary> | |
| 25 | + public UserEntity user { get; set; } | |
| 26 | + | |
| 27 | + /// <summary> | |
| 28 | + /// 盲盒订单ID | |
| 29 | + /// </summary> | |
| 30 | + public string boxOrderId { get; set; } | |
| 31 | + /// <summary> | |
| 32 | + /// 盲盒订单信息 | |
| 33 | + /// </summary> | |
| 34 | + public TbBoxOrderEntity boxOrder { get; set; } | |
| 35 | + | |
| 36 | + /// <summary> | |
| 37 | + /// 路线 1--地域路线 2--人格路线 | |
| 38 | + /// </summary> | |
| 39 | + public string type { get; set; } | |
| 40 | + | |
| 41 | + /// <summary> | |
| 42 | + /// 地域线路ID | |
| 43 | + /// </summary> | |
| 44 | + public string areaLineId { get; set; } | |
| 45 | + | |
| 46 | + /// <summary> | |
| 47 | + /// 地域线路 | |
| 48 | + /// </summary> | |
| 49 | + public TbAreaLineEntity areaLine { get; set; } | |
| 50 | + | |
| 51 | + /// <summary> | |
| 52 | + /// 人格线路ID | |
| 53 | + /// </summary> | |
| 54 | + public string mbtLineId { get; set; } | |
| 55 | + | |
| 56 | + /// <summary> | |
| 57 | + /// 人格线路信息 | |
| 58 | + /// </summary> | |
| 59 | + public TbMbtLineEntity mbtLine { get; set; } | |
| 60 | + | |
| 61 | + /// <summary> | |
| 62 | + /// 创建时间 | |
| 63 | + /// </summary> | |
| 64 | + public DateTime? creatorTime { get; set; } | |
| 65 | + | |
| 66 | + /// <summary> | |
| 67 | + /// 修改时间 | |
| 68 | + /// </summary> | |
| 69 | + public DateTime? lastModifyTime { get; set; } | |
| 70 | + | |
| 71 | + /// <summary> | |
| 72 | + /// 地域ID | |
| 73 | + /// </summary> | |
| 74 | + public string areaId { get; set; } | |
| 75 | + /// <summary> | |
| 76 | + /// 地域信息 | |
| 77 | + /// </summary> | |
| 78 | + public TbAreaEntity area { get; set; } | |
| 79 | + | |
| 80 | + /// <summary> | |
| 81 | + /// 人格ID | |
| 82 | + /// </summary> | |
| 83 | + public string mbtId { get; set; } | |
| 84 | + /// <summary> | |
| 85 | + /// 人格信息 | |
| 86 | + /// </summary> | |
| 87 | + public TbMbtCharacterEntity mbt { get; set; } | |
| 88 | + | |
| 89 | + } | |
| 90 | +} | ... | ... |
antis-ncc-net-core/NCC.BlindBox.Entitys/抽奖记录/Dto/TbBoxLogListQueryInput.cs
0 → 100644
| 1 | +using NCC.Common.Filter; | |
| 2 | +using System.Collections.Generic; | |
| 3 | + | |
| 4 | +namespace NCC.Blind.Entitys.Dto.TbBoxLog | |
| 5 | +{ | |
| 6 | + /// <summary> | |
| 7 | + /// 抽奖记录列表查询输入 | |
| 8 | + /// </summary> | |
| 9 | + public class TbBoxLogListQueryInput : PageInputBase | |
| 10 | + { | |
| 11 | + /// <summary> | |
| 12 | + /// 选择导出数据key | |
| 13 | + /// </summary> | |
| 14 | + public string selectKey { get; set; } | |
| 15 | + | |
| 16 | + /// <summary> | |
| 17 | + /// | |
| 18 | + /// </summary> | |
| 19 | + public int dataType { get; set; } | |
| 20 | + | |
| 21 | + | |
| 22 | + /// <summary> | |
| 23 | + /// 用户ID | |
| 24 | + /// </summary> | |
| 25 | + public string userId { get; set; } | |
| 26 | + | |
| 27 | + /// <summary> | |
| 28 | + /// 盲盒订单ID | |
| 29 | + /// </summary> | |
| 30 | + public string boxOrderId { get; set; } | |
| 31 | + | |
| 32 | + /// <summary> | |
| 33 | + /// 路线 1--地域路线 2--人格路线 | |
| 34 | + /// </summary> | |
| 35 | + public string type { get; set; } | |
| 36 | + | |
| 37 | + /// <summary> | |
| 38 | + /// 地域线路ID | |
| 39 | + /// </summary> | |
| 40 | + public string areaLineId { get; set; } | |
| 41 | + | |
| 42 | + /// <summary> | |
| 43 | + /// 人格线路ID | |
| 44 | + /// </summary> | |
| 45 | + public string mbtLineId { get; set; } | |
| 46 | + | |
| 47 | + /// <summary> | |
| 48 | + /// 地域ID | |
| 49 | + /// </summary> | |
| 50 | + public string areaId { get; set; } | |
| 51 | + | |
| 52 | + /// <summary> | |
| 53 | + /// 人格ID | |
| 54 | + /// </summary> | |
| 55 | + public string mbtId { get; set; } | |
| 56 | + | |
| 57 | + } | |
| 58 | +} | ... | ... |
antis-ncc-net-core/NCC.BlindBox.Entitys/抽奖记录/Dto/TbBoxLogUpInput.cs
0 → 100644
| 1 | +using System; | |
| 2 | +using System.Collections.Generic; | |
| 3 | + | |
| 4 | +namespace NCC.Blind.Entitys.Dto.TbBoxLog | |
| 5 | +{ | |
| 6 | + /// <summary> | |
| 7 | + /// 抽奖记录更新输入参数 | |
| 8 | + /// </summary> | |
| 9 | + public class TbBoxLogUpInput : TbBoxLogCrInput | |
| 10 | + { | |
| 11 | + /// <summary> | |
| 12 | + /// 主键 | |
| 13 | + /// </summary> | |
| 14 | + public string id { get; set; } | |
| 15 | + | |
| 16 | + } | |
| 17 | +} | ... | ... |
antis-ncc-net-core/NCC.BlindBox.Entitys/抽奖记录/Entity/TbBoxLogEntity.cs
0 → 100644
| 1 | +using NCC.Common.Const; | |
| 2 | +using SqlSugar; | |
| 3 | +using System; | |
| 4 | + | |
| 5 | +namespace NCC.Blind.Entitys | |
| 6 | +{ | |
| 7 | + /// <summary> | |
| 8 | + /// 抽奖记录 | |
| 9 | + /// </summary> | |
| 10 | + [SugarTable("tb_BoxLog")] | |
| 11 | + [Tenant(ClaimConst.TENANT_ID)] | |
| 12 | + public class TbBoxLogEntity | |
| 13 | + { | |
| 14 | + /// <summary> | |
| 15 | + /// 主键 | |
| 16 | + /// </summary> | |
| 17 | + [SugarColumn(ColumnName = "F_Id", IsPrimaryKey = true)] | |
| 18 | + public string Id { get; set; } | |
| 19 | + | |
| 20 | + /// <summary> | |
| 21 | + /// 用户ID | |
| 22 | + /// </summary> | |
| 23 | + [SugarColumn(ColumnName = "F_UserId")] | |
| 24 | + public string UserId { get; set; } | |
| 25 | + | |
| 26 | + /// <summary> | |
| 27 | + /// 盲盒订单ID | |
| 28 | + /// </summary> | |
| 29 | + [SugarColumn(ColumnName = "F_BoxOrderId")] | |
| 30 | + public string BoxOrderId { get; set; } | |
| 31 | + | |
| 32 | + /// <summary> | |
| 33 | + /// 路线 1--地域路线 2--人格路线 | |
| 34 | + /// </summary> | |
| 35 | + [SugarColumn(ColumnName = "F_Type")] | |
| 36 | + public string Type { get; set; } | |
| 37 | + | |
| 38 | + /// <summary> | |
| 39 | + /// 地域线路ID | |
| 40 | + /// </summary> | |
| 41 | + [SugarColumn(ColumnName = "F_AreaLineId")] | |
| 42 | + public string AreaLineId { get; set; } | |
| 43 | + | |
| 44 | + /// <summary> | |
| 45 | + /// 人格线路ID | |
| 46 | + /// </summary> | |
| 47 | + [SugarColumn(ColumnName = "F_MbtLineId")] | |
| 48 | + public string MbtLineId { get; set; } | |
| 49 | + | |
| 50 | + /// <summary> | |
| 51 | + /// 创建时间 | |
| 52 | + /// </summary> | |
| 53 | + [SugarColumn(ColumnName = "F_CreatorTime")] | |
| 54 | + public DateTime? CreatorTime { get; set; } | |
| 55 | + | |
| 56 | + /// <summary> | |
| 57 | + /// 修改时间 | |
| 58 | + /// </summary> | |
| 59 | + [SugarColumn(ColumnName = "F_LastModifyTime")] | |
| 60 | + public DateTime? LastModifyTime { get; set; } | |
| 61 | + /// <summary> | |
| 62 | + /// 地域ID | |
| 63 | + /// </summary> | |
| 64 | + [SugarColumn(ColumnName = "F_AreaId")] | |
| 65 | + public string AreaId { get; set; } | |
| 66 | + | |
| 67 | + /// <summary> | |
| 68 | + /// 人格ID | |
| 69 | + /// </summary> | |
| 70 | + [SugarColumn(ColumnName = "F_MbtId")] | |
| 71 | + public string MbtId { get; set; } | |
| 72 | + | |
| 73 | + } | |
| 74 | +} | |
| 0 | 75 | \ No newline at end of file | ... | ... |
antis-ncc-net-core/NCC.BlindBox.Entitys/抽奖记录/Mapper/TbBoxLogMapper.cs
0 → 100644
| 1 | +using NCC.Common.Helper; | |
| 2 | +using NCC.Blind.Entitys.Dto.TbBoxLog; | |
| 3 | +using Mapster; | |
| 4 | +using System.Collections.Generic; | |
| 5 | + | |
| 6 | +namespace NCC.Blind.Entitys.Mapper.TbBoxLog | |
| 7 | +{ | |
| 8 | + public class Mapper : IRegister | |
| 9 | + { | |
| 10 | + public void Register(TypeAdapterConfig config) | |
| 11 | + { | |
| 12 | + } | |
| 13 | + } | |
| 14 | +} | ... | ... |
antis-ncc-net-core/NCC.BlindBox.Entitys/旅游景点/Dto/TbTravelSpotCrInput.cs
0 → 100644
| 1 | +using System; | |
| 2 | +using System.Collections.Generic; | |
| 3 | +using NCC.Common.Model; | |
| 4 | + | |
| 5 | +namespace NCC.Blind.Entitys.Dto.TbTravelSpot | |
| 6 | +{ | |
| 7 | + /// <summary> | |
| 8 | + /// 旅游景点修改输入参数 | |
| 9 | + /// </summary> | |
| 10 | + public class TbTravelSpotCrInput | |
| 11 | + { | |
| 12 | + /// <summary> | |
| 13 | + /// 图片信息 | |
| 14 | + /// </summary> | |
| 15 | + public List<FileControlsModel> homeBanner { get; set; } | |
| 16 | + | |
| 17 | + /// <summary> | |
| 18 | + /// 景点图片 | |
| 19 | + /// </summary> | |
| 20 | + public List<FileControlsModel> banner { get; set; } | |
| 21 | + | |
| 22 | + /// <summary> | |
| 23 | + /// 标题 | |
| 24 | + /// </summary> | |
| 25 | + public string title { get; set; } | |
| 26 | + | |
| 27 | + /// <summary> | |
| 28 | + /// 备注 | |
| 29 | + /// </summary> | |
| 30 | + public string remark { get; set; } | |
| 31 | + | |
| 32 | + /// <summary> | |
| 33 | + /// 富文本 | |
| 34 | + /// </summary> | |
| 35 | + public string editors { get; set; } | |
| 36 | + | |
| 37 | + /// <summary> | |
| 38 | + /// 原价 | |
| 39 | + /// </summary> | |
| 40 | + public decimal oldMoneys { get; set; } | |
| 41 | + | |
| 42 | + /// <summary> | |
| 43 | + /// 现价 | |
| 44 | + /// </summary> | |
| 45 | + public decimal nowMoneys { get; set; } | |
| 46 | + | |
| 47 | + /// <summary> | |
| 48 | + /// 创建时间 | |
| 49 | + /// </summary> | |
| 50 | + public DateTime? creatorTime { get; set; } | |
| 51 | + | |
| 52 | + /// <summary> | |
| 53 | + /// 修改时间 | |
| 54 | + /// </summary> | |
| 55 | + public DateTime? lastModifyTime { get; set; } | |
| 56 | + | |
| 57 | + } | |
| 58 | +} | ... | ... |
antis-ncc-net-core/NCC.BlindBox.Entitys/旅游景点/Dto/TbTravelSpotInfoOutput.cs
0 → 100644
| 1 | +using System; | |
| 2 | +using System.Collections.Generic; | |
| 3 | +using NCC.Common.Model; | |
| 4 | + | |
| 5 | +namespace NCC.Blind.Entitys.Dto.TbTravelSpot | |
| 6 | +{ | |
| 7 | + /// <summary> | |
| 8 | + /// 旅游景点输出参数 | |
| 9 | + /// </summary> | |
| 10 | + public class TbTravelSpotInfoOutput | |
| 11 | + { | |
| 12 | + /// <summary> | |
| 13 | + /// 主键 | |
| 14 | + /// </summary> | |
| 15 | + public string id { get; set; } | |
| 16 | + | |
| 17 | + /// <summary> | |
| 18 | + /// 图片信息 | |
| 19 | + /// </summary> | |
| 20 | + public List<FileControlsModel> homeBanner { get; set; } | |
| 21 | + | |
| 22 | + /// <summary> | |
| 23 | + /// 景点图片 | |
| 24 | + /// </summary> | |
| 25 | + public List<FileControlsModel> banner { get; set; } | |
| 26 | + | |
| 27 | + /// <summary> | |
| 28 | + /// 标题 | |
| 29 | + /// </summary> | |
| 30 | + public string title { get; set; } | |
| 31 | + | |
| 32 | + /// <summary> | |
| 33 | + /// 备注 | |
| 34 | + /// </summary> | |
| 35 | + public string remark { get; set; } | |
| 36 | + | |
| 37 | + /// <summary> | |
| 38 | + /// 富文本 | |
| 39 | + /// </summary> | |
| 40 | + public string editors { get; set; } | |
| 41 | + | |
| 42 | + /// <summary> | |
| 43 | + /// 原价 | |
| 44 | + /// </summary> | |
| 45 | + public decimal oldMoneys { get; set; } | |
| 46 | + | |
| 47 | + /// <summary> | |
| 48 | + /// 现价 | |
| 49 | + /// </summary> | |
| 50 | + public decimal nowMoneys { get; set; } | |
| 51 | + | |
| 52 | + /// <summary> | |
| 53 | + /// 创建时间 | |
| 54 | + /// </summary> | |
| 55 | + public DateTime? creatorTime { get; set; } | |
| 56 | + | |
| 57 | + /// <summary> | |
| 58 | + /// 修改时间 | |
| 59 | + /// </summary> | |
| 60 | + public DateTime? lastModifyTime { get; set; } | |
| 61 | + | |
| 62 | + } | |
| 63 | +} | ... | ... |
antis-ncc-net-core/NCC.BlindBox.Entitys/旅游景点/Dto/TbTravelSpotListOutput.cs
0 → 100644
| 1 | +using Aspose.Words.Lists; | |
| 2 | +using NCC.Common.Model; | |
| 3 | +using Newtonsoft.Json; | |
| 4 | +using SqlSugar; | |
| 5 | +using System; | |
| 6 | +using System.Collections.Generic; | |
| 7 | + | |
| 8 | +namespace NCC.Blind.Entitys.Dto.TbTravelSpot | |
| 9 | +{ | |
| 10 | + /// <summary> | |
| 11 | + /// 旅游景点输入参数 | |
| 12 | + /// </summary> | |
| 13 | + public class TbTravelSpotListOutput | |
| 14 | + { | |
| 15 | + /// <summary> | |
| 16 | + /// 主键 | |
| 17 | + /// </summary> | |
| 18 | + public string id { get; set; } | |
| 19 | + | |
| 20 | + /// <summary> | |
| 21 | + /// 标题 | |
| 22 | + /// </summary> | |
| 23 | + public string title { get; set; } | |
| 24 | + | |
| 25 | + /// <summary> | |
| 26 | + /// 景点富文本 | |
| 27 | + /// </summary> | |
| 28 | + public string editors { get; set; } | |
| 29 | + /// <summary> | |
| 30 | + /// 原价 | |
| 31 | + /// </summary> | |
| 32 | + public decimal? oldMoneys { get; set; } | |
| 33 | + | |
| 34 | + /// <summary> | |
| 35 | + /// 现价 | |
| 36 | + /// </summary> | |
| 37 | + public decimal? nowMoneys { get; set; } | |
| 38 | + | |
| 39 | + /// <summary> | |
| 40 | + /// 备注 | |
| 41 | + /// </summary> | |
| 42 | + public string remark { get; set; } | |
| 43 | + | |
| 44 | + /// <summary> | |
| 45 | + /// 创建时间 | |
| 46 | + /// </summary> | |
| 47 | + public DateTime? creatorTime { get; set; } | |
| 48 | + | |
| 49 | + /// <summary> | |
| 50 | + /// 修改时间 | |
| 51 | + /// </summary> | |
| 52 | + public DateTime? lastModifyTime { get; set; } | |
| 53 | + | |
| 54 | + /// <summary> | |
| 55 | + /// 图片信息 | |
| 56 | + /// </summary> | |
| 57 | + public string homeBanner { get; set; } | |
| 58 | + | |
| 59 | + /// <summary> | |
| 60 | + /// 图片信息集合 | |
| 61 | + /// </summary> | |
| 62 | + public List<FileControlsModel> HomeBanner { get | |
| 63 | + { | |
| 64 | + try | |
| 65 | + { | |
| 66 | + return JsonConvert.DeserializeObject<List<FileControlsModel>>(homeBanner); | |
| 67 | + }catch(Exception ex) | |
| 68 | + { | |
| 69 | + return new List<FileControlsModel>(); | |
| 70 | + } | |
| 71 | + } } | |
| 72 | + | |
| 73 | + /// <summary> | |
| 74 | + /// 景点图片 | |
| 75 | + /// </summary> | |
| 76 | + public string banner { get; set; } | |
| 77 | + | |
| 78 | + /// <summary> | |
| 79 | + /// 景点图片集合 | |
| 80 | + /// </summary> | |
| 81 | + public List<FileControlsModel> Banner { get | |
| 82 | + { | |
| 83 | + try | |
| 84 | + { | |
| 85 | + return JsonConvert.DeserializeObject<List<FileControlsModel>>(banner); | |
| 86 | + }catch(Exception ex) | |
| 87 | + { | |
| 88 | + return new List<FileControlsModel>(); | |
| 89 | + } | |
| 90 | + } } | |
| 91 | + | |
| 92 | + } | |
| 93 | +} | ... | ... |
antis-ncc-net-core/NCC.BlindBox.Entitys/旅游景点/Dto/TbTravelSpotListQueryInput.cs
0 → 100644
| 1 | +using NCC.Common.Filter; | |
| 2 | +using System.Collections.Generic; | |
| 3 | + | |
| 4 | +namespace NCC.Blind.Entitys.Dto.TbTravelSpot | |
| 5 | +{ | |
| 6 | + /// <summary> | |
| 7 | + /// 旅游景点列表查询输入 | |
| 8 | + /// </summary> | |
| 9 | + public class TbTravelSpotListQueryInput : PageInputBase | |
| 10 | + { | |
| 11 | + /// <summary> | |
| 12 | + /// 选择导出数据key | |
| 13 | + /// </summary> | |
| 14 | + public string selectKey { get; set; } | |
| 15 | + | |
| 16 | + /// <summary> | |
| 17 | + /// | |
| 18 | + /// </summary> | |
| 19 | + public int dataType { get; set; } | |
| 20 | + | |
| 21 | + | |
| 22 | + /// <summary> | |
| 23 | + /// 标题 | |
| 24 | + /// </summary> | |
| 25 | + public string title { get; set; } | |
| 26 | + | |
| 27 | + /// <summary> | |
| 28 | + /// 备注 | |
| 29 | + /// </summary> | |
| 30 | + public string remark { get; set; } | |
| 31 | + | |
| 32 | + } | |
| 33 | +} | ... | ... |
antis-ncc-net-core/NCC.BlindBox.Entitys/旅游景点/Dto/TbTravelSpotUpInput.cs
0 → 100644
| 1 | +using System; | |
| 2 | +using System.Collections.Generic; | |
| 3 | + | |
| 4 | +namespace NCC.Blind.Entitys.Dto.TbTravelSpot | |
| 5 | +{ | |
| 6 | + /// <summary> | |
| 7 | + /// 旅游景点更新输入参数 | |
| 8 | + /// </summary> | |
| 9 | + public class TbTravelSpotUpInput : TbTravelSpotCrInput | |
| 10 | + { | |
| 11 | + /// <summary> | |
| 12 | + /// 主键 | |
| 13 | + /// </summary> | |
| 14 | + public string id { get; set; } | |
| 15 | + | |
| 16 | + } | |
| 17 | +} | ... | ... |
antis-ncc-net-core/NCC.BlindBox.Entitys/旅游景点/Entity/TbTravelSpotEntity.cs
0 → 100644
| 1 | +using NCC.Common.Const; | |
| 2 | +using SqlSugar; | |
| 3 | +using System; | |
| 4 | + | |
| 5 | +namespace NCC.Blind.Entitys | |
| 6 | +{ | |
| 7 | + /// <summary> | |
| 8 | + /// 旅游景点 | |
| 9 | + /// </summary> | |
| 10 | + [SugarTable("tb_TravelSpot")] | |
| 11 | + [Tenant(ClaimConst.TENANT_ID)] | |
| 12 | + public class TbTravelSpotEntity | |
| 13 | + { | |
| 14 | + /// <summary> | |
| 15 | + /// 主键 | |
| 16 | + /// </summary> | |
| 17 | + [SugarColumn(ColumnName = "F_Id", IsPrimaryKey = true)] | |
| 18 | + public string Id { get; set; } | |
| 19 | + | |
| 20 | + /// <summary> | |
| 21 | + /// 图片信息 | |
| 22 | + /// </summary> | |
| 23 | + [SugarColumn(ColumnName = "F_HomeBanner")] | |
| 24 | + public string HomeBanner { get; set; } | |
| 25 | + | |
| 26 | + /// <summary> | |
| 27 | + /// 景点图片 | |
| 28 | + /// </summary> | |
| 29 | + [SugarColumn(ColumnName = "F_Banner")] | |
| 30 | + public string Banner { get; set; } | |
| 31 | + | |
| 32 | + /// <summary> | |
| 33 | + /// 标题 | |
| 34 | + /// </summary> | |
| 35 | + [SugarColumn(ColumnName = "F_Title")] | |
| 36 | + public string Title { get; set; } | |
| 37 | + | |
| 38 | + /// <summary> | |
| 39 | + /// 备注 | |
| 40 | + /// </summary> | |
| 41 | + [SugarColumn(ColumnName = "F_Remark")] | |
| 42 | + public string Remark { get; set; } | |
| 43 | + | |
| 44 | + /// <summary> | |
| 45 | + /// 富文本 | |
| 46 | + /// </summary> | |
| 47 | + [SugarColumn(ColumnName = "F_Editors")] | |
| 48 | + public string Editors { get; set; } | |
| 49 | + | |
| 50 | + /// <summary> | |
| 51 | + /// 原价 | |
| 52 | + /// </summary> | |
| 53 | + [SugarColumn(ColumnName = "F_OldMoneys")] | |
| 54 | + public decimal OldMoneys { get; set; } | |
| 55 | + | |
| 56 | + /// <summary> | |
| 57 | + /// 现价 | |
| 58 | + /// </summary> | |
| 59 | + [SugarColumn(ColumnName = "F_NowMoneys")] | |
| 60 | + public decimal NowMoneys { get; set; } | |
| 61 | + | |
| 62 | + /// <summary> | |
| 63 | + /// 创建时间 | |
| 64 | + /// </summary> | |
| 65 | + [SugarColumn(ColumnName = "F_CreatorTime")] | |
| 66 | + public DateTime? CreatorTime { get; set; } | |
| 67 | + | |
| 68 | + /// <summary> | |
| 69 | + /// 修改时间 | |
| 70 | + /// </summary> | |
| 71 | + [SugarColumn(ColumnName = "F_LastModifyTime")] | |
| 72 | + public DateTime? LastModifyTime { get; set; } | |
| 73 | + | |
| 74 | + } | |
| 75 | +} | |
| 0 | 76 | \ No newline at end of file | ... | ... |
antis-ncc-net-core/NCC.BlindBox.Entitys/旅游景点/Mapper/TbTravelSpotMapper.cs
0 → 100644
| 1 | +using NCC.Common.Helper; | |
| 2 | +using NCC.Common.Model; | |
| 3 | +using NCC.Blind.Entitys.Dto.TbTravelSpot; | |
| 4 | +using Mapster; | |
| 5 | +using System.Collections.Generic; | |
| 6 | + | |
| 7 | +namespace NCC.Blind.Entitys.Mapper.TbTravelSpot | |
| 8 | +{ | |
| 9 | + public class Mapper : IRegister | |
| 10 | + { | |
| 11 | + public void Register(TypeAdapterConfig config) | |
| 12 | + { | |
| 13 | + config.ForType<TbTravelSpotCrInput, TbTravelSpotEntity>() | |
| 14 | + .Map(dest => dest.HomeBanner, src => src.homeBanner.ToJson()) | |
| 15 | + .Map(dest => dest.Banner, src => src.banner.ToJson()) | |
| 16 | + ; | |
| 17 | + config.ForType<TbTravelSpotEntity, TbTravelSpotInfoOutput>() | |
| 18 | + .Map(dest => dest.homeBanner, src => src.HomeBanner.ToObject<List<FileControlsModel>>()) | |
| 19 | + .Map(dest => dest.banner, src => src.Banner.ToObject<List<FileControlsModel>>()) | |
| 20 | + ; | |
| 21 | + } | |
| 22 | + } | |
| 23 | +} | ... | ... |
antis-ncc-net-core/NCC.BlindBox.Entitys/用户协议/Dto/TbUserAgreementCrInput.cs
0 → 100644
| 1 | +using System; | |
| 2 | +using System.Collections.Generic; | |
| 3 | + | |
| 4 | +namespace NCC.Blind.Entitys.Dto.TbUserAgreement | |
| 5 | +{ | |
| 6 | + /// <summary> | |
| 7 | + /// 用户协议修改输入参数 | |
| 8 | + /// </summary> | |
| 9 | + public class TbUserAgreementCrInput | |
| 10 | + { | |
| 11 | + /// <summary> | |
| 12 | + /// 协议内容 | |
| 13 | + /// </summary> | |
| 14 | + public string contents { get; set; } | |
| 15 | + | |
| 16 | + /// <summary> | |
| 17 | + /// 创建时间 | |
| 18 | + /// </summary> | |
| 19 | + public DateTime? creatorTime { get; set; } | |
| 20 | + | |
| 21 | + /// <summary> | |
| 22 | + /// 修改时间 | |
| 23 | + /// </summary> | |
| 24 | + public DateTime? lastModifyTime { get; set; } | |
| 25 | + | |
| 26 | + } | |
| 27 | +} | ... | ... |
antis-ncc-net-core/NCC.BlindBox.Entitys/用户协议/Dto/TbUserAgreementInfoOutput.cs
0 → 100644
| 1 | +using System; | |
| 2 | +using System.Collections.Generic; | |
| 3 | + | |
| 4 | +namespace NCC.Blind.Entitys.Dto.TbUserAgreement | |
| 5 | +{ | |
| 6 | + /// <summary> | |
| 7 | + /// 用户协议输出参数 | |
| 8 | + /// </summary> | |
| 9 | + public class TbUserAgreementInfoOutput | |
| 10 | + { | |
| 11 | + /// <summary> | |
| 12 | + /// 主键 | |
| 13 | + /// </summary> | |
| 14 | + public string id { get; set; } | |
| 15 | + | |
| 16 | + /// <summary> | |
| 17 | + /// 协议内容 | |
| 18 | + /// </summary> | |
| 19 | + public string contents { get; set; } | |
| 20 | + | |
| 21 | + /// <summary> | |
| 22 | + /// 创建时间 | |
| 23 | + /// </summary> | |
| 24 | + public DateTime? creatorTime { get; set; } | |
| 25 | + | |
| 26 | + /// <summary> | |
| 27 | + /// 修改时间 | |
| 28 | + /// </summary> | |
| 29 | + public DateTime? lastModifyTime { get; set; } | |
| 30 | + | |
| 31 | + } | |
| 32 | +} | ... | ... |