提交 8121d106 authored 作者: 宋雄's avatar 宋雄

新增页面

上级 572e6bfc
NODE_ENV=development
VUE_APP_API_BASE_URL='http://192.168.0.118:9999/property-company'
VUE_APP_API_BASE_URL='http://192.168.0.118:9999'
# VUE_APP_API_BASE_URL='http://220.203.25.212:9999/property-company'
VUE_APP_CAS_BASE_URL=http://cas.example.org:8443/cas
VUE_APP_ONLINE_BASE_URL=http://fileview.jeecg.com/onlinePreview
......
NODE_ENV=production
VUE_APP_API_BASE_URL=http://220.203.25.212:9999/property-central
VUE_APP_API_BASE_URL=http://220.203.25.212:9999
VUE_APP_CAS_BASE_URL=http://localhost:8888/cas
VUE_APP_ONLINE_BASE_URL=http://fileview.jeecg.com/onlinePreview
\ No newline at end of file
......@@ -11,42 +11,46 @@
"lint": "vue-cli-service lint"
},
"dependencies": {
"@antv/data-set": "^0.11.4",
"@jeecg/antd-online-mini": "3.4.3-beta2",
"@tinymce/tinymce-vue": "2.1.0",
"@toast-ui/editor": "^2.1.2",
"@wangeditor/editor": "^5.1.23",
"@wangeditor/editor-for-vue": "^1.0.2",
"@wangeditor/plugin-mention": "^1.0.0",
"ant-design-vue": "^1.7.2",
"@antv/data-set": "^0.11.4",
"viser-vue": "^2.4.8",
"axios": "^0.18.0",
"china-area-data": "^5.0.1",
"clipboard": "^2.0.4",
"codemirror": "^5.46.0",
"cron-parser": "^2.10.0",
"dayjs": "^1.8.0",
"dom-align": "1.12.0",
"enquire.js": "^2.1.6",
"js-cookie": "^2.2.0",
"lodash.get": "^4.4.2",
"lodash.pick": "^4.4.0",
"md5": "^2.2.1",
"nprogress": "^0.2.0",
"qiankun": "^2.5.1",
"tinymce": "5.4.1",
"viser-vue": "^2.4.8",
"vue": "^2.6.10",
"vue-area-linkage": "^5.1.0",
"vue-cropper": "^0.5.4",
"vue-html2pdf": "^1.8.0",
"vue-i18n": "^8.7.0",
"vue-loader": "^15.7.0",
"vue-ls": "^3.2.0",
"vue-router": "^3.0.1",
"vuex": "^3.1.0",
"vue-print-nb-jeecg": "^1.0.12",
"clipboard": "^2.0.4",
"vue-photo-preview": "^1.1.3",
"vue-print-nb-jeecg": "^1.0.12",
"vue-router": "^3.0.1",
"vue-splitpane": "^1.0.4",
"vuedraggable": "^2.20.0",
"codemirror": "^5.46.0",
"@tinymce/tinymce-vue": "2.1.0",
"tinymce": "5.4.1",
"@toast-ui/editor": "^2.1.2",
"vue-area-linkage": "^5.1.0",
"china-area-data": "^5.0.1",
"dom-align": "1.12.0",
"xe-utils": "2.4.8",
"vuex": "^3.1.0",
"vxe-table": "2.9.13",
"vxe-table-plugin-antd": "1.8.10",
"cron-parser": "^2.10.0",
"qiankun": "^2.5.1",
"xe-utils": "2.4.8",
"xss": "^1.0.13"
},
"devDependencies": {
......@@ -56,13 +60,13 @@
"@vue/cli-service": "^3.3.0",
"@vue/eslint-config-standard": "^4.0.0",
"babel-eslint": "7.2.3",
"compression-webpack-plugin": "^3.1.0",
"eslint": "^5.16.0",
"eslint-plugin-vue": "^5.1.0",
"html-webpack-plugin": "^4.2.0",
"less": "^3.9.0",
"less-loader": "^4.1.0",
"vue-template-compiler": "^2.6.10",
"html-webpack-plugin": "^4.2.0",
"compression-webpack-plugin": "^3.1.0"
"vue-template-compiler": "^2.6.10"
},
"eslintConfig": {
"root": true,
......@@ -100,7 +104,10 @@
"vue/html-closing-bracket-newline": 0,
"vue/no-parsing-error": 0,
"no-tabs": 0,
"indent": ["off", 2],
"indent": [
"off",
2
],
"no-console": 0,
"space-before-function-paren": 0
}
......
......@@ -5,7 +5,7 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>JeecgBoot 企业级低代码平台</title>
<title>湖北汉江之星科技有限公司</title>
<link rel="icon" href="<%= BASE_URL %>logo.png">
<script src="<%= BASE_URL %>cdn/babel-polyfill/polyfill_7_2_5.js"></script>
<style>
......
......@@ -31,7 +31,7 @@ const queryTreeListForRole = (params)=>getAction("/sys/role/queryTreeList",param
const queryListAsync = (params)=>getAction("/sys/permission/queryListAsync",params);
const queryRolePermission = (params)=>getAction("/sys/permission/queryRolePermission",params);
const saveRolePermission = (params)=>postAction("/sys/permission/saveRolePermission",params);
const queryPermissionsByUser = ()=>getAction("/property/permission/getUserPermissionByToken");
const queryPermissionsByUser = ()=>getAction("/sys/permission/getUserPermissionByToken");
const loadAllRoleIds = (params)=>getAction("/sys/permission/loadAllRoleIds",params);
const getPermissionRuleList = (params)=>getAction("/sys/permission/getPermRuleListByPermId",params);
const queryPermissionRule = (params)=>getAction("/sys/permission/queryPermissionRule",params);
......@@ -56,16 +56,9 @@ const queryMyDepartTreeList = (params)=>getAction("/sys/sysDepart/queryMyDeptTre
const deleteLog = (params)=>deleteAction("/sys/log/delete",params);
const deleteLogList = (params)=>deleteAction("/sys/log/deleteBatch",params);
//入驻管理
const getPropertyListApi = (params)=>getAction("/property/propertySettled/list",params);
const getPropertyDetailApi = (params)=>getAction("/property/propertySettled/queryById",params);
const AddUpdatePropertyApi = (params)=>postAction("/property/propertySettled/add",params);
//费用管理
const getCostListApi = (params)=>getAction("/property/propertyChargrule/list",params);
const getCostDetailApi = (params)=>getAction("/property/propertyChargrule/queryById",params);
const AddUpdateCostApi = (params)=>postAction("/property/propertyChargrule/add",params);
const AuditUpdateCostApi = (params)=>postAction("/property/propertyChargrule/audit",params);
//收费类型列表
const getChargeListApi = (params)=>getAction("/property-company/system/chargeType/chargeTypelist",params);
const addReceiptTemplate = (params)=>postAction("/property-company/system/receiptTemplate/add",params);
//数据字典
const addDict = (params)=>postAction("/sys/dict/add",params);
......@@ -166,14 +159,8 @@ export {
queryMyDepartTreeList,
getUserNoticeInfo,
getDictItemsFromCache,
getPropertyListApi,
getPropertyDetailApi,
AddUpdatePropertyApi,
getCostListApi,
getCostDetailApi,
AddUpdateCostApi,
AuditUpdateCostApi
getChargeListApi,
addReceiptTemplate
}
......
......@@ -2,7 +2,7 @@
<div class="components-input-demo-presuffix" v-if="avalid">
<!---->
<a-input @click="openModal" :placeholder="placeholder" v-model="showText" readOnly :disabled="disabled">
<a-icon slot="prefix" type="cluster" :title="title"/>
<a-icon slot="prefix" :type="icon" :title="title"/>
<a-icon v-if="showText" slot="suffix" type="close-circle" @click="handleEmpty" title="清空"/>
</a-input>
......@@ -93,6 +93,11 @@
required: false,
default: ','
},
icon: {
type: String,
default: 'cluster',
required: false
},
/** 分组ID,用于将多个popup的请求合并到一起,不传不分组 */
groupId: String
......
......@@ -18,7 +18,7 @@
@click="toggle"/>
<span v-if="device === 'desktop'">欢迎进入 湖北汉江之星科技有限公司 企业平台</span>
<span v-else>Jeecg-Boot</span>
<!-- <span v-else>Jeecg-Boot</span> -->
<user-menu :theme="theme"/>
</div>
......
......@@ -26,11 +26,11 @@
<!-- update-end author:sunjianlei date:20200219 for: 菜单搜索改为动态组件,在手机端呈现出弹出框 -->
<!-- update-end author:sunjianlei date:20191220 for: 解决全局样式冲突的问题 -->
<!-- update_end author:zhaoxin date:20191129 for: 做头部菜单栏导航 -->
<span class="action">
<!-- <span class="action">
<a class="logout_title" target="_blank" href="http://doc.jeecg.com">
<a-icon type="question-circle-o"></a-icon>
</a>
</span>
</span> -->
<!-- <header-notice class="action"/> -->
<a-dropdown>
<span class="action action-full ant-dropdown-link user-dropdown-menu">
......
......@@ -26,7 +26,8 @@ import 'vue-photo-preview/dist/skin.css'
import SSO from '@/cas/sso.js'
import {
ACCESS_TOKEN,
PROPERTY_CODE,
PLATFORM_CODE,
PLATFORM_TYPE,
DEFAULT_COLOR,
DEFAULT_THEME,
DEFAULT_LAYOUT_MODE,
......@@ -82,7 +83,8 @@ function main() {
store.commit('TOGGLE_WEAK', Vue.ls.get(DEFAULT_COLOR_WEAK, config.colorWeak))
store.commit('TOGGLE_COLOR', Vue.ls.get(DEFAULT_COLOR, config.primaryColor))
store.commit('SET_TOKEN', Vue.ls.get(ACCESS_TOKEN))
store.commit('SET_CODE', Vue.ls.get(PROPERTY_CODE))
store.commit('SET_TYPE', Vue.ls.get(PLATFORM_CODE))
store.commit('SET_CODE', Vue.ls.get(PLATFORM_TYPE))
store.commit('SET_MULTI_PAGE',Vue.ls.get(DEFAULT_MULTI_PAGE,config.multipage))
},
render: h => h(App)
......
import Vue from 'vue'
import { login, logout, phoneLogin, thirdLogin } from "@/api/login"
import { ACCESS_TOKEN,PROPERTY_CODE, USER_NAME,USER_INFO,USER_AUTH,SYS_BUTTON_AUTH,UI_CACHE_DB_DICT_DATA,TENANT_ID,CACHE_INCLUDED_ROUTES } from "@/store/mutation-types"
import { ACCESS_TOKEN,PLATFORM_CODE,PLATFORM_TYPE, USER_NAME,USER_INFO,USER_AUTH,SYS_BUTTON_AUTH,UI_CACHE_DB_DICT_DATA,TENANT_ID,CACHE_INCLUDED_ROUTES } from "@/store/mutation-types"
import { welcome } from "@/utils/util"
import { queryPermissionsByUser } from '@/api/api'
import { getAction } from '@/api/manage'
......@@ -8,7 +8,8 @@ import { getAction } from '@/api/manage'
const user = {
state: {
token: '',
propertyCode: '',
platformCode: '',
platformType: '',
username: '',
realname: '',
tenantid:'',
......@@ -24,8 +25,11 @@ const user = {
SET_TOKEN: (state, token) => {
state.token = token
},
SET_CODE: (state, code) => {
state.propertyCode = code
SET_CODE: (state, platformCode) => {
state.platformCode = platformCode
},
SET_TYPE: (state, platformType) => {
state.platformType = platformType
},
SET_NAME: (state, { username, realname, welcome }) => {
state.username = username
......@@ -63,7 +67,6 @@ const user = {
const result = response.result
const userInfo = result.userInfo
Vue.ls.set(ACCESS_TOKEN, result.token, 7 * 24 * 60 * 60 * 1000)
Vue.ls.set(PROPERTY_CODE, result.userInfo.propertyCode, 7 * 24 * 60 * 60 * 1000)
Vue.ls.set(USER_NAME, userInfo.username, 7 * 24 * 60 * 60 * 1000)
Vue.ls.set(USER_INFO, userInfo, 7 * 24 * 60 * 60 * 1000)
commit('SET_TOKEN', result.token)
......@@ -87,10 +90,11 @@ const user = {
const result = response.result
const userInfo = result.userInfo
Vue.ls.set(ACCESS_TOKEN, result.token, 7 * 24 * 60 * 60 * 1000)
Vue.ls.set(PROPERTY_CODE, result.userInfo.propertyCode, 7 * 24 * 60 * 60 * 1000)
Vue.ls.set(USER_NAME, userInfo.username, 7 * 24 * 60 * 60 * 1000)
Vue.ls.set(USER_INFO, userInfo, 7 * 24 * 60 * 60 * 1000)
Vue.ls.set(UI_CACHE_DB_DICT_DATA, result.sysAllDictItems, 7 * 24 * 60 * 60 * 1000)
Vue.ls.set(PLATFORM_CODE, result.userInfo.platformCode, 7 * 24 * 60 * 60 * 1000)
Vue.ls.set(PLATFORM_TYPE, result.userInfo.platformType, 7 * 24 * 60 * 60 * 1000)
commit('SET_TOKEN', result.token)
commit('SET_INFO', userInfo)
commit('SET_NAME', { username: userInfo.username,realname: userInfo.realname, welcome: welcome() })
......@@ -112,7 +116,6 @@ const user = {
const result = response.result
const userInfo = result.userInfo
Vue.ls.set(ACCESS_TOKEN, result.token, 7 * 24 * 60 * 60 * 1000)
Vue.ls.set(PROPERTY_CODE, result.userInfo.propertyCode, 7 * 24 * 60 * 60 * 1000)
Vue.ls.set(USER_NAME, userInfo.username, 7 * 24 * 60 * 60 * 1000)
Vue.ls.set(USER_INFO, userInfo, 7 * 24 * 60 * 60 * 1000)
Vue.ls.set(UI_CACHE_DB_DICT_DATA, result.sysAllDictItems, 7 * 24 * 60 * 60 * 1000)
......@@ -186,7 +189,8 @@ const user = {
commit('SET_TOKEN', '')
commit('SET_PERMISSIONLIST', [])
Vue.ls.remove(ACCESS_TOKEN)
Vue.ls.remove(PROPERTY_CODE)
Vue.ls.remove(PLATFORM_CODE)
Vue.ls.remove(PLATFORM_TYPE)
Vue.ls.remove(USER_INFO)
Vue.ls.remove(USER_NAME)
Vue.ls.remove(UI_CACHE_DB_DICT_DATA)
......
export const ACCESS_TOKEN = 'Access-Token'
export const PROPERTY_CODE = 'propertyCode'
export const PLATFORM_CODE = 'platformCode'
export const PLATFORM_TYPE = 'platformType'
export const SIDEBAR_TYPE = 'SIDEBAR_TYPE'
export const DEFAULT_THEME = 'DEFAULT_THEME'
export const DEFAULT_LAYOUT_MODE = 'DEFAULT_LAYOUT_MODE'
......
......@@ -3,7 +3,7 @@ import axios from 'axios'
import store from '@/store'
import { VueAxios } from './axios'
import router from '@/router/index'
import { ACCESS_TOKEN, PROPERTY_CODE, TENANT_ID } from "@/store/mutation-types"
import { ACCESS_TOKEN, PLATFORM_CODE, PLATFORM_TYPE, TENANT_ID } from "@/store/mutation-types"
/**
* 【指定 axios的 baseURL】
......@@ -105,10 +105,16 @@ const err = (error) => {
// request interceptor
service.interceptors.request.use(config => {
const token = Vue.ls.get(ACCESS_TOKEN)
const propertyCode = Vue.ls.get(PROPERTY_CODE)
const platformCode = Vue.ls.get(PLATFORM_CODE)
const platformType = Vue.ls.get(PLATFORM_TYPE)
if (token) {
config.headers[ 'X-Access-Token' ] = token // 让每个请求携带自定义 token 请根据实际情况自行修改
config.headers[ 'propertyCode' ] = propertyCode // 让每个请求携带自定义 propertyCode
}
if (platformCode) {
config.headers[ 'platform_code' ] = platformCode // 让每个请求携带platformCode
}
if (platformType) {
config.headers[ 'platform_type' ] = platformType // 让每个请求携带platformType
}
// update-begin--author:sunjianlei---date:20200723---for 如果当前在low-app环境,并且携带了appId,就向Header里传递appId
......
......@@ -170,10 +170,10 @@
}
],
url: {
list: "/property/propertyAdv/list",
delete: "/property/propertyAdv/delete",
deleteBatch: "/property/propertyAdv/deleteBatch",
exportXlsUrl: "/property/propertyAdv/exportXls"
list: "/property-company/notice/companyNotice/list",
delete: "/property-company/property/propertyAdv/delete",
deleteBatch: "/property-company/property/propertyAdv/deleteBatch",
exportXlsUrl: "/property-company/property/propertyAdv/exportXls"
},
dictOptions:{}
}
......
......@@ -103,9 +103,9 @@
releaseTime: [{ required: true, message: '请选择发布日期', trigger: 'change' }]
},
url: {
add: "/property/propertyAdv/add",
edit: "/property/propertyAdv/edit",
queryById: "/property/propertyAdv/queryById"
add: "/property-company/property/propertyAdv/add",
edit: "/property-company/property/propertyAdv/edit",
queryById: "/property-company/property/propertyAdv/queryById"
}
}
},
......
......@@ -5,22 +5,17 @@
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :md="6" :sm="8">
<a-form-item label="表名">
<a-input placeholder="请输入表名" v-model="queryParam.dataTable"></a-input>
</a-form-item>
</a-col>
<a-col :md="6" :sm="8">
<a-form-item label="数据ID">
<a-input placeholder="请输入ID" v-model="queryParam.dataId"></a-input>
<a-form-item label="姓名">
<a-input placeholder="请输入姓名" v-model="queryParam.assetName"></a-input>
</a-form-item>
</a-col>
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-col :md="6" :sm="24">
<a-button type="primary" @click="searchQuery">查询</a-button>
<a-button style="margin-left: 8px" @click="searchReset">重置</a-button>
</a-col>
</span>
<a-col :md="6" :sm="24">
<a-button type="primary" @click="searchQuery">查询</a-button>
<a-button style="margin-left: 8px" @click="searchReset">重置</a-button>
</a-col>
</span>
</a-row>
</a-form>
</div>
......@@ -28,33 +23,40 @@
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button
@click="batchDel"
v-if="selectedRowKeys.length > 0"
ghost
type="primary"
icon="delete">批量删除
</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('t_property_settled')">导出</a-button>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
</a-dropdown>
</div>
<!-- table区域-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i>已选择&nbsp;<a style="font-weight: 600">{{
selectedRowKeys.length }}</a>&nbsp;&nbsp;
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
<a style="margin-left: 24px" v-if="selectedRowKeys.length > 0" @click="onClearSelected">清空</a>
</div>
<a-table
:columns="columns"
ref="table"
size="middle"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:loading="loading"
:pagination="pagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange"
>
<span slot="employeeStatus" slot-scope="text, record">
<span :style="{'color': record.employeeStatus === '1' ? 'green' : 'red'}">{{record.employeeStatus === '1' ? '在职' : '离职'}}</span>
</span>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
......@@ -67,12 +69,6 @@
<a-menu-item>
<a href="javascript:;" @click="handleDetail(record)">详情</a>
</a-menu-item>
<a-menu-item>
<a href="javascript:;" @click="handleAddSub(record)">添加下级</a>
</a-menu-item>
<a-menu-item>
<a href="javascript:;" @click="handleDataRule(record)">数据规则</a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)" placement="topLeft">
......@@ -82,77 +78,77 @@
</a-menu>
</a-dropdown>
</span>
<!-- 字符串超长截取省略号显示 -->
<span slot="url" slot-scope="text">
<j-ellipsis :value="text" :length="25"/>
</span>
<!-- 字符串超长截取省略号显示-->
<span slot="component" slot-scope="text">
<j-ellipsis :value="text"/>
</span>
</a-table>
</div>
<!-- table区域-end -->
<!-- <permission-modal ref="modalForm" @ok="modalFormOk"></permission-modal> -->
<!-- <permission-data-rule-list ref="PermissionDataRuleList" @ok="modalFormOk"></permission-data-rule-list> -->
<notice-modal ref="modalForm" @ok="modalFormOk"></notice-modal>
</a-card>
</template>
<script>
// import PermissionModal from './modules/PermissionModal'
import { getPropertyListApi, getSystemSubmenu, getSystemSubmenuBatch } from '@/api/api'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
// import PermissionDataRuleList from './PermissionDataRuleList'
import JEllipsis from '@/components/jeecg/JEllipsis'
import NoticeModal from './modules/NoticeModal'
import {filterDictTextByCache} from '@/components/dict/JDictSelectUtil'
const columns = [
{
title: '菜单名称',
dataIndex: 'name',
key: 'name'
}, {
title: '菜单类型',
dataIndex: 'menuType',
key: 'menuType',
title: '设备名称',
dataIndex: 'assetName',
key: 'assetName',
align: 'center'
},
{
title: '设备编码',
dataIndex: 'assetCode',
key: 'assetCode',
align: 'center'
},
{
title: '设备品牌',
dataIndex: 'assetBrand',
key: 'assetBrand',
align: 'center'
},
{
title: '设备型号',
dataIndex: 'assetModel',
key: 'assetModel',
align: 'center'
},
{
title: '设备状态',
dataIndex: 'assetStatus',
key: 'assetStatus',
align: 'center',
customRender: function(text) {
if (text == 0) {
return '菜单'
} else if (text == 1) {
return '菜单'
} else if (text == 2) {
return '按钮/权限'
} else {
return text
}
return filterDictTextByCache('device_status', text);
}
},/*{
title: '权限编码',
dataIndex: 'perms',
key: 'permissionCode',
},*/{
title: 'icon',
dataIndex: 'icon',
key: 'icon'
},
{
title: '组件',
dataIndex: 'component',
key: 'component',
scopedSlots: { customRender: 'component' }
title: '首次使用时间',
dataIndex: 'firstUseDate',
key: 'firstUseDate',
align: 'center'
},
{
title: '使用年限',
dataIndex: 'useLife',
key: 'useLife',
align: 'center'
},
{
title: '路径',
dataIndex: 'url',
key: 'url',
scopedSlots: { customRender: 'url' }
title: '所在位置',
dataIndex: 'assetPosition',
key: 'assetPosition',
align: 'center'
},
{
title: '排序',
dataIndex: 'sortNo',
key: 'sortNo'
title: '所属小区',
dataIndex: 'communityCode',
key: 'communityCode',
align: 'center'
},
{
title: '操作',
......@@ -166,51 +162,25 @@
export default {
name: 'PermissionListAsync',
mixins: [JeecgListMixin],
components: {
// PermissionDataRuleList,
// PermissionModal,
JEllipsis
},
components: {NoticeModal},
data() {
return {
description: '这是菜单管理页面',
// 表头
columns: columns,
loading: false,
pagination: {},
pagination: {
total: 0,
current: 1,
pageSize: 10,
showSizeChanger: true
},
url: {
list: '/property/propertySettled/list',
delete: '/sys/permission/delete',
deleteBatch: '/sys/permission/deleteBatch'
list: "/property-company/asset/propertyAsset/list",
delete: '/property-company/asset/propertyAsset/list',
deleteBatch: '/property-company/asset/propertyAsset/list'
}
}
},
methods: {
loadData() {
this.loading = true
getPropertyListApi({
pageNo: 1,
pageSize: 10
}).then((res) => {
if (res.success) {
const pagination = { ...this.pagination };
pagination.total = res.result.total
this.dataSource = res.result.records
}
}).finally(()=>{
this.loading = false
})
},
// 打开数据规则编辑
handleDataRule(record) {
this.$refs.PermissionDataRuleList.edit(record)
},
handleAddSub(record) {
this.$refs.modalForm.title = "添加子菜单";
this.$refs.modalForm.disableSubmit = false;
this.$refs.modalForm.edit({status:'1',permsType:'1',route:true,'parentId':record.id,menuType:1});
}
}
methods: {}
}
</script>
<style scoped>
......
<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="12">
<a-form-model-item label="设备名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="assetName">
<a-input v-model="model.assetName" placeholder="请输入设备名称"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="设备编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="assetCode">
<a-input v-model="model.assetCode" placeholder="请输入设备编码"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="设备品牌" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="assetBrand">
<a-input v-model="model.assetBrand" placeholder="请输入设备品牌"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="设备型号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="assetModel">
<a-input v-model="model.assetModel" placeholder="请输入设备型号"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="设备状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="assetStatus">
<a-select style="width: 100%" v-model="model.assetStatus" placeholder="请选择设备状态">
<a-select-option v-for="item in dictOptions" :key="item.value" :value="item.value">{{item.label}}</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="首次使用时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="firstUseDate">
<j-date placeholder="请选择首次使用时间" v-model="model.firstUseDate" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="使用年限" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="useLife">
<a-input type="number" v-model="model.useLife" placeholder="请输入使用年限" addon-after="年" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="采购价格" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="purchasePrice">
<a-input v-model="model.purchasePrice" placeholder="请输入采购价格" addon-after="元" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="所在位置" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="assetPosition">
<a-input v-model="model.assetPosition" placeholder="请输入所在位置"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="所属小区" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="communityCode">
<a-input v-model="model.communityCode" placeholder="请输入所属小区"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="负责人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="headName">
<a-input v-model="model.headName" placeholder="请输入负责人"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="联系方式" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="headPhone">
<a-input v-model="model.headPhone" placeholder="请输入联系方式"></a-input>
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
import {ajaxGetDictItems,getDictItemsFromCache} from '@/api/api'
export default {
name: 'PropertyChargruleForm',
components: {
},
props: {
//表单禁用
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
model:{
assetName: '',
assetCode: '',
assetBrand: '',
assetModel: '',
assetStatus: '1',
firstUseDate: '',
useLife: '',
purchasePrice: '',
assetPosition: '',
communityCode: '1242342342',
headName: '',
headPhone: ''
},
labelCol: {
xs: { span: 24 },
sm: { span: 6 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
assetName: [{ required: true, message: '请输入设备名称', trigger: 'blur' }],
assetCode: [{ required: true, message: '请输入设备编码', trigger: 'change' }],
assetPosition: [{ required: true, message: '请输入所在位置', trigger: 'blur' }],
communityCode: [{ required: true, message: '请输入所属小区', trigger: 'blur' }]
},
url: {
add: "/property-company/asset/propertyAsset/add",
edit: "/property-company/asset/propertyAsset/edit",
queryById: "/property-company/asset/propertyAsset/queryById"
},
dictOptions: []
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//备份model原始值
this.modelDefault = JSON.parse(JSON.stringify(this.model));
this.initDictData()
},
methods: {
initDictData() {
//优先从缓存中读取字典配置
if(getDictItemsFromCache('device_status')){
this.dictOptions = getDictItemsFromCache('device_status');
return
}
// //根据字典Code, 初始化字典数组
ajaxGetDictItems('device_status', null).then((res) => {
if (res.success) {
this.dictOptions = res.result;
}
})
},
ruleNumberInput(event) {
let rateValue = event.target.value.replace(/[^\d]/g,"");//清除"数字"和"."和"-"以外的字符
this.model['empowerDays'] = rateValue
},
add () {
this.edit(this.modelDefault);
},
edit (record) {
console.log(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
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<property-settled-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></property-settled-form>
</j-modal>
</template>
<script>
import PropertySettledForm from './NoticeForm'
export default {
name: 'PropertySettledModal',
components: {
PropertySettledForm
},
data () {
return {
title:'',
width: '70%',
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
差异被折叠。
差异被折叠。
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<property-settled-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></property-settled-form>
</j-modal>
</template>
<script>
import PropertySettledForm from './NoticeForm'
export default {
name: 'PropertySettledModal',
components: {
PropertySettledForm
},
data () {
return {
title:'',
width: '70%',
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
<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="12">
<a-form-model-item label="员工姓名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="employeeName">
<a-input v-model="model.employeeName" placeholder="请输入员工姓名"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="联系电话" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="employeePhone">
<a-input v-model="model.employeePhone" placeholder="请输入联系电话"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="员工职务" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="employeeDuties">
<a-select style="width: 100%" v-model="model.employeeDuties" placeholder="请选择员工职务">
<a-select-option v-for="item in dictOptions" :key="item.value" :value="item.value">{{item.label}}</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="所属小区" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="communityCode">
<j-popup v-model="model.communityCode" placeholder="请选择所属小区" icon="home" code="demo" field="name" orgFields="name" destFields="name" :multi="false"/>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="employeeStatus">
<a-select style="width: 100%" v-model="model.employeeStatus" placeholder="请选择状态">
<a-select-option value="1">在职</a-select-option>
<a-select-option value="0">离职</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="24">
<a-form-model-item label="员工头像" :labelCol="{ xs:{ span: 24 }, sm:{ span: 3 } }" :wrapperCol="wrapperCol" prop="employeeAvatar">
<j-image-upload :isMultiple="false" text="点击上传" bizPath="scott/pic" v-model="model.employeeAvatar"></j-image-upload>
<p style="line-height:1;margin:0">建议尺寸640*320,小于10M的JPG、PNG格式图片</p>
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
import {ajaxGetDictItems,getDictItemsFromCache} from '@/api/api'
export default {
name: 'PropertyChargruleForm',
components: {
},
props: {
//表单禁用
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
dictOptions: [],
model:{
employeeName: '',
employeePhone: '',
employeeDuties: '',
communityCode: '',
communityId: '',
employeeStatus: '1',
employeeAvatar: ''
},
labelCol: {
xs: { span: 24 },
sm: { span: 6 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
employeeName: [{ required: true, message: '请输入员工姓名', trigger: 'blur' }],
employeePhone: [{ required: true, message: '请输入联系电话', trigger: 'blur' }],
employeeDuties: [{ required: true, message: '请选择员工职务', trigger: 'change' }]
},
url: {
add: "/property-company/employee/companyEmployee/add",
edit: "/property-company/property/propertyChargrule/edit",
queryById: "/property-company/property/propertyChargrule/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//备份model原始值
this.modelDefault = JSON.parse(JSON.stringify(this.model));
this.initDictData()
},
methods: {
initDictData() {
//优先从缓存中读取字典配置
if(getDictItemsFromCache('duties')){
this.dictOptions = getDictItemsFromCache('duties');
return
}
// //根据字典Code, 初始化字典数组
ajaxGetDictItems('duties', null).then((res) => {
if (res.success) {
this.dictOptions = res.result;
}
})
},
ruleNumberInput(event) {
let rateValue = event.target.value.replace(/[^\d]/g,"");//清除"数字"和"."和"-"以外的字符
this.model['empowerDays'] = rateValue
},
add () {
this.edit(this.modelDefault);
},
edit (record) {
console.log(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
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<property-settled-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></property-settled-form>
</j-modal>
</template>
<script>
import PropertySettledForm from './NoticeForm'
export default {
name: 'PropertySettledModal',
components: {
PropertySettledForm
},
data () {
return {
title:'',
width: '70%',
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
<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 :md="6" :sm="8">
<a-form-item label="姓名">
<a-input placeholder="请输入姓名" v-model="queryParam.employeeName"></a-input>
</a-form-item>
</a-col>
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-col :md="6" :sm="24">
<a-button type="primary" @click="searchQuery">查询</a-button>
<a-button style="margin-left: 8px" @click="searchReset">重置</a-button>
</a-col>
</span>
</a-row>
</a-form>
</div>
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('t_property_settled')">导出</a-button>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
</a-dropdown>
</div>
<!-- table区域-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i>已选择&nbsp;<a style="font-weight: 600">{{
selectedRowKeys.length }}</a>&nbsp;&nbsp;
<a style="margin-left: 24px" v-if="selectedRowKeys.length > 0" @click="onClearSelected">清空</a>
</div>
<a-table
ref="table"
size="middle"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="pagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange"
>
<span slot="employeeStatus" slot-scope="text, record">
<span :style="{'color': record.employeeStatus === '1' ? 'green' : 'red'}">{{record.employeeStatus === '1' ? '在职' : '离职'}}</span>
</span>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical"/>
<a-dropdown>
<a class="ant-dropdown-link">
更多 <a-icon type="down"/>
</a>
<a-menu slot="overlay">
<a-menu-item>
<a href="javascript:;" @click="handleDetail(record)">详情</a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)" placement="topLeft">
<a>删除</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</a-table>
</div>
<!-- table区域-end -->
<notice-modal ref="modalForm" @ok="modalFormOk"></notice-modal>
</a-card>
</template>
<script>
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import NoticeModal from './modules/NoticeModal'
import {filterDictTextByCache} from '@/components/dict/JDictSelectUtil'
const columns = [
{
title: '姓名',
dataIndex: 'employeeName',
key: 'employeeName',
align: 'center'
},
{
title: '联系方式',
dataIndex: 'employeePhone',
key: 'employeePhone',
align: 'center'
},
{
title: '职务',
dataIndex: 'employeeDuties',
key: 'employeeDuties',
align: 'center',
customRender: function(text) {
return filterDictTextByCache('duties', text);
}
},
{
title: '所属小区',
dataIndex: 'communityCode',
key: 'communityCode',
align: 'center'
},
{
title: '在职状态',
dataIndex: 'employeeStatus',
scopedSlots: { customRender: 'employeeStatus' },
align: 'center'
},
{
title: '创建时间',
dataIndex: 'createTime',
key: 'createTime',
align: 'center'
},
{
title: '操作',
dataIndex: 'action',
scopedSlots: { customRender: 'action' },
align: 'center',
width: 150
}
]
export default {
name: 'PermissionListAsync',
mixins: [JeecgListMixin],
components: {NoticeModal},
data() {
return {
// 表头
columns: columns,
pagination: {
total: 0,
current: 1,
pageSize: 10,
showSizeChanger: true
},
url: {
list: "/property-company/employee/companyEmployee/list",
delete: '/property-company/employee/companyEmployee/delete',
deleteBatch: '/property-company/employee/companyEmployee/deleteBatch'
}
}
},
methods: {}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>
\ No newline at end of file
<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="12">
<a-form-model-item label="收费类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="chargeTypeId">
<a-select style="width: 100%" v-model="model.chargeTypeId" placeholder="请选择收费类型">
<a-select-option v-for="item in chargeList" :key="item.id" :value="item.id">{{item.typeName}}</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="收费项目" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="chargeItem">
<a-input v-model="model.chargeItem" placeholder="请输入收费项目"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="付费周期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="chargeCycle">
<a-select style="width: 100%" v-model="model.chargeCycle" placeholder="请选择付费周期">
<a-select-option v-for="item in dictOptions" :key="item.value" :value="item.value">{{item.label}}</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="12">
<a-form-model-item label="计算公式" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="designFormulas">
<a-select style="width: 100%" v-model="model.designFormulas" placeholder="请选择计算公式">
<a-select-option value="1">固定金额</a-select-option>
<a-select-option value="2">建筑面积 × 单价</a-select-option>
<a-select-option value="3">(本期度数 - 上期度数) × 单价</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item :label="model.designFormulas === '1' ? '固定金额' : '单价'" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="amount">
<a-input type="number" v-model="model.amount" :placeholder="`请输入${model.designFormulas === '1' ? '固定金额' : '单价'}`"></a-input>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="24">
<a-form-model-item label="备注" :labelCol="{ xs:{ span: 24 }, sm:{ span: 3 } }" :wrapperCol="wrapperCol" prop="remark">
<a-textarea
v-model="model.remark"
placeholder="请输入"
:auto-size="{ minRows: 3, maxRows: 5 }"
/>
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
import {ajaxGetDictItems,getDictItemsFromCache, getChargeListApi} from '@/api/api'
export default {
name: 'PropertyChargruleForm',
components: {
},
props: {
//表单禁用
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
chargeList: [],
dictOptions: [],
model:{
chargeTypeId: '',
chargeItem: '',
chargeCycle: '1',
designFormulas: '1',
amount: '',
remark: ''
},
labelCol: {
xs: { span: 24 },
sm: { span: 6 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
chargeTypeId: [{ required: true, message: '请选择收费类型', trigger: 'change' }],
chargeItem: [{ required: true, message: '请输入收费项目', trigger: 'blur' }],
amount: [{ required: true, message: '请输入金额', trigger: 'blur' }]
},
url: {
add: "/property-company/system/companyChargerule/add",
edit: "/property-company/system/companyChargerule/edit",
queryById: "/property-company/system/companyChargerule/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
}
},
created () {
//备份model原始值
this.modelDefault = JSON.parse(JSON.stringify(this.model));
this.initDictData()
this.getChargeList()
},
methods: {
initDictData() {
//优先从缓存中读取字典配置
if(getDictItemsFromCache('chargingCycle')){
this.dictOptions = getDictItemsFromCache('chargingCycle');
return
}
// //根据字典Code, 初始化字典数组
ajaxGetDictItems('chargingCycle', null).then((res) => {
if (res.success) {
this.dictOptions = res.result;
}
})
},
async getChargeList() {
let {result} = await getChargeListApi()
this.chargeList = result
},
add () {
this.edit(this.modelDefault);
},
edit (record) {
console.log(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
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<property-settled-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></property-settled-form>
</j-modal>
</template>
<script>
import PropertySettledForm from './NoticeForm'
export default {
name: 'PropertySettledModal',
components: {
PropertySettledForm
},
data () {
return {
title:'',
width: '70%',
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
<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 :md="6" :sm="8">
<a-form-item label="收费类型">
<a-input placeholder="请输入收费类型" v-model="queryParam.ruleCode"></a-input>
</a-form-item>
</a-col>
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-col :md="6" :sm="24">
<a-button type="primary" @click="searchQuery">查询</a-button>
<a-button style="margin-left: 8px" @click="searchReset">重置</a-button>
</a-col>
</span>
</a-row>
</a-form>
</div>
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('t_property_settled')">导出</a-button>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
</a-dropdown>
</div>
<!-- table区域-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i>已选择&nbsp;<a style="font-weight: 600">{{
selectedRowKeys.length }}</a>&nbsp;&nbsp;
<a style="margin-left: 24px" v-if="selectedRowKeys.length > 0" @click="onClearSelected">清空</a>
</div>
<a-table
ref="table"
size="middle"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="pagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange"
>
<span slot="chargeItem" slot-scope="text, record">
<span :style="{'color': record.chargeItem === '1' ? 'green' : 'red'}">{{record.chargeItem === '1' ? '在职' : '离职'}}</span>
</span>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical"/>
<a-dropdown>
<a class="ant-dropdown-link">
更多 <a-icon type="down"/>
</a>
<a-menu slot="overlay">
<a-menu-item>
<a href="javascript:;" @click="handleDetail(record)">详情</a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)" placement="topLeft">
<a>删除</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</a-table>
</div>
<!-- table区域-end -->
<notice-modal ref="modalForm" @ok="modalFormOk"></notice-modal>
</a-card>
</template>
<script>
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import NoticeModal from './modules/NoticeModal'
import {filterDictTextByCache} from '@/components/dict/JDictSelectUtil'
const columns = [
{
title: '收费项目编码',
dataIndex: 'ruleCode',
key: 'ruleCode',
align: 'center'
},
{
title: '所属小区',
dataIndex: 'xiaoqu',
key: 'xiaoqu',
align: 'center'
},
{
title: '收费类型',
dataIndex: 'chargeTypeId',
key: 'chargeTypeId',
align: 'center',
// customRender: function(text) {
// return filterDictTextByCache('duties', text);
// }
},
{
title: '收费项目',
dataIndex: 'chargeItem',
key: 'chargeItem',
align: 'center'
},
{
title: '付费周期 (月)',
dataIndex: 'chargeCycle',
key: 'chargeCycle',
align: 'center'
},
{
title: '计费方式',
dataIndex: 'designFormulas',
key: 'designFormulas',
align: 'center'
},
{
title: '单价(元)',
dataIndex: 'amount',
key: 'amount',
align: 'center'
},
{
title: '操作',
dataIndex: 'action',
scopedSlots: { customRender: 'action' },
align: 'center',
width: 150
}
]
export default {
name: 'PermissionListAsync',
mixins: [JeecgListMixin],
components: {NoticeModal},
data() {
return {
// 表头
columns: columns,
pagination: {
total: 0,
current: 1,
pageSize: 10,
showSizeChanger: true
},
url: {
list: "/property-company/system/companyChargerule/list",
delete: '/property-company/system/companyChargerule/delete',
deleteBatch: '/property-company/system/companyChargerule/deleteBatch'
}
}
},
methods: {}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>
\ No newline at end of file
<template>
<a-spin :spinning="confirmLoading">
<div class="top-card">
<span class="card-title">新增模板</span>
<a-row type="flex" justify="start">
<a-button @click="backbtn">返回</a-button>
<a-button style="margin-left: 10px" type="primary" @click="handlePreviewPdf">预览</a-button>
<a-button style="margin-left: 10px" type="primary" @click="handleSaveToPdf">导出pdf</a-button>
<a-button style="margin-left: 10px" type="primary" @click="handleSave()">保存</a-button>
</a-row>
</div>
<div class="template-contract-box">
<a-form-model ref="form" :model="model" :rules="validatorRules">
<a-row>
<a-col :span="8">
<a-form-model-item label="收费名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="templateName">
<a-input placeholder="请输入收费名称" v-model="model.templateName"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="8">
<a-form-model-item label="收费类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="templateType">
<a-select style="width: 100%" v-model="model.templateType" placeholder="请选择收费类型" label-in-value>
<a-select-option v-for="item in chargeList" :key="item.id" :value="item.id">{{item.typeName}}</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
<my-editor-with-mention ref="editorHtml"></my-editor-with-mention>
<vue-html2pdf
:show-layout="false"
:float-layout="true"
:enable-download="true"
:preview-modal="false"
:html-to-pdf-options="pdfOptions"
:paginate-elements-by-height="1400"
filename="tempFileName"
:pdf-quality="2"
:manual-pagination="false"
pdf-format="a4"
pdf-orientation="landscape"
pdf-content-width="98%"
@progress="onProgress"
ref="html2PdfDownLoad"
>
<section slot="pdf-content">
<!-- PDF Content Here -->
<span id="report" v-html="content"></span>
</section>
</vue-html2pdf>
<vue-html2pdf
:show-layout="false"
:float-layout="true"
:enable-download="false"
:preview-modal="true"
:html-to-pdf-options="pdfOptions"
:paginate-elements-by-height="1400"
filename="tempFileName"
:pdf-quality="2"
:manual-pagination="false"
pdf-format="a4"
pdf-orientation="landscape"
pdf-content-width="98%"
@progress="onProgress"
ref="html2PdfPreview"
>
<section slot="pdf-content">
<!-- PDF Content Here -->
<span id="report" v-html="content"></span>
</section>
</vue-html2pdf>
</div>
</a-spin>
</template>
<script>
import {getChargeListApi, addReceiptTemplate} from '@/api/api'
import MyEditorWithMention from './components/MyEditorWithMention'
import VueHtml2pdf from "vue-html2pdf";
const tableHtml = '<table border="1" cellspacing="0" style="width: 100%;"><tbody><tr><th colSpan="1" rowSpan="1">序号</th><th colSpan="1" rowSpan="1">品名</th><th colSpan="1" rowSpan="1">产地品牌</th><th colSpan="1" rowSpan="1">规格型号</th><th colSpan="1" rowSpan="1">数量</th><th colSpan="1" rowSpan="1">税率</th><th colSpan="1" rowSpan="1">单位</th><th colSpan="1" rowSpan="1">单价</th><th colSpan="1" rowSpan="1">总金额(不含税)</th><th colSpan="1" rowSpan="1">税额</th><th colSpan="1" rowSpan="1">总金额(含税)</th><th colSpan="1" rowSpan="1">备注</th></tr><tr><td colspan="1" rowspan="1" style="text-align: center;">1</td><td colSpan="1" rowSpan="1"></td><td colSpan="1" rowSpan="1"></td><td colSpan="1" rowSpan="1"></td><td colSpan="1" rowSpan="1"></td><td colSpan="1" rowSpan="1"></td><td colSpan="1" rowSpan="1"></td><td colSpan="1" rowSpan="1"></td><td colSpan="1" rowSpan="1"></td><td colSpan="1" rowSpan="1"></td><td colSpan="1" rowSpan="1"></td><td colSpan="1" rowSpan="1"></td></tr><tr><td colSpan="1" rowSpan="1">合计</td><td colSpan="1" rowSpan="1"></td><td colSpan="1" rowSpan="1"></td><td colSpan="1" rowSpan="1"></td><td colSpan="1" rowSpan="1"></td><td colSpan="1" rowSpan="1"></td><td colSpan="1" rowSpan="1"></td><td colSpan="1" rowSpan="1"></td><td colSpan="1" rowSpan="1"></td><td colSpan="1" rowSpan="1"></td><td colSpan="1" rowSpan="1"></td><td colSpan="1" rowSpan="1"></td></tr><tr><td colSpan="3" rowSpan="1" style="text-align: center;">合同金额(大写):</td><td colSpan="9" rowSpan="1"></td></tr></tbody></table>'
export default {
name: 'templateContractAdd',
inject:['closeCurrent'],
components: {
MyEditorWithMention,
VueHtml2pdf
},
data() {
return {
content: '',
previewModal: false,
downloadFile: false,
pdfOptions: {
margin: [20, 10, 20, 10],
filename: ''
},
confirmLoading: false,
labelCol: {
xs: { span: 24 },
sm: { span: 6 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
chargeList: [],
model: {
templateName: '',
// templateType: {key: "1660940550578327554",label: "水费"},
templateType: ''
},
validatorRules: {
templateName: [{ required: true, message: '请输入收费名称', trigger: 'blur' }],
templateType: [{ required: true, message: '请选择收费类型', trigger: 'change' }]
}
}
},
methods: {
async getChargeList() {
let {result} = await getChargeListApi()
this.chargeList = result
},
onProgress(e) {
console.log(e)
},
backbtn() {
this.closeCurrent()
},
handleSave() {
this.$refs.form.validate(valid => {
if(valid) {
this.confirmLoading = true;
addReceiptTemplate({
templateName: this.model.templateName,
templateType: this.model.templateType.key,
typeName: this.model.templateType.label,
templateStyle: this.content
}).then(res=> {
this.$message.warning(res.message);
this.backbtn()
}).finally(() => {
this.confirmLoading = false;
})
}
})
},
handleSaveToPdf() {
this.pdfOptions.filename = '收费模板'
this.content = this.$refs.editorHtml.curHtml.replace('<p><span data-w-e-type="mention" data-w-e-is-void data-w-e-is-inline data-value="产品列表" data-info="%7B%22id%22%3A%22e%22%7D">@产品列表</span></p>', tableHtml)
console.log(this.content)
this.$refs.html2PdfDownLoad.generatePdf();
},
handlePreviewPdf() {
this.content = this.$refs.editorHtml.curHtml.replace('<p><span data-w-e-type="mention" data-w-e-is-void data-w-e-is-inline data-value="产品列表" data-info="%7B%22id%22%3A%22e%22%7D">@产品列表</span></p>', tableHtml)
// this.downloadFile = false
// this.previewModal = true
this.$refs.html2PdfPreview.generatePdf()
}
},
created () {
this.getChargeList()
},
mounted() {
this.content = this.$refs.editorHtml.curHtml
}
}
</script>
<style lang="less" scoped>
.template-contract-box {
background-color: #fff;
padding: 25px 5px 5px;
margin-top: 10px;
}
.top-card {
-webkit-box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
border: 1px solid #ebeef5;
background-color: #fff;
display: flex;
align-items: center;
justify-content: space-between;
border-radius: 4px;
padding: 15px 20px;
.card-title {
font-weight: 700;
margin-right: 15px;
color: #000;
}
}
.box-card {
width: 800px;
}
.page-break-after {
page-break-after: always;
}
</style>
<template>
<div id="mention-modal" :style="{ top: top, left: left }">
<input id="mention-input" v-model="searchVal" ref="input" @keyup="inputKeyupHandler">
<ul id="mention-list">
<li
v-for="item in searchedList"
:key="item.id"
@click="insertMentionHandler(item.id, item.name)"
>{{item.name}}</li>
</ul>
</div>
</template>
<script>
export default {
name: 'MentionModal',
props: {
list: {
type: Array,
default: ()=> {
return []
}
}
},
data() {
return {
// 定位信息
top: '',
left: '',
// list 信息
searchVal: '',
// list: [
// { id: 'a', name: '买家名称' },
// { id: 'b', name: '买家编码' },
// { id: 'c', name: '卖方名称' },
// { id: 'd', name: '卖方编码' },
// { id: 'e', name: '订单类型' },
// { id: 'f', name: '配送方式' },
// ]
}
},
computed: {
// 根据 <input> value 筛选 list
searchedList() {
const searchVal = this.searchVal.trim().toLowerCase()
return this.list.filter(item => {
const name = item.name.toLowerCase()
if (name.indexOf(searchVal) >= 0) {
return true
}
return false
})
}
},
methods: {
inputKeyupHandler(event) {
// esc - 隐藏 modal
if (event.key === 'Escape') {
this.$emit('hideMentionModal')
}
// enter - 插入 mention node
if (event.key === 'Enter') {
// 插入第一个
const firstOne = this.searchedList[0]
if (firstOne) {
const { id, name } = firstOne
this.insertMentionHandler(id, name)
}
}
},
insertMentionHandler(id, name) {
this.$emit('insertMention', id, name)
this.$emit('hideMentionModal') // 隐藏 modal
}
},
mounted() {
// 获取光标位置
const domSelection = document.getSelection()
const domRange = domSelection.getRangeAt(0)
if (domRange == null) return
const rect = domRange.getBoundingClientRect()
// 定位 modal
this.top = `${rect.top + 20}px`
this.left = `${rect.left + 5}px`
// focus input
this.$refs.input.focus()
},
}
</script>
<style>
#mention-modal {
position: absolute;
border: 1px solid #ccc;
background-color: #fff;
padding: 5px;
}
#mention-modal input {
width: 100px;
outline: none;
}
#mention-modal ul {
padding: 0;
margin: 0;
}
#mention-modal ul li {
list-style: none;
cursor: pointer;
padding: 3px 0;
text-align: left;
}
#mention-modal ul li:hover {
text-decoration: underline;
}
</style>
<template>
<div>
<div style="border: 1px solid #ccc;">
<Toolbar
style="border-bottom: 1px solid #ccc"
:editor="editor"
:defaultConfig="toolbarConfig"
mode="simple"
/>
<Editor
style="height: 400px"
v-model="curHtml"
:defaultConfig="editorConfig"
@onChange="onChange"
@onCreated="onCreated"
mode="simple"
/>
<mention-modal
:list="searchList"
v-if="isShowModal"
@hideMentionModal="hideMentionModal"
@insertMention="insertMention"
></mention-modal>
</div>
<!-- <div style="margin-top: 10px;">
<textarea v-model="curHtml" style="width: 100%; height: 500px;"></textarea>
</div> -->
</div>
</template>
<script>
import { Boot, DomEditor } from '@wangeditor/editor'
import { Editor, Toolbar } from '@wangeditor/editor-for-vue'
import mentionModule from '@wangeditor/plugin-mention'
import MentionModal from './MentionModal'
// 注册插件
Boot.registerModule(mentionModule)
export default {
name: 'MyEditorWithMention',
components: { Editor, Toolbar, MentionModal },
// props: {
// templateHtml: {
// type: String,
// default: ''
// }
// },
// watch: {
// templateHtml(newV, oldV) {
// this.curHtml = newV
// }
// },
data() {
return {
editor: null,
curHtml: '<p style="text-align: center;"><strong>收据名称</strong></p><p style="text-align: center;">单号:@单号</p><p style="text-align: left;">业主:@业主 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;缴费时间:@缴费时间</p><hr/><p>今收到 <u style="text-decoration: underline;"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </u> 金额(大写)<u> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</u></p><p>收款单位(盖章) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;¥:<u> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</u></p><hr/><p>开票人:@审核人 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;收款人:@审核人 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;客户:@业主</p>',
toolbarConfig: {
excludeKeys: [
"italic",
"color",
"bgColor",
"clearStyle",
"todo",
"insertLink",
'group-image',
"insertVideo",
"codeBlock"
]
},
editorConfig: {
placeholder: '请输入内容...',
EXTEND_CONF: {
mentionConfig: {
showModal: this.showMentionModal,
hideModal: this.hideMentionModal,
},
},
},
isShowModal: false,
searchList: [
{ id: 'a', name: '收据名称' },
{ id: 'b', name: '单号' },
// { id: 'c', name: '卖方名称' },
{ id: 'd', name: '业主名称' },
{ id: 'e', name: '缴费时间' },
{ id: 'f', name: '审核人' },
// { id: 'g', name: '乙方法定联系人' },
]
}
},
methods: {
onCreated(editor) {
this.editor = Object.seal(editor) // 【注意】一定要用 Object.seal() 否则会报错
// this.$nextTick(()=> {
// const toolbar = DomEditor.getToolbar(editor)
// const curToolbarConfig = toolbar.getConfig()
// console.log( curToolbarConfig.toolbarKeys )
// })
},
onChange(editor) {
this.curHtml = editor.getHtml()
},
showMentionModal() {
this.isShowModal = true
},
hideMentionModal() {
this.isShowModal = false
},
insertMention(id, name) {
const mentionNode = {
type: 'mention', // 必须是 'mention'
value: name,
info: { id },
children: [{ text: '' }], // 必须有一个空 text 作为 children
}
const editor = this.editor
if (editor) {
editor.restoreSelection() // 恢复选区
editor.deleteBackward('character') // 删除 '@'
editor.insertNode(mentionNode) // 插入 mention
editor.move(1) // 移动光标
}
}
},
beforeDestroy() {
const editor = this.editor
if (editor == null) return
editor.destroy() // 组件销毁时,及时销毁 editor ,重要!!!
},
}
</script>
<style src="@wangeditor/editor/dist/css/style.css"></style>
<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="12">
<a-form-model-item label="员工姓名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="employeeName">
<a-input v-model="model.employeeName" placeholder="请输入员工姓名"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="联系电话" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="employeePhone">
<a-input v-model="model.employeePhone" placeholder="请输入联系电话"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="员工职务" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="employeeDuties">
<a-select style="width: 100%" v-model="model.employeeDuties" placeholder="请选择员工职务">
<a-select-option v-for="item in dictOptions" :key="item.value" :value="item.value">{{item.label}}</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="所属小区" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="communityCode">
<j-popup v-model="model.communityCode" placeholder="请选择所属小区" icon="home" code="demo" field="name" orgFields="name" destFields="name" :multi="false"/>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="employeeStatus">
<a-select style="width: 100%" v-model="model.employeeStatus" placeholder="请选择状态">
<a-select-option value="1">在职</a-select-option>
<a-select-option value="0">离职</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="24">
<a-form-model-item label="员工头像" :labelCol="{ xs:{ span: 24 }, sm:{ span: 3 } }" :wrapperCol="wrapperCol" prop="employeeAvatar">
<j-image-upload :isMultiple="false" text="点击上传" bizPath="scott/pic" v-model="model.employeeAvatar"></j-image-upload>
<p style="line-height:1;margin:0">建议尺寸640*320,小于10M的JPG、PNG格式图片</p>
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
import {ajaxGetDictItems,getDictItemsFromCache} from '@/api/api'
export default {
name: 'PropertyChargruleForm',
components: {
},
props: {
//表单禁用
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
dictOptions: [],
model:{
employeeName: '',
employeePhone: '',
employeeDuties: '',
communityCode: '',
communityId: '',
employeeStatus: '1',
employeeAvatar: ''
},
labelCol: {
xs: { span: 24 },
sm: { span: 6 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
employeeName: [{ required: true, message: '请输入员工姓名', trigger: 'blur' }],
employeePhone: [{ required: true, message: '请输入联系电话', trigger: 'blur' }],
employeeDuties: [{ required: true, message: '请选择员工职务', trigger: 'change' }]
},
url: {
add: "/property-company/employee/companyEmployee/add",
edit: "/property-company/property/propertyChargrule/edit",
queryById: "/property-company/property/propertyChargrule/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//备份model原始值
this.modelDefault = JSON.parse(JSON.stringify(this.model));
this.initDictData()
},
methods: {
initDictData() {
//优先从缓存中读取字典配置
if(getDictItemsFromCache('duties')){
this.dictOptions = getDictItemsFromCache('duties');
return
}
// //根据字典Code, 初始化字典数组
ajaxGetDictItems('duties', null).then((res) => {
if (res.success) {
this.dictOptions = res.result;
}
})
},
ruleNumberInput(event) {
let rateValue = event.target.value.replace(/[^\d]/g,"");//清除"数字"和"."和"-"以外的字符
this.model['empowerDays'] = rateValue
},
add () {
this.edit(this.modelDefault);
},
edit (record) {
console.log(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
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<property-settled-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></property-settled-form>
</j-modal>
</template>
<script>
import PropertySettledForm from './NoticeForm'
export default {
name: 'PropertySettledModal',
components: {
PropertySettledForm
},
data () {
return {
title:'',
width: '70%',
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
<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 :md="6" :sm="8">
<a-form-item label="收据名称">
<a-input placeholder="请输入收据名称" v-model="queryParam.templateName"></a-input>
</a-form-item>
</a-col>
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-col :md="6" :sm="24">
<a-button type="primary" @click="searchQuery">查询</a-button>
<a-button style="margin-left: 8px" @click="searchReset">重置</a-button>
</a-col>
</span>
</a-row>
</a-form>
</div>
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="onHandleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('t_property_settled')">导出</a-button>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
</a-dropdown>
</div>
<!-- table区域-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i>已选择&nbsp;<a style="font-weight: 600">{{
selectedRowKeys.length }}</a>&nbsp;&nbsp;
<a style="margin-left: 24px" v-if="selectedRowKeys.length > 0" @click="onClearSelected">清空</a>
</div>
<a-table
ref="table"
size="middle"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="pagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange"
>
<span slot="action" slot-scope="text, record">
<a @click="previewContract(record)">预览</a>
<a-divider type="vertical"/>
<a-dropdown>
<a class="ant-dropdown-link">
更多 <a-icon type="down"/>
</a>
<a-menu slot="overlay">
<a-menu-item>
<a href="javascript:;" @click="downloadContract(record)">下载</a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)" placement="topLeft">
<a>删除</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</a-table>
</div>
<!-- table区域-end -->
<div>
<vue-html2pdf :show-layout="false" :float-layout="true" :enable-download="true" :preview-modal="false"
:html-to-pdf-options="pdfOptions" :paginate-elements-by-height="1400" filename="tempFileName" :pdf-quality="2"
:manual-pagination="false" pdf-format="a4" pdf-orientation="landscape" pdf-content-width="98%"
ref="html2PdfDownLoad">
<section slot="pdf-content">
<!-- PDF Content Here -->
<span id="report1" v-html="contractBindingValue"></span>
</section>
</vue-html2pdf>
<vue-html2pdf :show-layout="false" :float-layout="true" :enable-download="false" :preview-modal="true"
:html-to-pdf-options="pdfOptions" :paginate-elements-by-height="1400" filename="tempFileName" :pdf-quality="2"
:manual-pagination="false" pdf-format="a4" pdf-orientation="landscape" pdf-content-width="98%"
ref="html2PdfPreview">
<section slot="pdf-content">
<!-- PDF Content Here -->
<span id="report" v-html="contractBindingValue"></span>
</section>
</vue-html2pdf>
</div>
</a-card>
</template>
<script>
import VueHtml2pdf from "vue-html2pdf";
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
const columns = [
{
title: '收据编号',
dataIndex: 'templateCode',
key: 'templateCode',
align: 'center'
},
{
title: '收据名称',
dataIndex: 'templateName',
key: 'templateName',
align: 'center'
},
{
title: '收据类型',
dataIndex: 'typeName',
key: 'typeName',
align: 'center'
},
{
title: '上传人',
dataIndex: 'createBy',
key: 'createBy',
align: 'center'
},
{
title: '上传时间',
dataIndex: 'createTime',
key: 'createTime',
align: 'center'
},
{
title: '操作',
dataIndex: 'action',
scopedSlots: { customRender: 'action' },
align: 'center',
width: 150
}
]
export default {
name: 'PermissionListAsync',
mixins: [JeecgListMixin],
components: {
VueHtml2pdf
},
data() {
return {
// 表头
columns: columns,
pagination: {
total: 0,
current: 1,
pageSize: 10,
showSizeChanger: true
},
url: {
list: "/property-company/system/receiptTemplate/list",
delete: '/property-company/system/receiptTemplate/delete',
deleteBatch: '/property-company/system/receiptTemplate/deleteBatch'
},
pdfOptions: {
margin: [20, 10, 20, 10],
filename: ""
},
contractBindingValue: ""
}
},
methods: {
onHandleAdd() {
this.$router.push({
path: '/charge/templateSettings/add',
// params: Object.assign({}, this.$route.params, {
// pageNo: val
// }),
});
},
previewContract(row) {
this.contractBindingValue = row.templateStyle.replace(
'<p><span data-w-e-type="mention" data-w-e-is-void data-w-e-is-inline data-value="产品列表" data-info="%7B%22id%22%3A%22e%22%7D">@产品列表</span></p>',
''
);
this.$refs.html2PdfPreview.generatePdf();
},
downloadContract(row) {
this.pdfOptions.filename = row.templateName;
this.contractBindingValue = row.templateStyle.replace(
'<p><span data-w-e-type="mention" data-w-e-is-void data-w-e-is-inline data-value="产品列表" data-info="%7B%22id%22%3A%22e%22%7D">@产品列表</span></p>',
''
);
this.$refs.html2PdfDownLoad.generatePdf();
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>
\ No newline at end of file
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-form-model-item label="收费类型名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="typeName">
<a-input v-model="model.typeName" placeholder="请输入收费类型名称"></a-input>
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
import {ajaxGetDictItems,getDictItemsFromCache} from '@/api/api'
export default {
name: 'PropertyChargruleForm',
components: {
},
props: {
//表单禁用
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
model:{
typeName: ''
},
labelCol: {
xs: { span: 24 },
sm: { span: 6 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
typeName: [{ required: true, message: '请输入收费类型名称', trigger: 'blur' }]
},
url: {
add: "/property-company/system/chargeType/add",
edit: "/property-company/system/chargeType/edit",
queryById: "/property-company/system/chargeType/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//备份model原始值
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
this.edit(this.modelDefault);
},
edit (record) {
console.log(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
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<property-settled-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></property-settled-form>
</j-modal>
</template>
<script>
import PropertySettledForm from './NoticeForm'
export default {
name: 'PropertySettledModal',
components: {
PropertySettledForm
},
data () {
return {
title:'',
width: '500px',
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
<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 :md="6" :sm="8">
<a-form-item label="姓名">
<a-input placeholder="请输入姓名" v-model="queryParam.typeCode"></a-input>
</a-form-item>
</a-col>
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-col :md="6" :sm="24">
<a-button type="primary" @click="searchQuery">查询</a-button>
<a-button style="margin-left: 8px" @click="searchReset">重置</a-button>
</a-col>
</span>
</a-row>
</a-form>
</div>
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('t_property_settled')">导出</a-button>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
</a-dropdown>
</div>
<!-- table区域-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i>已选择&nbsp;<a style="font-weight: 600">{{
selectedRowKeys.length }}</a>&nbsp;&nbsp;
<a style="margin-left: 24px" v-if="selectedRowKeys.length > 0" @click="onClearSelected">清空</a>
</div>
<a-table
ref="table"
size="middle"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="pagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange"
>
<span slot="employeeStatus" slot-scope="text, record">
<span :style="{'color': record.employeeStatus === '1' ? 'green' : 'red'}">{{record.employeeStatus === '1' ? '在职' : '离职'}}</span>
</span>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical"/>
<a-dropdown>
<a class="ant-dropdown-link">
更多 <a-icon type="down"/>
</a>
<a-menu slot="overlay">
<a-menu-item>
<a href="javascript:;" @click="handleDetail(record)">详情</a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)" placement="topLeft">
<a>删除</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</a-table>
</div>
<!-- table区域-end -->
<notice-modal ref="modalForm" @ok="modalFormOk"></notice-modal>
</a-card>
</template>
<script>
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import NoticeModal from './modules/NoticeModal'
const columns = [
{
title: '收费类型编码',
dataIndex: 'typeCode',
key: 'typeCode',
align: 'center'
},
{
title: '收费类型名称',
dataIndex: 'typeName',
key: 'typeName',
align: 'center'
},
{
title: '操作人',
dataIndex: 'createBy',
key: 'createBy',
align: 'center'
},
{
title: '操作',
dataIndex: 'action',
scopedSlots: { customRender: 'action' },
align: 'center',
width: 150
}
]
export default {
name: 'PermissionListAsync',
mixins: [JeecgListMixin],
components: {NoticeModal},
data() {
return {
// 表头
columns: columns,
pagination: {
total: 0,
current: 1,
pageSize: 10,
showSizeChanger: true
},
url: {
list: "/property-company/system/chargeType/list",
delete: '/property-company/system/chargeType/delete',
deleteBatch: '/property-company/system/chargeType/deleteBatch'
}
}
},
methods: {}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>
\ No newline at end of file
......@@ -88,7 +88,6 @@
</template>
<script>
import {AuditUpdateCostApi} from '@/api/api'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import {filterDictTextByCache} from '@/components/dict/JDictSelectUtil'
import PropertyChargruleModal from './modules/PropertyChargruleModal'
......@@ -158,10 +157,10 @@
showSizeChanger: true
},
url: {
list: "/property/propertyChargrule/list",
delete: '/property/propertyChargrule/delete',
deleteBatch: '/property/propertyChargrule/deleteBatch',
exportXlsUrl: "/property/propertyChargrule/exportXls"
list: "/property-company/property/propertyChargrule/list",
delete: '/property-company/property/propertyChargrule/delete',
deleteBatch: '/property-company/property/propertyChargrule/deleteBatch',
exportXlsUrl: "/property-company/property/propertyChargrule/exportXls"
},
dictOptions: [],
}
......
......@@ -82,9 +82,9 @@
chargingMoney: [{ required: true, message: '请输入收费金额', trigger: 'blur' }]
},
url: {
add: "/property/propertyChargrule/add",
edit: "/property/propertyChargrule/edit",
queryById: "/property/propertyChargrule/queryById"
add: "/property-company/property/propertyChargrule/add",
edit: "/property-company/property/propertyChargrule/edit",
queryById: "/property-company/property/propertyChargrule/queryById"
},
dictOptions: []
}
......
......@@ -103,7 +103,6 @@
<script>
// import PermissionModal from './modules/PermissionModal'
import { getPropertyListApi, getSystemSubmenu, getSystemSubmenuBatch } from '@/api/api'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
// import PermissionDataRuleList from './PermissionDataRuleList'
import JEllipsis from '@/components/jeecg/JEllipsis'
......
......@@ -338,9 +338,9 @@
showSizeChanger: true
},
url: {
list: "/property/propertySettled/list",
delete: '/sys/permission/delete',
deleteBatch: '/sys/permission/deleteBatch'
list: "/property-company/property/propertySettled/list",
delete: '/property-company/sys/permission/delete',
deleteBatch: '/property-company/sys/permission/deleteBatch'
},
modalTitle: '新增',
......
......@@ -48,7 +48,7 @@
</a-col>
<a-col :span="24">
<a-form-model-item label="详细地址" :labelCol="{ xs:{ span: 24 }, sm:{ span: 3 } }" :wrapperCol="wrapperCol" prop="addressInfo">
<a-input v-model="model.addressInfo" placeholder="请输入详细地址" ></a-input>
<a-input v-model="model.addressInfo" placeholder="请输入详细地址" @blur="addressBlur" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
......@@ -128,7 +128,6 @@
<script>
const mapZoom = [5,8,10,12]
let timer = null;
import { getCostListApi } from '@/api/api'
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
......@@ -168,7 +167,7 @@
chargingStandardId: '',
contractUrl: '',
adminLoginName: '',
adminPassword: '',
adminPassword: '123456',
longitude: '',
latitude: ''
},
......@@ -197,9 +196,9 @@
contractUrl: [{ required: true, message: '请上传合同附件', trigger: 'change' }]
},
url: {
add: "/property/propertySettled/add",
edit: "/property/propertySettled/edit",
queryById: "/property/propertySettled/queryById"
add: "/property-company/property/propertySettled/add",
edit: "/property-company/property/propertySettled/edit",
queryById: "/property-company/property/propertySettled/queryById"
},
costList: [],
mapRef: null,
......@@ -270,6 +269,11 @@
this.getLongitude(this.model.provinceName, (this.model.provinceName + this.model.cityName + this.model.countyName + this.model.addressInfo), mapZoom[3])
}
},
addressBlur(val) {
if(this.model.provinceName) {
this.getLongitude(this.model.provinceName, (this.model.provinceName + this.model.cityName + this.model.countyName + val.target.value), mapZoom[3])
}
},
getAddress(e) {
let _this = this;
// 创建地理编码实例
......@@ -336,6 +340,7 @@
httpurl+=this.url.edit;
method = 'put';
}
this.model.registAdress = undefined
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
......
<template xmlns:background-color="http://www.w3.org/1999/xhtml">
<a-row :gutter="10">
<a-col :md="12" :sm="24">
<a-col :md="24" :sm="24">
<a-card :bordered="false">
<!-- 按钮操作区域 -->
......@@ -70,7 +70,7 @@
</div>
<!---- author:os_chengtgen -- date:20190827 -- for:切换父子勾选模式 =======------>
</a-col>
<a-col :md="12" :sm="24">
<!-- <a-col :md="12" :sm="24">
<a-tabs defaultActiveKey="1">
<a-tab-pane tab="基本信息" key="1" >
<a-card :bordered="false" v-if="selectedKeys.length>0">
......@@ -142,7 +142,7 @@
</a-tab-pane>
</a-tabs>
</a-col>
</a-col> -->
<depart-modal ref="departModal" @ok="loadTree"></depart-modal>
</a-row>
</template>
......
......@@ -263,12 +263,12 @@
width: 180,
dataIndex: 'orgCodeTxt'
},
{
title: '负责部门',
align: "center",
width: 180,
dataIndex: 'departIds_dictText'
},
// {
// title: '负责部门',
// align: "center",
// width: 180,
// dataIndex: 'departIds_dictText'
// },
{
title: '状态',
align: "center",
......
......@@ -40,17 +40,17 @@
<a-input placeholder="请输入用户姓名" v-model="model.realname" />
</a-form-model-item>
<a-form-model-item label="工号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="workNo">
<!-- <a-form-model-item label="工号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="workNo">
<a-input placeholder="请输入工号" v-model="model.workNo" />
</a-form-model-item>
</a-form-model-item> -->
<a-form-model-item label="手机号码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="phone">
<a-input placeholder="请输入手机号码" v-model="model.phone" />
</a-form-model-item>
<a-form-model-item label="职务" :labelCol="labelCol" :wrapperCol="wrapperCol">
<!-- <a-form-model-item label="职务" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-select-position placeholder="请选择职务" :multiple="false" v-model="model.post"/>
</a-form-model-item>
</a-form-model-item> -->
<a-form-model-item label="角色分配" :labelCol="labelCol" :wrapperCol="wrapperCol" v-show="!roleDisabled" >
<j-multi-select-tag
......@@ -67,21 +67,21 @@
</a-form-model-item>
<!--租户分配-->
<a-form-model-item label="租户分配" :labelCol="labelCol" :wrapperCol="wrapperCol" v-show="!departDisabled">
<!-- <a-form-model-item label="租户分配" :labelCol="labelCol" :wrapperCol="wrapperCol" v-show="!departDisabled">
<j-multi-select-tag
:disabled="disableSubmit"
v-model="model.relTenantIds"
:options="tenantsOptions"
placeholder="请选择租户">
</j-multi-select-tag>
</a-form-model-item>
</a-form-model-item> -->
<a-form-model-item label="身份" :labelCol="labelCol" :wrapperCol="wrapperCol">
<!-- <a-form-model-item label="身份" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-radio-group v-model="model.userIdentity" @change="identityChange">
<a-radio :value="1">普通用户</a-radio>
<a-radio :value="2">上级</a-radio>
</a-radio-group>
</a-form-model-item>
</a-form-model-item> -->
<a-form-model-item label="负责部门" :labelCol="labelCol" :wrapperCol="wrapperCol" v-show="departIdShow==true">
<j-multi-select-tag
:disabled="disableSubmit"
......@@ -119,9 +119,9 @@
<a-input placeholder="请输入座机" v-model="model.telephone" />
</a-form-model-item>
<a-form-model-item label="工作流引擎" :labelCol="labelCol" :wrapperCol="wrapperCol">
<!-- <a-form-model-item label="工作流引擎" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-dict-select-tag v-model="model.activitiSync" placeholder="请选择是否同步工作流引擎" :type="'radio'" dictCode="activiti_sync"/>
</a-form-model-item>
</a-form-model-item> -->
</a-form-model>
</a-spin>
......@@ -171,8 +171,8 @@
phone: [{required: true, message: '请输入手机号!'}, {validator: this.validatePhone}],
email: [{validator: this.validateEmail}],
roles:{},
workNo:[ { required: true, message: '请输入工号' },
{ validator: this.validateWorkNo }],
// workNo:[ { required: true, message: '请输入工号' },
// { validator: this.validateWorkNo }],
telephone: [{ pattern: /^0\d{2,3}-[1-9]\d{6,7}$/, message: '请输入正确的座机号码' },]
},
departIdShow:false,
......@@ -206,7 +206,7 @@
const token = Vue.ls.get(ACCESS_TOKEN);
this.headers = {"X-Access-Token":token}
this.initRoleList()
this.initTenantList()
// this.initTenantList()
},
computed:{
uploadAction:function () {
......@@ -339,9 +339,9 @@
if (valid) {
that.confirmLoading = true;
//如果是上级择传入departIds,否则为空
if(this.model.userIdentity!==2){
this.model.departIds="";
}
// if(this.model.userIdentity!==2){
// this.model.departIds="";
// }
let obj;
if(!this.model.id){
this.model.id = this.userId;
......
......@@ -71,7 +71,7 @@
handleChangeCheckCode(){
this.currdatetime = new Date().getTime();
this.model.inputCode = ''
getAction(`/sys/randomImage/${this.currdatetime}`).then(res=>{
getAction(`/property-system/sys/randomImage/${this.currdatetime}`).then(res=>{
if(res.success){
this.randCodeImage = res.result
this.requestCodeSuccess=true
......@@ -131,6 +131,7 @@
captcha: this.model.inputCode,
checkKey: this.currdatetime,
remember_me: rememberMe,
platformType: 'company'
}
console.log("登录参数", loginParams)
this.Login(loginParams).then((res) => {
......
......@@ -127,7 +127,7 @@ export default {
},
show(loginResult){
this.clear();
this.bizDepart(loginResult);
// this.bizDepart(loginResult);
let user = Vue.ls.get(USER_INFO)
this.username = user.username
......
......@@ -13,7 +13,7 @@ module.exports = {
https://github.com/vuejs/vue-cli/issues/2463
*/
// 如果你不需要生产环境的 source map,可以将其设置为 false 以加速生产环境构建。
// productionSourceMap: process.env.NODE_ENV !== "production",
productionSourceMap: process.env.NODE_ENV !== "production",
//qiankuan打包时放开
//outputDir: "../dist/main",
// 多入口配置
......
差异被折叠。
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论