diff --git a/src/views/activiti/form/ProcessMaterialsAllotForm.vue b/src/views/activiti/form/ProcessMaterialsAllotForm.vue index 74fc8ec..1b07f2d 100644 --- a/src/views/activiti/form/ProcessMaterialsAllotForm.vue +++ b/src/views/activiti/form/ProcessMaterialsAllotForm.vue @@ -718,7 +718,6 @@ }) } }) - this.materialGroupId = undefined }, @@ -730,7 +729,7 @@ this.qeihuan = val; if (!!val && !!this.libraryInvisible ) { this.heid = false - // this.descriptionFetchData(val,this.libraryInvisible) + this.descriptionFetchData(val,this.libraryInvisible) this.fetchMerchandiseNews() } }, diff --git a/src/views/dashboard/HomePage.vue b/src/views/dashboard/HomePage.vue index 9808e17..dae2119 100644 --- a/src/views/dashboard/HomePage.vue +++ b/src/views/dashboard/HomePage.vue @@ -103,6 +103,7 @@ :columns="loginColumns" :dataSource="loginLogs" :pagination="false" + :customRow="regimeClick" > <span slot="post" slot-scope="text, record"> <j-ellipsis :value="text" :length="5"/> @@ -172,6 +173,7 @@ <!-- </template>--> </a-modal> + <process-regime-modal ref="modalForm" @ok="modalFormOk"></process-regime-modal> </div> <!-- <a-card class="bottom-card" title="全部应用" style="width: 100%; height:60%; margin-top: 11px; overflow-y: hidden" :headStyle="{}" :bodyStyle="{height:'100%' , overflow:'hidden'}" >--> @@ -192,6 +194,7 @@ import { JVXETypes } from '@/components/jeecg/JVxeTable/index' import { colorList } from '@/components/tools/setting' import ShowAnnouncement from '@comp/tools/ShowAnnouncement' import KeyApplications from '@views/dashboard/KeyApplications' +import ProcessRegimeModal from '@views/regime/modules/ProcessRegimeModal' // import { mixinDevice } from '@/utils/mixin' // import { JeecgListMixin } from '@/mixins/JeecgListMixin' @@ -201,11 +204,13 @@ export default { components:{ KeyApplications, JVXETypes, - ShowAnnouncement + ShowAnnouncement, + ProcessRegimeModal, }, data() { return { + regime: false, isorter:{ column: 'createTime', order: 'desc', @@ -217,6 +222,7 @@ export default { keyApplications: '/keyApplications/processKeyApplications/list', addKeyApplications: '/keyApplications/processKeyApplications/add', lists: '/sys/log/listHomePage', + listSregime: '/regime/processRegime/list', listMien: "/sys/oss/file/list", listMseeage: '/sys/sysAnnouncementSend/getMyAnnouncementSend', editCementSend:"/sys/sysAnnouncementSend/editByAnntIdAndUserId", @@ -246,15 +252,25 @@ export default { { align:"left", scopedSlots: { customRender: 'post' }, - dataIndex: 'post', + dataIndex: 'title', ellipsis: true, sorter: true }, + // { + // align:"left", + // dataIndex: 'title', + // ellipsis: true, + // sorter: true + // }, { align:"left", - dataIndex: 'userName', + dataIndex: 'contentDetails', ellipsis: true, - sorter: true + sorter: true, + customRender:function (t,r,index) { + t = t.replace("<p>", "user") + return t; + } }, { align:"center", @@ -440,7 +456,8 @@ export default { let param = Object.assign({}); this.pageSizeLog=this.pageSizeLog+1; param.pageNo=this.pageSizeLog; - getAction(this.url.lists,param).then((res) => { + getAction(this.url.listSregime,param).then((res) => { + // console.log(res.result,"==="); if (res.success) { for (let i = 0; i < res.result.records.length; i++) { this.loginLogs.push(res.result.records[i]) @@ -540,6 +557,25 @@ export default { } } }, + handleDetail(record){ + + this.$nextTick(() => { + this.$refs.modalForm.edit(record); + this.$refs.modalForm.title="详情"; + this.$refs.modalForm.disableSubmit = true; + }) + + }, + regimeClick(record) { + return { + on: { + click: () => { + this.handleDetail(record); + }, + } + } + + }, rowClickToDo: function(record, index) { return { on: { @@ -595,13 +631,14 @@ export default { // 登录日志查询 loginList(){ - // let param = Object.assign({} ); - // getAction(this.url.lists,param).then((res) => { - // if (res.success) { - // this.loading = false - // this.loginLogs = res.result.records - // } - // }) + let param = Object.assign({} ); + getAction(this.url.listSregime,param).then((res) => { + // console.log(res.result,"111111=======") + if (res.success) { + this.loading = false + this.loginLogs = res.result.records + } + }) }, diff --git a/src/views/regime/ProcessRegimeList.vue b/src/views/regime/ProcessRegimeList.vue new file mode 100644 index 0000000..ad40b93 --- /dev/null +++ b/src/views/regime/ProcessRegimeList.vue @@ -0,0 +1,227 @@ +<template> + <a-card :bordered="false"> + <!-- 查询区域 --> + <div class="table-page-search-wrapper"> + <a-form layout="inline" @keyup.enter.native="searchQuery"> + <a-row :gutter="24"> + <a-col :xl="6" :lg="7" :md="8" :sm="24"> + <a-form-item label="标题"> + <a-input placeholder="请输入标题" v-model="queryParam.title"></a-input> + </a-form-item> + </a-col> +<!-- <a-col :xl="6" :lg="7" :md="8" :sm="24">--> +<!-- <a-form-item label="内容">--> +<!-- <a-input placeholder="请输入内容" v-model="queryParam.contentDetails"></a-input>--> +<!-- </a-form-item>--> +<!-- </a-col>--> +<!-- <template v-if="toggleSearchStatus">--> +<!-- <a-col :xl="6" :lg="7" :md="8" :sm="24">--> +<!-- <a-form-item label="创建时间">--> +<!-- <j-date placeholder="请选择创建时间" v-model="queryParam.createTime"></j-date>--> +<!-- </a-form-item>--> +<!-- </a-col>--> +<!-- </template>--> + <a-col :xl="6" :lg="7" :md="8" :sm="24"> + <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> + <a-button type="primary" @click="searchQuery" icon="search">查询</a-button> + <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button> + <a-button @click="handleAdd" type="primary" icon="plus" style="margin-left: 8px">新增</a-button> + + <!-- <a @click="handleToggleSearch" style="margin-left: 8px">--> +<!-- {{ toggleSearchStatus ? '收起' : '展开' }}--> +<!-- <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>--> +<!-- </a>--> + </span> + </a-col> + </a-row> + </a-form> + </div> + <!-- 查询区域-END --> + + <!-- 操作按钮区域 --> + <div class="table-operator"> +<!-- <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>--> +<!-- <a-button type="primary" icon="download" @click="handleExportXls('process_regime')">导出</a-button>--> +<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">--> +<!-- <a-button type="primary" icon="import">导入</a-button>--> +<!-- </a-upload>--> + <!-- 高级查询区域 --> +<!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>--> + <a-dropdown v-if="selectedRowKeys.length > 0"> +<!-- <a-menu slot="overlay">--> +<!-- <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>--> +<!-- </a-menu>--> +<!-- <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>--> + <a-button style="margin-left: 8px" @click="batchDel"><a-icon type="delete"/>删除</a-button> + </a-dropdown> + </div> + + <!-- table区域-begin --> + <div> + <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> + <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 + <a style="margin-left: 24px" @click="onClearSelected">清空</a> + </div> + + <a-table + ref="table" + size="middle" + :scroll="{x:true}" + bordered + rowKey="id" + :columns="columns" + :dataSource="dataSource" + :pagination="ipagination" + :loading="loading" + :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" + class="j-table-force-nowrap" + @change="handleTableChange"> + + <template slot="htmlSlot" slot-scope="text"> + <div v-html="text"></div> + </template> + <template slot="imgSlot" slot-scope="text,record"> + <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span> + <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/> + </template> + <template slot="fileSlot" slot-scope="text"> + <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> + <a-button + v-else + :ghost="true" + type="primary" + icon="download" + size="small" + @click="downloadFile(text)"> + 下载 + </a-button> + </template> + + <span slot="action" slot-scope="text, record"> + <a @click="handleEdit(record)">编辑</a> + + <a-divider type="vertical" /> + +<!-- <a class="ant-dropdown-link" @click="handleDelete(record.id)">删除 <a-icon type="down" /> </a>--> + + <a-dropdown> +<!-- <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">--> +<!-- <a>删除</a>--> +<!-- </a-popconfirm>--> + <a class="ant-dropdown-link">更多 <a-icon type="down" /></a> + <a-menu slot="overlay"> + <a-menu-item> + <a @click="handleDetail(record)">详情</a> + </a-menu-item> + <a-menu-item> + <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> + <a>删除</a> + </a-popconfirm> + </a-menu-item> + </a-menu> + </a-dropdown> + </span> + + </a-table> + </div> + + <process-regime-modal ref="modalForm" @ok="modalFormOk"></process-regime-modal> + </a-card> +</template> + +<script> + + import '@/assets/less/TableExpand.less' + import { mixinDevice } from '@/utils/mixin' + import { JeecgListMixin } from '@/mixins/JeecgListMixin' + import ProcessRegimeModal from './modules/ProcessRegimeModal' + + export default { + name: 'ProcessRegimeList', + mixins:[JeecgListMixin, mixinDevice], + components: { + ProcessRegimeModal + }, + data () { + return { + description: 'process_regime管理页面', + // 表头 + columns: [ + { + title: '序号', + dataIndex: '', + key:'rowIndex', + width:60, + align:"center", + customRender:function (t,r,index) { + return parseInt(index)+1; + } + }, + { + title:'标题', + align:"center", + dataIndex: 'title' + }, + { + title:'内容', + align:"center", + dataIndex: 'contentDetails', + scopedSlots: {customRender: 'htmlSlot'} + }, + // { + // title:'状态', + // align:"center", + // dataIndex: 'states' + // }, + // { + // title:'删除标志', + // align:"center", + // dataIndex: 'delFalg' + // }, + { + title: '操作', + dataIndex: 'action', + align:"center", + fixed:"right", + width:147, + scopedSlots: { customRender: 'action' } + } + ], + url: { + list: "/regime/processRegime/list", + delete: "/regime/processRegime/delete", + deleteBatch: "/regime/processRegime/deleteBatch", + exportXlsUrl: "/regime/processRegime/exportXls", + importExcelUrl: "regime/processRegime/importExcel", + + }, + dictOptions:{}, + superFieldList:[], + } + }, + created() { + this.getSuperFieldList(); + }, + computed: { + importExcelUrl: function(){ + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; + }, + }, + methods: { + initDictConfig(){ + }, + getSuperFieldList(){ + let fieldList=[]; + fieldList.push({type:'string',value:'title',text:'标题',dictCode:''}) + fieldList.push({type:'Text',value:'contentDetails',text:'内容',dictCode:''}) + fieldList.push({type:'date',value:'createTime',text:'创建时间'}) + fieldList.push({type:'int',value:'states',text:'状态',dictCode:''}) + fieldList.push({type:'int',value:'delFalg',text:'删除标志',dictCode:''}) + this.superFieldList = fieldList + } + } + } +</script> +<style scoped> + @import '~@assets/less/common.less'; +</style> \ No newline at end of file diff --git a/src/views/regime/modules/ProcessRegimeForm.vue b/src/views/regime/modules/ProcessRegimeForm.vue new file mode 100644 index 0000000..d4fe333 --- /dev/null +++ b/src/views/regime/modules/ProcessRegimeForm.vue @@ -0,0 +1,125 @@ +<template> + <a-spin :spinning="confirmLoading"> + <j-form-container :disabled="formDisabled"> + <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> + <a-row> + <a-col :span="24"> + <a-form-model-item label="标题" prop="title"> + <a-input v-model="model.title" placeholder="请输入标题" ></a-input> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="内容" prop="contentDetails"> + <j-editor v-model="model.contentDetails" /> + </a-form-model-item> + </a-col> +<!-- <a-col :span="8">--> +<!-- <a-form-model-item label="状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="states">--> +<!-- <a-input-number v-model="model.states" placeholder="请输入状态" style="width: 100%" />--> +<!-- </a-form-model-item>--> +<!-- </a-col>--> +<!-- <a-col :span="8">--> +<!-- <a-form-model-item label="删除标志" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="delFalg">--> +<!-- <a-input-number v-model="model.delFalg" placeholder="请输入删除标志" style="width: 100%" />--> +<!-- </a-form-model-item>--> +<!-- </a-col>--> + </a-row> + </a-form-model> + </j-form-container> + </a-spin> +</template> + +<script> + + import { httpAction, getAction } from '@/api/manage' + import { validateDuplicateValue } from '@/utils/util' + + export default { + name: 'ProcessRegimeForm', + components: { + }, + props: { + //表单禁用 + disabled: { + type: Boolean, + default: false, + required: false + } + }, + data () { + return { + model:{ + }, + labelCol: { + xs: { span: 24 }, + sm: { span: 5 }, + }, + wrapperCol: { + xs: { span: 24 }, + sm: { span: 16 }, + }, + confirmLoading: false, + validatorRules: { + title: [ + { required: true, message: '请输入标题!'}, + ], + contentDetails: [ + { required: true, message: '请输入内容!'}, + ], + }, + url: { + add: "/regime/processRegime/add", + edit: "/regime/processRegime/edit", + queryById: "/regime/processRegime/queryById" + } + } + }, + computed: { + formDisabled(){ + return this.disabled + }, + }, + created () { + //备份model原始值 + this.modelDefault = JSON.parse(JSON.stringify(this.model)); + }, + methods: { + add () { + this.edit(this.modelDefault); + }, + edit (record) { + this.model = Object.assign({}, record); + this.visible = true; + }, + submitForm () { + const that = this; + // 触发表单验证 + this.$refs.form.validate(valid => { + if (valid) { + that.confirmLoading = true; + let httpurl = ''; + let method = ''; + if(!this.model.id){ + httpurl+=this.url.add; + method = 'post'; + }else{ + httpurl+=this.url.edit; + method = 'put'; + } + httpAction(httpurl,this.model,method).then((res)=>{ + if(res.success){ + that.$message.success(res.message); + that.$emit('ok'); + }else{ + that.$message.warning(res.message); + } + }).finally(() => { + that.confirmLoading = false; + }) + } + + }) + }, + } + } +</script> \ No newline at end of file diff --git a/src/views/regime/modules/ProcessRegimeModal.Style#Drawer.vue b/src/views/regime/modules/ProcessRegimeModal.Style#Drawer.vue new file mode 100644 index 0000000..0e6e81e --- /dev/null +++ b/src/views/regime/modules/ProcessRegimeModal.Style#Drawer.vue @@ -0,0 +1,84 @@ +<template> + <a-drawer + :title="title" + :width="width" + placement="right" + :closable="false" + @close="close" + destroyOnClose + :visible="visible"> + <process-regime-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></process-regime-form> + <div class="drawer-footer"> + <a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button> + <a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button> + </div> + </a-drawer> +</template> + +<script> + + import ProcessRegimeForm from './ProcessRegimeForm' + + export default { + name: 'ProcessRegimeModal', + components: { + ProcessRegimeForm + }, + data () { + return { + title:"操作", + width:1024, + visible: false, + disableSubmit: false + } + }, + methods: { + add () { + this.visible=true + this.$nextTick(()=>{ + this.$refs.realForm.add(); + }) + }, + edit (record) { + this.visible=true + this.$nextTick(()=>{ + this.$refs.realForm.edit(record); + }); + }, + close () { + this.$emit('close'); + this.visible = false; + }, + submitCallback(){ + this.$emit('ok'); + this.visible = false; + }, + handleOk () { + this.$refs.realForm.submitForm(); + }, + handleCancel () { + this.close() + } + } + } +</script> + +<style lang="less" scoped> +/** Button按钮间距 */ + .ant-btn { + margin-left: 30px; + margin-bottom: 30px; + float: right; + } + .drawer-footer{ + position: absolute; + bottom: -8px; + width: 100%; + border-top: 1px solid #e8e8e8; + padding: 10px 16px; + text-align: right; + left: 0; + background: #fff; + border-radius: 0 0 2px 2px; + } +</style> \ No newline at end of file diff --git a/src/views/regime/modules/ProcessRegimeModal.vue b/src/views/regime/modules/ProcessRegimeModal.vue new file mode 100644 index 0000000..dcf3fcc --- /dev/null +++ b/src/views/regime/modules/ProcessRegimeModal.vue @@ -0,0 +1,61 @@ +<template> + <j-modal + :title="title" + :width="width" + :visible="visible" + switchFullscreen + @ok="handleOk" + :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" + @cancel="handleCancel" + cancelText="关闭"> + <process-regime-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></process-regime-form> + </j-modal> +</template> + +<script> + + import ProcessRegimeForm from './ProcessRegimeForm' + + export default { + name: 'ProcessRegimeModal', + components: { + ProcessRegimeForm + }, + data () { + return { + title:'', + width:1024, + visible: false, + disableSubmit: false + } + }, + methods: { + add () { + this.visible=true + this.$nextTick(()=>{ + this.$refs.realForm.add(); + }) + }, + edit (record) { + this.visible=true + this.$nextTick(()=>{ + this.$refs.realForm.edit(record); + }) + }, + close () { + this.$emit('close'); + this.visible = false; + }, + handleOk () { + this.$refs.realForm.submitForm(); + }, + submitCallback(){ + this.$emit('ok'); + this.visible = false; + }, + handleCancel () { + this.close() + } + } + } +</script> \ No newline at end of file