Commit 2bbff3d80b2e3cb42c1c4e1a176515b8eb142e2d
1 parent
006cc67a
1
Showing
3 changed files
with
292 additions
and
4 deletions
src/views/baseSpecialAction/FormPage.vue
| @@ -51,7 +51,7 @@ | @@ -51,7 +51,7 @@ | ||
| 51 | <el-input-number v-model="dataForm.releaseCount" :min="1" :max="100"></el-input-number> | 51 | <el-input-number v-model="dataForm.releaseCount" :min="1" :max="100"></el-input-number> |
| 52 | </el-form-item> | 52 | </el-form-item> |
| 53 | </el-col> | 53 | </el-col> |
| 54 | - <el-col :span="12"> | 54 | + <el-col :span="24"> |
| 55 | <el-form-item label="发布周期" prop="releaseCount"> | 55 | <el-form-item label="发布周期" prop="releaseCount"> |
| 56 | <el-select v-model="dataForm.releaseCycle" placeholder="请选择"> | 56 | <el-select v-model="dataForm.releaseCycle" placeholder="请选择"> |
| 57 | <el-option v-for="item in CycleOptions" :key="item.value" :label="item.label" :value="item.value"> | 57 | <el-option v-for="item in CycleOptions" :key="item.value" :label="item.label" :value="item.value"> |
| @@ -59,7 +59,7 @@ | @@ -59,7 +59,7 @@ | ||
| 59 | </el-select> | 59 | </el-select> |
| 60 | </el-form-item> | 60 | </el-form-item> |
| 61 | </el-col> | 61 | </el-col> |
| 62 | - <el-col :span="12"> | 62 | + <el-col :span="24"> |
| 63 | <el-form-item label="自动发布" prop="isOpenRelease"> | 63 | <el-form-item label="自动发布" prop="isOpenRelease"> |
| 64 | <el-radio-group v-model="dataForm.isOpenRelease"> | 64 | <el-radio-group v-model="dataForm.isOpenRelease"> |
| 65 | <el-radio :label="true">是</el-radio> | 65 | <el-radio :label="true">是</el-radio> |
| @@ -85,6 +85,11 @@ | @@ -85,6 +85,11 @@ | ||
| 85 | </div> | 85 | </div> |
| 86 | </el-form-item> | 86 | </el-form-item> |
| 87 | </el-col> | 87 | </el-col> |
| 88 | + <el-col :span="24" v-if="ncc.hasFormP('communicationArea')"> | ||
| 89 | + <el-form-item label="填报表单" prop="communicationArea"> | ||
| 90 | + <el-button size="mini" @click="dialogVisible = true">设计表单</el-button> | ||
| 91 | + </el-form-item> | ||
| 92 | + </el-col> | ||
| 88 | <el-col :span="24" v-if="false"> | 93 | <el-col :span="24" v-if="false"> |
| 89 | <el-form-item label="状态" prop="state"> | 94 | <el-form-item label="状态" prop="state"> |
| 90 | <el-input v-model="dataForm.state" placeholder="请输入" clearable :style="{ width: '100%' }"> | 95 | <el-input v-model="dataForm.state" placeholder="请输入" clearable :style="{ width: '100%' }"> |
| @@ -123,20 +128,35 @@ | @@ -123,20 +128,35 @@ | ||
| 123 | </span> | 128 | </span> |
| 124 | </div> | 129 | </div> |
| 125 | </div> | 130 | </div> |
| 131 | + <el-dialog title="专项行动表单设计" :visible.sync="dialogVisible" fullscreen > | ||
| 132 | + <!-- <webDesignForm ref="webDesignForm"></webDesignForm> --> | ||
| 133 | + <iframe | ||
| 134 | + :src="nestedPageUrl" | ||
| 135 | + width="100%" | ||
| 136 | + :height="viewportHeight - 110 + 'px'" | ||
| 137 | + frameborder="0" | ||
| 138 | + allowfullscreen> | ||
| 139 | + </iframe> | ||
| 140 | + </el-dialog> | ||
| 126 | </div> | 141 | </div> |
| 127 | </template> | 142 | </template> |
| 128 | <script> | 143 | <script> |
| 129 | import request from "@/utils/request"; | 144 | import request from "@/utils/request"; |
| 130 | import { getDictionaryDataSelector } from "@/api/systemData/dictionary"; | 145 | import { getDictionaryDataSelector } from "@/api/systemData/dictionary"; |
| 131 | import { previewDataInterface } from "@/api/systemData/dataInterface"; | 146 | import { previewDataInterface } from "@/api/systemData/dataInterface"; |
| 147 | +import webDesignForm from './webDesign/Form.vue'; | ||
| 148 | + | ||
| 132 | export default { | 149 | export default { |
| 133 | - components: {}, | 150 | + components: { webDesignForm }, |
| 134 | props: [], | 151 | props: [], |
| 135 | data() { | 152 | data() { |
| 136 | return { | 153 | return { |
| 137 | loading: false, | 154 | loading: false, |
| 138 | visible: false, | 155 | visible: false, |
| 139 | isDetail: false, | 156 | isDetail: false, |
| 157 | + dialogVisible: false, | ||
| 158 | + viewportHeight: 0, | ||
| 159 | + nestedPageUrl:"http://8.130.38.56:8043/old/#/onlineDev/webDesign/indexNew", | ||
| 140 | dataForm: { | 160 | dataForm: { |
| 141 | id: undefined, | 161 | id: undefined, |
| 142 | specialActionType: undefined, | 162 | specialActionType: undefined, |
| @@ -150,7 +170,7 @@ export default { | @@ -150,7 +170,7 @@ export default { | ||
| 150 | creatorTime: undefined, | 170 | creatorTime: undefined, |
| 151 | lastModifyUserId: undefined, | 171 | lastModifyUserId: undefined, |
| 152 | lastModifyTime: undefined, | 172 | lastModifyTime: undefined, |
| 153 | - isOpenRelease:false, | 173 | + isOpenRelease: false, |
| 154 | }, | 174 | }, |
| 155 | rules: { | 175 | rules: { |
| 156 | specialActionType: [ | 176 | specialActionType: [ |
| @@ -194,9 +214,17 @@ export default { | @@ -194,9 +214,17 @@ export default { | ||
| 194 | created() { | 214 | created() { |
| 195 | this.getspecialActionTypeOptions(); | 215 | this.getspecialActionTypeOptions(); |
| 196 | this.getcommunicationAreaOptions(); | 216 | this.getcommunicationAreaOptions(); |
| 217 | + this.updateViewportHeight(); | ||
| 218 | + // 监听窗口大小变化事件 | ||
| 219 | + window.addEventListener('resize', this.updateViewportHeight); | ||
| 197 | }, | 220 | }, |
| 198 | mounted() { }, | 221 | mounted() { }, |
| 222 | + beforeDestroy() { | ||
| 223 | + // 移除窗口大小变化事件监听器 | ||
| 224 | + window.removeEventListener('resize', this.updateViewportHeight); | ||
| 225 | + }, | ||
| 199 | methods: { | 226 | methods: { |
| 227 | + | ||
| 200 | //查询所有区县 | 228 | //查询所有区县 |
| 201 | getcommunicationAreaOptions() { | 229 | getcommunicationAreaOptions() { |
| 202 | request({ | 230 | request({ |
| @@ -206,6 +234,10 @@ export default { | @@ -206,6 +234,10 @@ export default { | ||
| 206 | this.communicationAreaOptions = res.data; | 234 | this.communicationAreaOptions = res.data; |
| 207 | }); | 235 | }); |
| 208 | }, | 236 | }, |
| 237 | + updateViewportHeight() { | ||
| 238 | + // 获取页面显示高度 | ||
| 239 | + this.viewportHeight = window.innerHeight || document.documentElement.clientHeight; | ||
| 240 | + }, | ||
| 209 | getspecialActionTypeOptions() { | 241 | getspecialActionTypeOptions() { |
| 210 | getDictionaryDataSelector("576310654982423813").then((res) => { | 242 | getDictionaryDataSelector("576310654982423813").then((res) => { |
| 211 | this.specialActionTypeOptions = res.data.list; | 243 | this.specialActionTypeOptions = res.data.list; |
| @@ -282,3 +314,6 @@ export default { | @@ -282,3 +314,6 @@ export default { | ||
| 282 | }, | 314 | }, |
| 283 | }; | 315 | }; |
| 284 | </script> | 316 | </script> |
| 317 | +<style> | ||
| 318 | +.el-dialog__body{padding: 0px !important;} | ||
| 319 | +</style> |
src/views/baseSpecialAction/webDesign/Form.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <el-dialog :visible.sync="visible" fullscreen lock-scroll class="NCC-full-dialog" | ||
| 3 | + :show-close="false" :modal="false"> | ||
| 4 | + <div class="NCC-full-dialog-header"> | ||
| 5 | + <div class="header-title"> | ||
| 6 | + <img src="@/assets/images/ncc.png" class="header-logo" /> | ||
| 7 | + <p class="header-txt"> · 在线开发</p> | ||
| 8 | + </div> | ||
| 9 | + <el-steps :active="activeStep" finish-status="success" simple | ||
| 10 | + :class="'steps steps'+(maxStep+1)" v-if="!loading"> | ||
| 11 | + <el-step title="基础设置" @click.native="stepChick(0)" /> | ||
| 12 | + <el-step title="表单设计" @click.native="stepChick(1)" /> | ||
| 13 | + <el-step title="列表设计" @click.native="stepChick(2)" v-if="maxStep>=2" /> | ||
| 14 | + <el-step title="流程设计" @click.native="stepChick(3)" v-if="maxStep>=3" /> | ||
| 15 | + </el-steps> | ||
| 16 | + <div class="options"> | ||
| 17 | + <el-button @click="prve" :disabled="activeStep<=0">{{$t('common.prev')}}</el-button> | ||
| 18 | + <el-button @click="next" :disabled="activeStep>=maxStep || loading">{{$t('common.next')}} | ||
| 19 | + </el-button> | ||
| 20 | + <el-button type="primary" @click="dataFormSubmit()" :disabled="activeStep!=maxStep" | ||
| 21 | + :loading="btnLoading">{{$t('common.confirmButton')}}</el-button> | ||
| 22 | + <el-button @click="closeDialog()">{{$t('common.cancelButton')}}</el-button> | ||
| 23 | + </div> | ||
| 24 | + </div> | ||
| 25 | + <div class="main" v-loading="loading"> | ||
| 26 | + <el-row type="flex" justify="center" align="middle" v-if="!activeStep" class="basic-box"> | ||
| 27 | + <el-col :xs="12" :sm="12" :md="12" :lg="12" :xl="10" class="basicForm"> | ||
| 28 | + <el-form :model="dataForm" :rules="dataRule" ref="dataForm" label-width="80px" | ||
| 29 | + @submit.native.prevent label-position="right"> | ||
| 30 | + <el-form-item label="功能名称" prop="fullName"> | ||
| 31 | + <el-input v-model="dataForm.fullName" placeholder="功能名称" maxlength="100"> | ||
| 32 | + </el-input> | ||
| 33 | + </el-form-item> | ||
| 34 | + <el-form-item label="功能编码" prop="enCode"> | ||
| 35 | + <el-input v-model="dataForm.enCode" placeholder="功能编码" maxlength="50"> | ||
| 36 | + </el-input> | ||
| 37 | + </el-form-item> | ||
| 38 | + <el-form-item label="功能分类" prop="category"> | ||
| 39 | + <el-select v-model="dataForm.category" placeholder="选择分类"> | ||
| 40 | + <el-option :key="item.id" :label="item.fullName" :value="item.id" | ||
| 41 | + v-for="item in categoryList" /> | ||
| 42 | + </el-select> | ||
| 43 | + </el-form-item> | ||
| 44 | + <el-form-item label="功能状态" prop="state"> | ||
| 45 | + <el-switch v-model="dataForm.state" :active-value="1" :inactive-value="0" /> | ||
| 46 | + </el-form-item> | ||
| 47 | + <el-form-item label="功能说明" prop="description"> | ||
| 48 | + <el-input v-model="dataForm.description" placeholder="功能说明" type="textarea" | ||
| 49 | + :rows="3" /> | ||
| 50 | + </el-form-item> | ||
| 51 | + <el-form-item label="数据连接"> | ||
| 52 | + <el-select v-model="dataForm.dbLinkId" placeholder="请选择数据库" @change="onDbChange" | ||
| 53 | + clearable> | ||
| 54 | + <el-option-group v-for="group in dbOptions" :key="group.fullName" | ||
| 55 | + :label="group.fullName"> | ||
| 56 | + <el-option v-for="item in group.children" :key="item.id" :label="item.fullName" | ||
| 57 | + :value="item.id" /> | ||
| 58 | + </el-option-group> | ||
| 59 | + </el-select> | ||
| 60 | + </el-form-item> | ||
| 61 | + <el-table :data="tables" class="NCC-common-table" | ||
| 62 | + empty-text="点击“新增”可选择 1 条(单表)或 2 条以上(多表)"> | ||
| 63 | + <el-table-column type="index" label="序号" width="50" align="center" /> | ||
| 64 | + <el-table-column prop="typeId" label="类别" width="65"> | ||
| 65 | + <template slot-scope="scope"> | ||
| 66 | + <el-tag v-if="scope.row.typeId=='1'">主表</el-tag> | ||
| 67 | + <el-tag type="warning" v-else @click="changeTable(scope.row)" | ||
| 68 | + style="cursor:pointer" title="点击设置成主表">子表</el-tag> | ||
| 69 | + </template> | ||
| 70 | + </el-table-column> | ||
| 71 | + <el-table-column prop="tableName" label="说明" /> | ||
| 72 | + <el-table-column prop="table" label="表名" /> | ||
| 73 | + <el-table-column prop="tableField" label="外键字段"> | ||
| 74 | + <template slot-scope="scope" v-if="scope.row.typeId !=='1'"> | ||
| 75 | + <el-select v-model="scope.row.tableField" placeholder="请选择"> | ||
| 76 | + <el-option v-for="item in scope.row.fields" :key="item.field" | ||
| 77 | + :label="item.field" :value="item.field"> | ||
| 78 | + </el-option> | ||
| 79 | + </el-select> | ||
| 80 | + </template> | ||
| 81 | + </el-table-column> | ||
| 82 | + <!-- <el-table-column prop="relationTable" label="关联主表" /> --> | ||
| 83 | + <el-table-column prop="relationField" label="关联主键"> | ||
| 84 | + <template slot-scope="scope" v-if="scope.row.typeId !=='1'"> | ||
| 85 | + <el-select v-model="scope.row.relationField" placeholder="请选择"> | ||
| 86 | + <el-option v-for="item in mainTableFields" :key="item.field" :label="item.field" | ||
| 87 | + :value="item.field"> | ||
| 88 | + </el-option> | ||
| 89 | + </el-select> | ||
| 90 | + </template> | ||
| 91 | + </el-table-column> | ||
| 92 | + <el-table-column label="操作" fixed="right" width="50"> | ||
| 93 | + <template slot-scope="scope"> | ||
| 94 | + <el-button size="mini" type="text" class="NCC-table-delBtn" | ||
| 95 | + @click="delItem(scope.row,scope.$index)">删除 | ||
| 96 | + </el-button> | ||
| 97 | + </template> | ||
| 98 | + </el-table-column> | ||
| 99 | + </el-table> | ||
| 100 | + <div class="table-actions" @click="openTableBox"> | ||
| 101 | + <el-button type="text" icon="el-icon-plus">新增一行</el-button> | ||
| 102 | + </div> | ||
| 103 | + </el-form> | ||
| 104 | + </el-col> | ||
| 105 | + </el-row> | ||
| 106 | + <template v-if="activeStep==1"> | ||
| 107 | + <Generator ref="generator" :conf="formData" :modelType="dataForm.type" | ||
| 108 | + :webType="dataForm.webType" /> | ||
| 109 | + </template> | ||
| 110 | + <template v-if="activeStep==2"> | ||
| 111 | + <columnDesign ref="columnDesign" :conf="columnData" /> | ||
| 112 | + </template> | ||
| 113 | + <template v-if="activeStep==3"> | ||
| 114 | + <Process ref="process" :conf="flowTemplateJson" :flowType="1" /> | ||
| 115 | + </template> | ||
| 116 | + </div> | ||
| 117 | + <TableForm :visible.sync="formVisible" ref="tableForm" @closeForm="colseForm" | ||
| 118 | + :dbLinkId="dataForm.dbLinkId" /> | ||
| 119 | + </el-dialog> | ||
| 120 | +</template> | ||
| 121 | + | ||
| 122 | +<script> | ||
| 123 | +import Generator from '@/components/Generator/index/Home' | ||
| 124 | +import ColumnDesign from '@/components/ColumnDesign/index' | ||
| 125 | +import Process from "@/components/Process" | ||
| 126 | +import TableForm from '@/views/generator/TableForm' | ||
| 127 | +import mixin from '@/mixins/generator/form' | ||
| 128 | +export default { | ||
| 129 | + mixins: [mixin], | ||
| 130 | + components: { Generator, ColumnDesign, Process, TableForm }, | ||
| 131 | + data() { | ||
| 132 | + return { | ||
| 133 | + dataRule: { | ||
| 134 | + fullName: [ | ||
| 135 | + { required: true, message: '功能名称不能为空', trigger: 'blur' }, | ||
| 136 | + ], | ||
| 137 | + enCode: [ | ||
| 138 | + { required: true, message: '功能编码不能为空', trigger: 'blur' }, | ||
| 139 | + { validator: this.formValidate('enCode'), trigger: 'blur' }, | ||
| 140 | + ], | ||
| 141 | + category: [ | ||
| 142 | + { required: true, message: '功能分类不能为空', trigger: 'change' }, | ||
| 143 | + ] | ||
| 144 | + } | ||
| 145 | + } | ||
| 146 | + } | ||
| 147 | +} | ||
| 148 | +</script> | ||
| 0 | \ No newline at end of file | 149 | \ No newline at end of file |
src/views/baseSpecialAction/webDesign/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.keyword" placeholder="请输入关键词查询" clearable | ||
| 9 | + @keyup.enter.native="search()" /> | ||
| 10 | + </el-form-item> | ||
| 11 | + </el-col> | ||
| 12 | + <el-col :span="6"> | ||
| 13 | + <el-form-item> | ||
| 14 | + <el-button type="primary" icon="el-icon-search" @click="search()"> | ||
| 15 | + {{$t('common.search')}}</el-button> | ||
| 16 | + <el-button icon="el-icon-refresh-right" @click="reset()">{{$t('common.reset')}} | ||
| 17 | + </el-button> | ||
| 18 | + </el-form-item> | ||
| 19 | + </el-col> | ||
| 20 | + </el-form> | ||
| 21 | + </el-row> | ||
| 22 | + <div class="NCC-common-layout-main NCC-flex-main"> | ||
| 23 | + <div class="NCC-common-head"> | ||
| 24 | + <topOpts @add="addVisible=true"> | ||
| 25 | + <upload-btn url="/api/visualdev/OnlineDev/Model/Actions/ImportData" | ||
| 26 | + @on-success="initData" /> | ||
| 27 | + </topOpts> | ||
| 28 | + <div class="NCC-common-head-right"> | ||
| 29 | + <el-tooltip effect="dark" :content="$t('common.refresh')" placement="top"> | ||
| 30 | + <el-link icon="icon-ym icon-ym-Refresh NCC-common-head-icon" :underline="false" | ||
| 31 | + @click="reset()" /> | ||
| 32 | + </el-tooltip> | ||
| 33 | + <screenfull /> | ||
| 34 | + </div> | ||
| 35 | + </div> | ||
| 36 | + <NCC-table v-loading="listLoading" :data="list" row-key="id" | ||
| 37 | + :tree-props="{children: 'children', hasChildren: ''}" default-expand-all> | ||
| 38 | + <el-table-column prop="fullName" label="名称" show-overflow-tooltip min-width="200"> | ||
| 39 | + <template slot-scope="scope"> | ||
| 40 | + <span v-if="scope.row.top" | ||
| 41 | + style="font-weight:bold;">{{scope.row.fullName}}【{{scope.row.num}}】</span> | ||
| 42 | + <span v-else>{{scope.row.fullName}}</span> | ||
| 43 | + </template> | ||
| 44 | + </el-table-column> | ||
| 45 | + <el-table-column prop="enCode" label="编码" width="200" /> | ||
| 46 | + <el-table-column prop="creatorUser" label="创建人" width="120" /> | ||
| 47 | + <el-table-column prop="creatorTime" label="创建时间" :formatter="ncc.tableDateFormat" | ||
| 48 | + width="120" /> | ||
| 49 | + <el-table-column prop="lastModifyUser" label="最后修改人" width="120" /> | ||
| 50 | + <el-table-column prop="lastModifyTime" label="最后修改时间" :formatter="ncc.tableDateFormat" | ||
| 51 | + width="120" /> | ||
| 52 | + <el-table-column label="状态" width="70" align="center"> | ||
| 53 | + <template slot-scope="scope" v-if="!scope.row.top"> | ||
| 54 | + <el-tag :type="scope.row.state == 1 ? 'success' : 'danger'" disable-transitions> | ||
| 55 | + {{scope.row.state==1?'正常':'停用'}}</el-tag> | ||
| 56 | + </template> | ||
| 57 | + </el-table-column> | ||
| 58 | + <el-table-column label="操作" fixed="right" width="150"> | ||
| 59 | + <template slot-scope="scope" v-if="!scope.row.top"> | ||
| 60 | + <tableOpts @edit="addOrUpdateHandle(scope.row.id)" @del="handleDel(scope.row.id)"> | ||
| 61 | + <el-dropdown> | ||
| 62 | + <span class="el-dropdown-link"> | ||
| 63 | + <el-button type="text" size="mini">{{$t('common.moreBtn')}}<i | ||
| 64 | + class="el-icon-arrow-down el-icon--right"></i> | ||
| 65 | + </el-button> | ||
| 66 | + </span> | ||
| 67 | + <el-dropdown-menu slot="dropdown"> | ||
| 68 | + <el-dropdown-item @click.native="copy(scope.row.id)">复制</el-dropdown-item> | ||
| 69 | + <el-dropdown-item @click.native="preview(scope.row.id)">预览</el-dropdown-item> | ||
| 70 | + <el-dropdown-item @click.native="exportModel(scope.row.id)">导出 | ||
| 71 | + </el-dropdown-item> | ||
| 72 | + </el-dropdown-menu> | ||
| 73 | + </el-dropdown> | ||
| 74 | + </tableOpts> | ||
| 75 | + </template> | ||
| 76 | + </el-table-column> | ||
| 77 | + </NCC-table> | ||
| 78 | + </div> | ||
| 79 | + </div> | ||
| 80 | + <Form v-if="formVisible" ref="Form" @close="colseForm" /> | ||
| 81 | + <AddBox :visible.sync="addVisible" @add="handleAdd" /> | ||
| 82 | + </div> | ||
| 83 | +</template> | ||
| 84 | + | ||
| 85 | +<script> | ||
| 86 | +import Form from './Form' | ||
| 87 | +import AddBox from '@/views/generator/AddBox' | ||
| 88 | +import mixin from '@/mixins/generator/index' | ||
| 89 | +export default { | ||
| 90 | + name: 'onlineDev-webDesign', | ||
| 91 | + mixins: [mixin], | ||
| 92 | + components: { Form, AddBox }, | ||
| 93 | + data() { | ||
| 94 | + return { | ||
| 95 | + query: { keyword: '', type: 1 }, | ||
| 96 | + sort: 'webDesign' | ||
| 97 | + } | ||
| 98 | + }, | ||
| 99 | + methods: { | ||
| 100 | + preview(id) { | ||
| 101 | + this.$router.push(`/previewModel?isPreview=1&id=${id}`) | ||
| 102 | + } | ||
| 103 | + } | ||
| 104 | +} | ||
| 105 | +</script> | ||
| 0 | \ No newline at end of file | 106 | \ No newline at end of file |