pd改名mb

This commit is contained in:
吕金泽 2022-01-28 16:02:34 +08:00
parent 8b7a73d452
commit 6fbf5978ff
27 changed files with 77 additions and 78 deletions

View File

@ -11,7 +11,7 @@
import { getToken } from '@/scripts/auth' import { getToken } from '@/scripts/auth'
export default { export default {
name: 'PdButton', name: 'MbButton',
props: { props: {
el: { el: {
type: Object, type: Object,

View File

@ -16,7 +16,7 @@
<script> <script>
export default { export default {
name: 'PdDialog', name: 'MbDialog',
props: { props: {
title: { title: {
type: String, type: String,

View File

@ -3,19 +3,19 @@
<el-row style="margin-bottom: 6px"> <el-row style="margin-bottom: 6px">
<el-button type="primary" @click="tableOptions.data.push({})">添加一行</el-button> <el-button type="primary" @click="tableOptions.data.push({})">添加一行</el-button>
</el-row> </el-row>
<pd-table v-bind="tableOptions"> <mb-table v-bind="tableOptions">
<template v-for="col in cols" #[col.field]="{ index }"> <template v-for="col in cols" #[col.field]="{ index }">
<el-input v-if="col.type === 'input'" v-bind="col.properties" v-model="tableOptions.data[index][col.field]" @change="dataChange" /> <el-input v-if="col.type === 'input'" v-bind="col.properties" v-model="tableOptions.data[index][col.field]" @change="dataChange" />
<pd-select v-else-if="col.type === 'select'" v-bind="col.properties" v-model="tableOptions.data[index][col.field]" @change="dataChange" /> <mb-select v-else-if="col.type === 'select'" v-bind="col.properties" v-model="tableOptions.data[index][col.field]" @change="dataChange" />
</template> </template>
</pd-table> </mb-table>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
name: 'PdEditorTable', name: 'MbEditorTable',
model: { model: {
prop: 'value', prop: 'value',
event: 'change' event: 'change'

View File

@ -1,6 +1,6 @@
<template> <template>
<div> <div>
<el-select v-if="pdType === 'select'" v-model="selectValue" v-bind="el" :style="{ width }" placeholder="请选择" filterable clearable> <el-select v-if="mbType === 'select'" v-model="selectValue" v-bind="el" :style="{ width }" placeholder="请选择" filterable clearable>
<el-option <el-option
v-for="item in selectList" v-for="item in selectList"
:key="item.value" :key="item.value"
@ -8,7 +8,7 @@
:value="item.value" :value="item.value"
/> />
</el-select> </el-select>
<el-radio-group v-if="pdType === 'radio'" v-model="selectValue"> <el-radio-group v-if="mbType === 'radio'" v-model="selectValue">
<el-radio v-for="item in selectList" :key="item.value" :label="item.value"> <el-radio v-for="item in selectList" :key="item.value" :label="item.value">
{{ item.label }} {{ item.label }}
</el-radio> </el-radio>
@ -19,7 +19,7 @@
<script> <script>
export default { export default {
name: 'PdSelect', name: 'MbSelect',
model: { model: {
prop: 'value', prop: 'value',
event: 'change' event: 'change'
@ -61,7 +61,7 @@ export default {
type: String, type: String,
default: 'value' default: 'value'
}, },
pdType: { mbType: {
type: String, type: String,
default: 'select' default: 'select'
}, },

View File

@ -35,18 +35,18 @@
</span> </span>
<span v-else-if="col.field">{{ scope.row[col.field] }}</span> <span v-else-if="col.field">{{ scope.row[col.field] }}</span>
</template> </template>
<pd-table-column v-for="(col2, j) in col.cols" :key="j" :col="col2"> <mb-table-column v-for="(col2, j) in col.cols" :key="j" :col="col2">
<template v-for="(value, key) in $scopedSlots" #[key]="{ row, index }"> <template v-for="(value, key) in $scopedSlots" #[key]="{ row, index }">
<slot :row="row" :index="index" :name="key" /> <slot :row="row" :index="index" :name="key" />
</template> </template>
</pd-table-column> </mb-table-column>
</el-table-column> </el-table-column>
</template> </template>
<script> <script>
export default { export default {
name: 'PdTableColumn', name: 'MbTableColumn',
props: { props: {
col: { col: {
type: Object, type: Object,

View File

@ -21,11 +21,11 @@
</template> </template>
</el-table-column> </el-table-column>
<pd-table-column v-for="(col, i) in cols" :key="i" :col="col"> <mb-table-column v-for="(col, i) in cols" :key="i" :col="col">
<template v-for="(value, key) in $scopedSlots" #[key]="{ row, index }"> <template v-for="(value, key) in $scopedSlots" #[key]="{ row, index }">
<slot :row="row" :index="index" :name="key" /> <slot :row="row" :index="index" :name="key" />
</template> </template>
</pd-table-column> </mb-table-column>
<el-empty :description="emptyText" slot="empty" /> <el-empty :description="emptyText" slot="empty" />
@ -37,11 +37,11 @@
<script> <script>
import request from '@/scripts/request' import request from '@/scripts/request'
import Pagination from '@/components/Pagination' import Pagination from '@/components/Pagination'
import PdTableColumn from './pd-table-column.vue' import MbTableColumn from './mb-table-column.vue'
export default { export default {
name: 'PdTable', name: 'MbTable',
components: { Pagination, PdTableColumn }, components: { Pagination, MbTableColumn },
props: { props: {
el: { el: {
type: Object, type: Object,

View File

@ -25,7 +25,7 @@
<script> <script>
export default { export default {
name: 'PdTree', name: 'MbTree',
props: { props: {
url: { url: {
type: String, type: String,

View File

@ -1,12 +1,12 @@
<template> <template>
<vue-ueditor-wrap v-model="content" :config="editorConfig" editor-id="pd-ueditor" /> <vue-ueditor-wrap v-model="content" :config="editorConfig" editor-id="mb-ueditor" />
</template> </template>
<script> <script>
import VueUeditorWrap from 'vue-ueditor-wrap' import VueUeditorWrap from 'vue-ueditor-wrap'
export default { export default {
name: 'PdUeditor', name: 'MbUeditor',
components: { components: {
VueUeditorWrap VueUeditorWrap
}, },

View File

@ -22,7 +22,7 @@
<script> <script>
import { getToken } from '@/scripts/auth' import { getToken } from '@/scripts/auth'
export default { export default {
name: 'PdUploadFile', name: 'MbUploadFile',
model: { model: {
prop: 'value', prop: 'value',
event: 'change' event: 'change'

View File

@ -51,7 +51,7 @@
</i> </i>
</el-upload> </el-upload>
</vuedraggable> </vuedraggable>
<pd-dialog :visible.sync="cropperDialogVisible" @confirm-click="cropper"> <mb-dialog :visible.sync="cropperDialogVisible" @confirm-click="cropper">
<template #content> <template #content>
<div class="cropper-content"> <div class="cropper-content">
<div class="cropper" style="text-align:center"> <div class="cropper" style="text-align:center">
@ -68,7 +68,7 @@
</div> </div>
</div> </div>
</template> </template>
</pd-dialog> </mb-dialog>
</div> </div>
</template> </template>
@ -78,7 +78,7 @@ import vuedraggable from 'vuedraggable'
import { getToken } from '@/scripts/auth' import { getToken } from '@/scripts/auth'
export default { export default {
name: 'PdUploadImage', name: 'MbUploadImage',
components: { vuedraggable, VueCropper }, components: { vuedraggable, VueCropper },
model: { model: {
prop: 'value', prop: 'value',

View File

@ -48,7 +48,7 @@ Vue.component('vuedraggable', vuedraggable)
const requireComponent = require.context( const requireComponent = require.context(
// 其组件目录的相对路径 // 其组件目录的相对路径
'@/components/Psyduck/', '@/components/MagicBoot/',
// 是否查询其子目录 // 是否查询其子目录
true, true,
// 匹配基础组件文件名的正则表达式 // 匹配基础组件文件名的正则表达式

View File

@ -20,7 +20,7 @@
<el-checkbox-group v-else-if="col.type === 'checkboxGroup'" v-model="temp[col.name]" size="small"> <el-checkbox-group v-else-if="col.type === 'checkboxGroup'" v-model="temp[col.name]" size="small">
<el-checkbox v-for="checkboxIt in temp['_'+col.name]" :key="checkboxIt[col.defaultValue.value]" :label="checkboxIt[col.defaultValue.value]">{{ checkboxIt[col.defaultValue.text] }}</el-checkbox> <el-checkbox v-for="checkboxIt in temp['_'+col.name]" :key="checkboxIt[col.defaultValue.value]" :label="checkboxIt[col.defaultValue.value]">{{ checkboxIt[col.defaultValue.text] }}</el-checkbox>
</el-checkbox-group> </el-checkbox-group>
<pd-select v-else-if="col.type === 'select'" v-model="temp[col.name]" v-bind="col.el" /> <mb-select v-else-if="col.type === 'select'" v-model="temp[col.name]" v-bind="col.el" />
<el-input v-else v-model="temp[col.name]" :type="col.type" :value="col.defaultValue" /> <el-input v-else v-model="temp[col.name]" :type="col.type" :value="col.defaultValue" />
</el-form-item> </el-form-item>
</el-col> </el-col>

View File

@ -4,7 +4,7 @@
<el-form :inline="true"> <el-form :inline="true">
<el-form-item v-for="col in queryOptions.cols" :key="col.field" :label="col.title"> <el-form-item v-for="col in queryOptions.cols" :key="col.field" :label="col.title">
<el-input v-if="col.type === 'input'" v-model="tableOptions.where[col.field]" v-bind="col.el" :placeholder="'请输入'+col.title" :style="col.style" /> <el-input v-if="col.type === 'input'" v-model="tableOptions.where[col.field]" v-bind="col.el" :placeholder="'请输入'+col.title" :style="col.style" />
<pd-select v-else-if="col.type === 'select'" v-model="tableOptions.where[col.field]" v-bind="col.el" width="100%" /> <mb-select v-else-if="col.type === 'select'" v-model="tableOptions.where[col.field]" v-bind="col.el" width="100%" />
</el-form-item> </el-form-item>
<el-form-item v-for="(btn, i) in queryOptions.btns" :key="i"> <el-form-item v-for="(btn, i) in queryOptions.btns" :key="i">
<el-button v-if="btn.type == 'query'" class="filter-item" type="primary" icon="el-icon-search" @click="reloadTable"> <el-button v-if="btn.type == 'query'" class="filter-item" type="primary" icon="el-icon-search" @click="reloadTable">
@ -24,7 +24,7 @@
<el-button v-if="btn.btnType == 'add'" class="filter-item" type="primary" icon="el-icon-edit" @click="handleCreate"> <el-button v-if="btn.btnType == 'add'" class="filter-item" type="primary" icon="el-icon-edit" @click="handleCreate">
添加 添加
</el-button> </el-button>
<pd-button <mb-button
v-else v-else
:el="btn.el || {}" :el="btn.el || {}"
:request-url="btn.request.url" :request-url="btn.request.url"
@ -41,13 +41,13 @@
<hr> <hr>
</template> </template>
<pd-table ref="table" v-bind="tableOptions" @selection-change="selectionChange" /> <mb-table ref="table" v-bind="tableOptions" @selection-change="selectionChange" />
<pd-dialog :params="formParams" v-bind="formConfig && formConfig.dialog" :visible.sync="dialogFormVisible" @confirm-click="$refs.inputForm.save()"> <mb-dialog :params="formParams" v-bind="formConfig && formConfig.dialog" :visible.sync="dialogFormVisible" @confirm-click="$refs.inputForm.save()">
<template #content> <template #content>
<common-form ref="inputForm" v-bind="formConfig" :visible.sync="dialogFormVisible" :dialog-status="dialogStatus" @reload-table="reloadTable" /> <common-form ref="inputForm" v-bind="formConfig" :visible.sync="dialogFormVisible" :dialog-status="dialogStatus" @reload-table="reloadTable" />
</template> </template>
</pd-dialog> </mb-dialog>
</div> </div>
</template> </template>

View File

@ -1,7 +1,7 @@
<template> <template>
<div style="padding: 50px;"> <div style="padding: 50px;">
<el-button type="primary" @click="getData" style="margin-bottom: 10px">获取数据</el-button> <el-button type="primary" @click="getData" style="margin-bottom: 10px">获取数据</el-button>
<pd-editor-table v-model="tableDatas" :cols="cols" :show-no="false" /> <mb-editor-table v-model="tableDatas" :cols="cols" :show-no="false" />
</div> </div>
</template> </template>

View File

@ -2,7 +2,7 @@
<div style="padding: 50px;"> <div style="padding: 50px;">
<h2>多选</h2> <h2>多选</h2>
<el-button type="primary" @click="getData" style="margin-bottom: 10px">获取数据</el-button> <el-button type="primary" @click="getData" style="margin-bottom: 10px">获取数据</el-button>
<pd-select v-model="dictType" type="dict_type" :el="{ multiple: true }" /> <mb-select v-model="dictType" type="dict_type" :el="{ multiple: true }" />
</div> </div>
</template> </template>

View File

@ -1,6 +1,6 @@
<template> <template>
<div> <div>
<pd-ueditor v-model="content" /> <mb-ueditor v-model="content" />
<button @click="getContent">获取内容</button> <button @click="getContent">获取内容</button>
</div> </div>
</template> </template>

View File

@ -1,13 +1,13 @@
<template> <template>
<div style="padding: 50px;"> <div style="padding: 50px;">
<h2>上传文件</h2> <h2>上传文件</h2>
<pd-upload-file v-model="fileUrl" @change="fileChange" /> <mb-upload-file v-model="fileUrl" @change="fileChange" />
<h2>上传图片id</h2> <h2>上传图片id</h2>
<pd-upload-image :external-id="externalId" multiple :external-type="externalType" /> <mb-upload-image :external-id="externalId" multiple :external-type="externalType" />
<h2>上传图片url单图</h2> <h2>上传图片url单图</h2>
<pd-upload-image v-model="imgUrl" @change="imgChange" /> <mb-upload-image v-model="imgUrl" @change="imgChange" />
<h2>上传图片url多图</h2> <h2>上传图片url多图</h2>
<pd-upload-image v-model="multipleImgUrl" width="120" height="120" multiple :limit="3" @change="multipleImgChange" /> <mb-upload-image v-model="multipleImgUrl" width="120" height="120" multiple :limit="3" @change="multipleImgChange" />
</div> </div>
</template> </template>

View File

@ -17,9 +17,9 @@
</el-form> </el-form>
</div> </div>
<pd-table ref="table" v-bind="tableOptions" /> <mb-table ref="table" v-bind="tableOptions" />
<pd-dialog ref="formDialog" :title="dialogTitle" width="700px" @confirm-click="save"> <mb-dialog ref="formDialog" :title="dialogTitle" width="700px" @confirm-click="save">
<template #content> <template #content>
<el-form ref="dataForm" :inline="true" :rules="rules" :model="temp" label-position="right" label-width="100px" style="margin-left: 20px"> <el-form ref="dataForm" :inline="true" :rules="rules" :model="temp" label-position="right" label-width="100px" style="margin-left: 20px">
<el-form-item label="标签名" prop="label"> <el-form-item label="标签名" prop="label">
@ -36,7 +36,7 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
</template> </template>
</pd-dialog> </mb-dialog>
</div> </div>
</template> </template>

View File

@ -6,7 +6,7 @@
<el-input v-model="tableOptions.where.type" placeholder="请输入类型" style="width: 200px;" class="filter-item" /> <el-input v-model="tableOptions.where.type" placeholder="请输入类型" style="width: 200px;" class="filter-item" />
</el-form-item> </el-form-item>
<el-form-item label="字典类型"> <el-form-item label="字典类型">
<pd-select v-model="tableOptions.where.dictType" :all-option="true" type="dict_type" width="185px" /> <mb-select v-model="tableOptions.where.dictType" :all-option="true" type="dict_type" width="185px" />
</el-form-item> </el-form-item>
<el-button class="filter-item" type="primary" icon="el-icon-search" @click="reloadTable"> <el-button class="filter-item" type="primary" icon="el-icon-search" @click="reloadTable">
搜索 搜索
@ -17,13 +17,13 @@
</el-form> </el-form>
</div> </div>
<pd-table ref="table" v-bind="tableOptions" /> <mb-table ref="table" v-bind="tableOptions" />
<pd-dialog ref="dictDialog" :title="dialogTitle" width="700px" @confirm-click="save()"> <mb-dialog ref="dictDialog" :title="dialogTitle" width="700px" @confirm-click="save()">
<template #content> <template #content>
<el-form ref="dataForm" :inline="true" :rules="rules" :model="temp" label-position="right" label-width="100px" style="margin-left: 20px"> <el-form ref="dataForm" :inline="true" :rules="rules" :model="temp" label-position="right" label-width="100px" style="margin-left: 20px">
<el-form-item label="字典类型" prop="dictType"> <el-form-item label="字典类型" prop="dictType">
<pd-select v-model="temp.dictType" type="dict_type" width="185px" /> <mb-select v-model="temp.dictType" type="dict_type" width="185px" />
</el-form-item> </el-form-item>
<el-form-item label="类型" prop="type"> <el-form-item label="类型" prop="type">
<el-input v-model="temp.type" /> <el-input v-model="temp.type" />
@ -39,13 +39,13 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
</template> </template>
</pd-dialog> </mb-dialog>
<pd-dialog ref="dictItemsDialog" title="字典项" width="1400px"> <mb-dialog ref="dictItemsDialog" title="字典项" width="1400px">
<template #content> <template #content>
<dict-items :dict-id.sync="dictId" /> <dict-items :dict-id.sync="dictId" />
</template> </template>
</pd-dialog> </mb-dialog>
</div> </div>
</template> </template>

View File

@ -66,11 +66,11 @@
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
<pd-dialog ref="iconDialog"> <mb-dialog ref="iconDialog">
<template #content> <template #content>
<menu-icons :select-icon="selectIcon" /> <menu-icons :select-icon="selectIcon" />
</template> </template>
</pd-dialog> </mb-dialog>
</div> </div>
</template> </template>

View File

@ -22,13 +22,13 @@
<el-button type="primary" icon="el-icon-sort" plain @click="expand">展开/折叠</el-button> <el-button type="primary" icon="el-icon-sort" plain @click="expand">展开/折叠</el-button>
</el-row> </el-row>
<pd-table ref="table" v-bind="tableOptions" v-if="menuData && menuData.length > 0 && refreshTable" /> <mb-table ref="table" v-bind="tableOptions" v-if="menuData && menuData.length > 0 && refreshTable" />
<pd-dialog ref="menuFormDialog" width="1050px" :title="dialogTitle" @confirm-click="$refs.menuForm.save()"> <mb-dialog ref="menuFormDialog" width="1050px" :title="dialogTitle" @confirm-click="$refs.menuForm.save()">
<template #content> <template #content>
<menu-form ref="menuForm" :menu-tree="menuTree" @reload-table="reloadTable" /> <menu-form ref="menuForm" :menu-tree="menuTree" @reload-table="reloadTable" />
</template> </template>
</pd-dialog> </mb-dialog>
</div> </div>
</template> </template>

View File

@ -28,15 +28,15 @@
<el-button type="primary" icon="el-icon-sort" plain @click="expand">展开/折叠</el-button> <el-button type="primary" icon="el-icon-sort" plain @click="expand">展开/折叠</el-button>
</el-row> </el-row>
<pd-table ref="table" v-bind="tableOptions" v-if="officeData && officeData.length > 0 && refreshTable" /> <mb-table ref="table" v-bind="tableOptions" v-if="officeData && officeData.length > 0 && refreshTable" />
<pd-dialog ref="officeFormDialog" width="1050px" :title="dialogTitle" @confirm-click="save()"> <mb-dialog ref="officeFormDialog" width="1050px" :title="dialogTitle" @confirm-click="save()">
<template #content> <template #content>
<el-form ref="dataForm" :rules="rules" :model="temp" label-position="right" label-width="80px" style="width: 900px; margin-left:50px;"> <el-form ref="dataForm" :rules="rules" :model="temp" label-position="right" label-width="80px" style="width: 900px; margin-left:50px;">
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="机构类型" prop="type"> <el-form-item label="机构类型" prop="type">
<pd-select v-model="temp.type" type="office_type" width="100%" /> <mb-select v-model="temp.type" type="office_type" width="100%" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
@ -66,7 +66,7 @@
</el-row> </el-row>
</el-form> </el-form>
</template> </template>
</pd-dialog> </mb-dialog>
</div> </div>
</template> </template>

View File

@ -1,5 +1,5 @@
<template> <template>
<pd-tree ref="tree" :el="{ 'show-checkbox': true }" url="menu/tree" :search="true" search-width="230px" :select-values.sync="menus" /> <mb-tree ref="tree" :el="{ 'show-checkbox': true }" url="menu/tree" :search="true" search-width="230px" :select-values.sync="menus" />
</template> </template>
<script> <script>

View File

@ -1,7 +1,7 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<div class="filter-container"> <div class="filter-container">
<el-form :inline="true"> <el-form :inline="true" @keyup.enter.native="reloadTable">
<el-form-item label="角色名称"> <el-form-item label="角色名称">
<el-input v-model="tableOptions.where.name" placeholder="请输入角色名称" style="width: 200px;" class="filter-item" /> <el-input v-model="tableOptions.where.name" placeholder="请输入角色名称" style="width: 200px;" class="filter-item" />
</el-form-item> </el-form-item>
@ -20,9 +20,9 @@
</el-button> </el-button>
</el-row> </el-row>
<pd-table ref="table" v-bind="tableOptions" /> <mb-table ref="table" v-bind="tableOptions" />
<pd-dialog ref="roleFormDialog" :title="dialogTitle" width="1000px" @confirm-click="save()"> <mb-dialog ref="roleFormDialog" :title="dialogTitle" width="1000px" @confirm-click="save()">
<template #content> <template #content>
<el-form ref="dataForm" :rules="rules" :model="temp" label-position="right" label-width="120px" style="width: 900px;"> <el-form ref="dataForm" :rules="rules" :model="temp" label-position="right" label-width="120px" style="width: 900px;">
<el-row :gutter="24"> <el-row :gutter="24">
@ -52,25 +52,25 @@
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="菜单权限" prop="menus"> <el-form-item label="菜单权限" prop="menus">
<pd-tree ref="tree" :el="{ 'show-checkbox': true }" max-height="320px" url="menu/tree" :search="true" :select-values.sync="temp.menus" /> <mb-tree ref="tree" :el="{ 'show-checkbox': true }" max-height="320px" url="menu/tree" :search="true" :select-values.sync="temp.menus" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="数据权限" prop="permission"> <el-form-item label="数据权限" prop="permission">
<pd-select v-model="temp.permission" :data="permissionData" /> <mb-select v-model="temp.permission" :data="permissionData" />
<pd-tree v-if="temp.permission == 1" max-height="320px" :el="{ 'check-strictly': true, 'show-checkbox': true }" ref="office" url="office/tree" :select-values.sync="temp.offices" /> <mb-tree v-if="temp.permission == 1" max-height="320px" :el="{ 'check-strictly': true, 'show-checkbox': true }" ref="office" url="office/tree" :select-values.sync="temp.offices" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
</template> </template>
</pd-dialog> </mb-dialog>
<pd-dialog ref="assignPermissionsDialog" title="分配权限" width="750" @confirm-click="$refs.assignPermissions.save()"> <mb-dialog ref="assignPermissionsDialog" title="分配权限" width="750" @confirm-click="$refs.assignPermissions.save()">
<template #content> <template #content>
<role-assign-permissions ref="assignPermissions" :key="Math.random()" :id="temp.id" @close="() => { $refs.assignPermissionsDialog.hide(); temp.id = '' }" /> <role-assign-permissions ref="assignPermissions" :key="Math.random()" :id="temp.id" @close="() => { $refs.assignPermissionsDialog.hide(); temp.id = '' }" />
</template> </template>
</pd-dialog> </mb-dialog>
</div> </div>
</template> </template>

View File

@ -8,7 +8,7 @@
</el-form> </el-form>
</div> </div>
<pd-table ref="table" v-bind="tableOptions" /> <mb-table ref="table" v-bind="tableOptions" />
<el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible" :close-on-click-modal="false" width="700px"> <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible" :close-on-click-modal="false" width="700px">
<el-form ref="dataForm" :inline="true" :model="temp" label-position="right" label-width="100px" style="margin-left: 20px"> <el-form ref="dataForm" :inline="true" :model="temp" label-position="right" label-width="100px" style="margin-left: 20px">

View File

@ -32,7 +32,7 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="选择角色" prop="roles"> <el-form-item label="选择角色" prop="roles">
<pd-select v-model="temp.roles" url="role/list?size=999999" labelField="name" valueField="id" :el="{ multiple: true }" /> <mb-select v-model="temp.roles" url="role/list?size=999999" labelField="name" valueField="id" :el="{ multiple: true }" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>

View File

@ -13,11 +13,11 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<div class="left"> <div class="left">
<pd-tree url="office/tree" :el="{ 'expand-on-click-node': false,'show-checkbox': true }" :expand="false" :search="true" search-width="100%" :checked="false" @check-change="checkChange" /> <mb-tree url="office/tree" :el="{ 'expand-on-click-node': false,'show-checkbox': true }" :expand="false" :search="true" search-width="100%" :checked="false" @check-change="checkChange" />
</div> </div>
<div class="right"> <div class="right">
<div class="filter-container"> <div class="filter-container">
<el-form :inline="true"> <el-form :inline="true" @keyup.enter.native="reloadTable">
<el-form-item label="登录名称"> <el-form-item label="登录名称">
<el-input v-model="tableOptions.where.username" placeholder="登录名称" style="width: 200px;" class="filter-item" /> <el-input v-model="tableOptions.where.username" placeholder="登录名称" style="width: 200px;" class="filter-item" />
</el-form-item> </el-form-item>
@ -40,16 +40,16 @@
<el-button v-permission="'user:save'" class="filter-item" type="primary" icon="el-icon-edit" @click="handleCreate"> <el-button v-permission="'user:save'" class="filter-item" type="primary" icon="el-icon-edit" @click="handleCreate">
添加 添加
</el-button> </el-button>
<pd-button :el="{ plain: true }" :request-url="'user/delete'" :btn-type="'delete'" :request-data="{ id: ids }" :after-handler="reloadTable" /> <mb-button :el="{ plain: true }" :request-url="'user/delete'" :btn-type="'delete'" :request-data="{ id: ids }" :after-handler="reloadTable" />
</el-row> </el-row>
<pd-table ref="table" v-bind="tableOptions" @selection-change="selectionChange" /> <mb-table ref="table" v-bind="tableOptions" @selection-change="selectionChange" />
<pd-dialog ref="userFormDialog" :title="dialogTitle" @confirm-click="$refs.userForm.save()" width="770px"> <mb-dialog ref="userFormDialog" :title="dialogTitle" @confirm-click="$refs.userForm.save()" width="770px">
<template #content> <template #content>
<user-form ref="userForm" :dialog-status="dialogTitle" @reload-table="reloadTable" /> <user-form ref="userForm" :dialog-status="dialogTitle" @reload-table="reloadTable" />
</template> </template>
</pd-dialog> </mb-dialog>
</div> </div>
<div class="clear"></div> <div class="clear"></div>
@ -59,11 +59,10 @@
<script> <script>
import UserForm from './user-form.vue' import UserForm from './user-form.vue'
import PdTree from "@/components/Psyduck/pd-tree";
export default { export default {
name: 'UserList', name: 'UserList',
components: {PdTree, UserForm }, components: { UserForm },
data() { data() {
return { return {
tableOptions: { tableOptions: {