|
@@ -13,18 +13,18 @@
|
|
|
|
|
|
<el-aside width="300px" style="background-color: rgb(238, 241, 246)">
|
|
<el-aside width="300px" style="background-color: rgb(238, 241, 246)">
|
|
<el-table
|
|
<el-table
|
|
- ref="nurseConfigTable"
|
|
|
|
- v-loading="listLoading"
|
|
|
|
- :data="tagList1"
|
|
|
|
- highlight-current-row
|
|
|
|
- :height="tableHeight-40"
|
|
|
|
- stripe
|
|
|
|
- @row-click="tableClick"
|
|
|
|
|
|
+ ref="nurseConfigTable"
|
|
|
|
+ v-loading="listLoading"
|
|
|
|
+ :data="tagList1"
|
|
|
|
+ highlight-current-row
|
|
|
|
+ :height="tableHeight-40"
|
|
|
|
+ stripe
|
|
|
|
+ @row-click="tableClick"
|
|
>
|
|
>
|
|
- <el-table-column prop="config_name" :label="this.$t('nurseConfig.configName')" width="120px" />
|
|
|
|
|
|
+ <el-table-column prop="config_name" :label="this.$t('nurseConfig.configName')" width="120px"/>
|
|
<el-table-column
|
|
<el-table-column
|
|
- width="160px"
|
|
|
|
- align="right"
|
|
|
|
|
|
+ width="160px"
|
|
|
|
+ align="right"
|
|
>
|
|
>
|
|
<template slot="header" slot-scope="scope">
|
|
<template slot="header" slot-scope="scope">
|
|
<el-button type="primary" size="mini" @click="addNurseConfig(1,null,1)">{{ configAdd }}</el-button>
|
|
<el-button type="primary" size="mini" @click="addNurseConfig(1,null,1)">{{ configAdd }}</el-button>
|
|
@@ -38,18 +38,18 @@
|
|
<!-- @click.native.prevent="addNurseConfig(scope.$index, scope.row,2)"-->
|
|
<!-- @click.native.prevent="addNurseConfig(scope.$index, scope.row,2)"-->
|
|
<!-- />-->
|
|
<!-- />-->
|
|
<el-button
|
|
<el-button
|
|
- type="primary"
|
|
|
|
- icon="el-icon-edit"
|
|
|
|
- circle
|
|
|
|
- size="mini"
|
|
|
|
- @click.native.prevent="updateRow(scope.$index, scope.row, 1)"
|
|
|
|
|
|
+ type="primary"
|
|
|
|
+ icon="el-icon-edit"
|
|
|
|
+ circle
|
|
|
|
+ size="mini"
|
|
|
|
+ @click.native.prevent="updateRow(scope.$index, scope.row, 1)"
|
|
/>
|
|
/>
|
|
<el-button
|
|
<el-button
|
|
- type="danger"
|
|
|
|
- icon="el-icon-delete"
|
|
|
|
- circle
|
|
|
|
- size="mini"
|
|
|
|
- @click.native.prevent="deleteRow(scope.$index, scope.row,1)"
|
|
|
|
|
|
+ type="danger"
|
|
|
|
+ icon="el-icon-delete"
|
|
|
|
+ circle
|
|
|
|
+ size="mini"
|
|
|
|
+ @click.native.prevent="deleteRow(scope.$index, scope.row,1)"
|
|
/>
|
|
/>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
@@ -77,38 +77,41 @@
|
|
<!-- </el-table>-->
|
|
<!-- </el-table>-->
|
|
|
|
|
|
<ag-grid-layout
|
|
<ag-grid-layout
|
|
- toolbar
|
|
|
|
- :table-height="tableHeight-130"
|
|
|
|
- theme="ag-theme-alpine"
|
|
|
|
- :column-defs="columnDefs"
|
|
|
|
- :row-data="tagList2"
|
|
|
|
- :locale-text="localeText"
|
|
|
|
- :grid-options="gridOptions"
|
|
|
|
- :default-col-def="defaultColDef"
|
|
|
|
- :animate-rows="true"
|
|
|
|
- :row-selection="rowSelection"
|
|
|
|
- @filterChanged="filterModifed"
|
|
|
|
- @sortChanged="gridSortChange"
|
|
|
|
|
|
+ toolbar
|
|
|
|
+ :table-height="tableHeight-130"
|
|
|
|
+ theme="ag-theme-alpine"
|
|
|
|
+ :column-defs="columnDefs"
|
|
|
|
+ :row-data="tagList2"
|
|
|
|
+ :locale-text="localeText"
|
|
|
|
+ :grid-options="gridOptions"
|
|
|
|
+ :default-col-def="defaultColDef"
|
|
|
|
+ :animate-rows="true"
|
|
|
|
+ :row-selection="rowSelection"
|
|
|
|
+ @filterChanged="filterModifed"
|
|
|
|
+ @sortChanged="gridSortChange"
|
|
>
|
|
>
|
|
<!-- @rowDoubleClicked="getList"-->
|
|
<!-- @rowDoubleClicked="getList"-->
|
|
<div slot="toolbar" class="inner-toolbar">
|
|
<div slot="toolbar" class="inner-toolbar">
|
|
<div class="toolbar-search">
|
|
<div class="toolbar-search">
|
|
- <en-table-search :placeholder="this.$t('action.keywords')" @search="handlerSearch" />
|
|
|
|
|
|
+ <en-table-search :placeholder="this.$t('action.keywords')" @search="handlerSearch"/>
|
|
</div>
|
|
</div>
|
|
<div class="toolbar-btns">
|
|
<div class="toolbar-btns">
|
|
- <el-button type="primary" size="mini" @click="addOption">{{ this.$t('nurseConfig.optionAdd') }}</el-button>
|
|
|
|
|
|
+ <el-button type="primary" size="mini" @click="addOption">{{
|
|
|
|
+ this.$t('nurseConfig.optionAdd')
|
|
|
|
+ }}
|
|
|
|
+ </el-button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<el-pagination
|
|
<el-pagination
|
|
- v-if="pageData"
|
|
|
|
- slot="pagination"
|
|
|
|
- :current-page="pageData.page_no"
|
|
|
|
- :page-sizes="[10, 20, 50, 100]"
|
|
|
|
- :page-size="pageData.page_size"
|
|
|
|
- layout="total, sizes, prev, pager, next, jumper"
|
|
|
|
- :total="pageData.data_total"
|
|
|
|
- @size-change="handlePageSizeChange"
|
|
|
|
- @current-change="handlePageCurrentChange"
|
|
|
|
|
|
+ v-if="pageData"
|
|
|
|
+ slot="pagination"
|
|
|
|
+ :current-page="pageData.page_no"
|
|
|
|
+ :page-sizes="[10, 20, 50, 100]"
|
|
|
|
+ :page-size="pageData.page_size"
|
|
|
|
+ layout="total, sizes, prev, pager, next, jumper"
|
|
|
|
+ :total="pageData.data_total"
|
|
|
|
+ @size-change="handlePageSizeChange"
|
|
|
|
+ @current-change="handlePageCurrentChange"
|
|
/>
|
|
/>
|
|
</ag-grid-layout>
|
|
</ag-grid-layout>
|
|
</el-main>
|
|
</el-main>
|
|
@@ -118,53 +121,118 @@
|
|
<el-dialog v-model="addFormVisible" :title="myTitle" :visible.sync="addFormVisible" :close-on-click-modal="false">
|
|
<el-dialog v-model="addFormVisible" :title="myTitle" :visible.sync="addFormVisible" :close-on-click-modal="false">
|
|
<el-form ref="addForm" :model="addForm" label-width="140px" :rules="addFormRules">
|
|
<el-form ref="addForm" :model="addForm" label-width="140px" :rules="addFormRules">
|
|
<el-form-item :label="this.$t('nurseConfig.configName')" prop="config_name">
|
|
<el-form-item :label="this.$t('nurseConfig.configName')" prop="config_name">
|
|
- <el-input v-model="addForm.config_name" maxlength="100" />
|
|
|
|
|
|
+ <el-input v-model="addForm.config_name" maxlength="100"/>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item :label="this.$t('action.sort')" prop="index_no">
|
|
<el-form-item :label="this.$t('action.sort')" prop="index_no">
|
|
- <el-input-number v-model="addForm.index_no" :min="1" :max="100" />
|
|
|
|
|
|
+ <el-input-number v-model="addForm.index_no" :min="1" :max="100"/>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item prop="basic">
|
|
|
|
- <el-checkbox v-model="addForm.basic">{{this.$t('nurseConfig.basic')}}</el-checkbox>
|
|
|
|
|
|
+ <el-form-item :label="this.$t('wu20240530.nurseConfig.default_icon')" prop="default_icon">
|
|
|
|
+ <el-avatar shape="square" :size="32" fit="fill" @click.native="chooseImage('config')"
|
|
|
|
+ :src="addForm.default_icon"></el-avatar>
|
|
|
|
+ <el-button type="text" v-if="addForm.default_icon&&addForm.default_icon.length" @click="clearIcon('config')">
|
|
|
|
+ {{ $t('wu20240530.clear_icon') }}
|
|
|
|
+ </el-button>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item :label="this.$t('wu20240530.nurseConfig.default_content_show')" prop="default_content_show">
|
|
|
|
+ <el-radio-group v-model="addForm.default_content_show">
|
|
|
|
+ <el-radio :label="1">{{ $t('wu20240530.nurseConfig.icon_text') }}</el-radio>
|
|
|
|
+ <el-radio :label="2">{{ $t('wu20240530.nurseConfig.icon') }}</el-radio>
|
|
|
|
+ <el-radio :label="3">{{ $t('wu20240530.nurseConfig.text') }}</el-radio>
|
|
|
|
+ </el-radio-group>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item prop="basic">
|
|
|
|
+ <el-checkbox v-model="addForm.basic">{{ this.$t('nurseConfig.basic') }}</el-checkbox>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<el-form-item>
|
|
- <el-checkbox v-model="addForm.bool_critical">{{this.$t('nurseConfig.boolCritical')}}</el-checkbox>
|
|
|
|
|
|
+ <el-checkbox v-model="addForm.bool_critical">{{ this.$t('nurseConfig.boolCritical') }}</el-checkbox>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
<div slot="footer" class="dialog-footer">
|
|
<div slot="footer" class="dialog-footer">
|
|
<el-button @click.native="addFormVisible = false">{{ this.$t('action.cancel') }}</el-button>
|
|
<el-button @click.native="addFormVisible = false">{{ this.$t('action.cancel') }}</el-button>
|
|
- <el-button type="primary" :loading="addOptionLoading" @click.native="addSubmit">{{ this.$t('action.submit') }}</el-button>
|
|
|
|
|
|
+ <el-button type="primary" :loading="addOptionLoading" @click.native="addSubmit">{{
|
|
|
|
+ this.$t('action.submit')
|
|
|
|
+ }}
|
|
|
|
+ </el-button>
|
|
</div>
|
|
</div>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
<!--新增护理项界面-->
|
|
<!--新增护理项界面-->
|
|
- <el-dialog v-model="addFormOptionVisible" :title="myTitle" :visible.sync="addFormOptionVisible" :close-on-click-modal="false">
|
|
|
|
|
|
+ <el-dialog v-model="addFormOptionVisible" :title="myTitle" :visible.sync="addFormOptionVisible"
|
|
|
|
+ :close-on-click-modal="false">
|
|
<el-form ref="addOptionForm" :model="addOptionForm" label-width="140px" :rules="addFormRules">
|
|
<el-form ref="addOptionForm" :model="addOptionForm" label-width="140px" :rules="addFormRules">
|
|
<el-form-item :label="this.$t('nurseConfig.optionName')" prop="option_name">
|
|
<el-form-item :label="this.$t('nurseConfig.optionName')" prop="option_name">
|
|
- <el-input v-model="addOptionForm.option_name" maxlength="100" />
|
|
|
|
|
|
+ <el-input v-model="addOptionForm.option_name" maxlength="100"/>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item :label="this.$t('nurseConfig.optionColor')">
|
|
<el-form-item :label="this.$t('nurseConfig.optionColor')">
|
|
- <colorPicker v-model="addOptionForm.color_rgb" />
|
|
|
|
|
|
+ <colorPicker v-model="addOptionForm.color_rgb"/>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item :label="this.$t('wu20240530.nurseOption.icon_url')" prop="icon_url">
|
|
|
|
+ <el-avatar shape="square" :size="32" fit="fill" @click.native="chooseImage('option')"
|
|
|
|
+ :src="addOptionForm.icon_url"></el-avatar>
|
|
|
|
+ <el-button type="text" v-if="addOptionForm.icon_url&&addOptionForm.icon_url.length" @click="clearIcon('option')">清除图标
|
|
|
|
+ </el-button>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item :label="this.$t('wu20240530.nurseOption.content_show')" prop="content_show">
|
|
|
|
+ <el-radio-group v-model="addOptionForm.content_show">
|
|
|
|
+ <el-radio :label="1">{{ $t('wu20240530.nurseConfig.icon_text') }}</el-radio>
|
|
|
|
+ <el-radio :label="2">{{ $t('wu20240530.nurseConfig.icon') }}</el-radio>
|
|
|
|
+ <el-radio :label="3">{{ $t('wu20240530.nurseConfig.text') }}</el-radio>
|
|
|
|
+ </el-radio-group>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
<div slot="footer" class="dialog-footer">
|
|
<div slot="footer" class="dialog-footer">
|
|
<el-button @click.native="addFormOptionVisible = false">{{ this.$t('action.cancel') }}</el-button>
|
|
<el-button @click.native="addFormOptionVisible = false">{{ this.$t('action.cancel') }}</el-button>
|
|
- <el-button type="primary" :loading="addOptionLoading" @click.native="addOptionSubmit">{{ this.$t('action.submit') }}</el-button>
|
|
|
|
|
|
+ <el-button type="primary" :loading="addOptionLoading" @click.native="addOptionSubmit">
|
|
|
|
+ {{ this.$t('action.submit') }}
|
|
|
|
+ </el-button>
|
|
|
|
+ </div>
|
|
|
|
+ </el-dialog>
|
|
|
|
+
|
|
|
|
+ <el-dialog :visible.sync="customerFormVisible" class="customer-dialog" width="60%">
|
|
|
|
+ <div slot="title" style="display: none;">
|
|
</div>
|
|
</div>
|
|
|
|
+ <VueFinder id="vuefinder" :height="500" :select-button="handleSelectButton" theme="dark" :persist="true"
|
|
|
|
+ max-file-size="50 GB" path="" :request="fileServer"></VueFinder>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import { AG_GRID_LOCALE_CN } from '@/utils/AgGridVueLocaleCn'
|
|
|
|
-import { unix2Date } from '@/utils/Foundation'
|
|
|
|
|
|
+import {AG_GRID_LOCALE_CN} from '@/utils/AgGridVueLocaleCn'
|
|
|
|
+import {unix2Date} from '@/utils/Foundation'
|
|
import ButtonCellRender from '../../components/AgGridCellRender/ButtonCellRender'
|
|
import ButtonCellRender from '../../components/AgGridCellRender/ButtonCellRender'
|
|
import * as API_NcsNurseConfig from '@/api/ncs_nurse_config'
|
|
import * as API_NcsNurseConfig from '@/api/ncs_nurse_config'
|
|
import * as API_NcsNurseConfigOption from '@/api/ncs_nurse_config_option'
|
|
import * as API_NcsNurseConfigOption from '@/api/ncs_nurse_config_option'
|
|
|
|
|
|
export default {
|
|
export default {
|
|
name: 'NcsNurseConfigList',
|
|
name: 'NcsNurseConfigList',
|
|
- components: { ButtonCellRender },
|
|
|
|
|
|
+ components: {ButtonCellRender},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ fileServer: domain.fileServer,
|
|
|
|
+ customerFormVisible: false,
|
|
|
|
+ imageBlockId: '',
|
|
|
|
+ chooseType:'',
|
|
|
|
+ handleSelectButton: {
|
|
|
|
+ // show select button
|
|
|
|
+ active: true,
|
|
|
|
+ // allow multiple selection
|
|
|
|
+ multiple: false,
|
|
|
|
+ filters: ['png'],
|
|
|
|
+ // handle click event
|
|
|
|
+ click: (items, event) => {
|
|
|
|
+ if (!items.length) {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ this.customerFormVisible=false
|
|
|
|
+ if(this.chooseType=== 'config'){
|
|
|
|
+ this.addForm.default_icon = `${domain.fileServer}${items[0].href}`
|
|
|
|
+ console.log('addForm',this.addForm)
|
|
|
|
+ }else if (this.chooseType==='option'){
|
|
|
|
+ this.addOptionForm.icon_url=`${domain.fileServer}${items[0].href}`
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+
|
|
listLoading: false,
|
|
listLoading: false,
|
|
tagList1: [],
|
|
tagList1: [],
|
|
tagList2: [],
|
|
tagList2: [],
|
|
@@ -177,10 +245,10 @@ export default {
|
|
addLoading: false,
|
|
addLoading: false,
|
|
addFormRules: {
|
|
addFormRules: {
|
|
config_name: [
|
|
config_name: [
|
|
- { required: true, message: this.$t('nurseConfig.inputConfigName'), trigger: 'blur' }
|
|
|
|
|
|
+ {required: true, message: this.$t('nurseConfig.inputConfigName'), trigger: 'blur'}
|
|
],
|
|
],
|
|
option_name: [
|
|
option_name: [
|
|
- { required: true, message: this.$t('nurseConfig.inputOptionName'), trigger: 'blur' }
|
|
|
|
|
|
+ {required: true, message: this.$t('nurseConfig.inputOptionName'), trigger: 'blur'}
|
|
]
|
|
]
|
|
},
|
|
},
|
|
addFormOptionVisible: false,
|
|
addFormOptionVisible: false,
|
|
@@ -223,8 +291,7 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
beforeMount() {
|
|
beforeMount() {
|
|
- this.gridOptions = {
|
|
|
|
- }
|
|
|
|
|
|
+ this.gridOptions = {}
|
|
this.columnDefs = [
|
|
this.columnDefs = [
|
|
{
|
|
{
|
|
headerName: '#',
|
|
headerName: '#',
|
|
@@ -236,20 +303,28 @@ export default {
|
|
resizable: false,
|
|
resizable: false,
|
|
valueGetter: this.hashValueGetter
|
|
valueGetter: this.hashValueGetter
|
|
},
|
|
},
|
|
- { headerName: 'ID', field: 'id', sortable: true, filter: 'agNumberColumnFilter', width: 80 },
|
|
|
|
- { headerName: this.$t('nurseConfig.optionName'), field: 'option_name', sortable: true, flex: 1, filter: 'agTextColumnFilter', filterParams: {
|
|
|
|
- debounceMs: 200,
|
|
|
|
- newRowsAction: 'keep'
|
|
|
|
- }
|
|
|
|
|
|
+ {headerName: 'ID', field: 'id', sortable: true, filter: 'agNumberColumnFilter', width: 80},
|
|
|
|
+ {
|
|
|
|
+ headerName: this.$t('nurseConfig.optionName'),
|
|
|
|
+ field: 'option_name',
|
|
|
|
+ sortable: true,
|
|
|
|
+ flex: 1,
|
|
|
|
+ filter: 'agTextColumnFilter',
|
|
|
|
+ filterParams: {
|
|
|
|
+ debounceMs: 200,
|
|
|
|
+ newRowsAction: 'keep'
|
|
|
|
+ }
|
|
},
|
|
},
|
|
// lockPosition 锁定位置,会在第一列
|
|
// lockPosition 锁定位置,会在第一列
|
|
// lockPinned = true 不能拖动然后固定
|
|
// lockPinned = true 不能拖动然后固定
|
|
// resizeable 单元个大小是否可以调整
|
|
// resizeable 单元个大小是否可以调整
|
|
- { headerName: this.$t('nurseConfig.colorRgb'), field: 'color_rgb', sortable: true, filter: false,
|
|
|
|
|
|
+ {
|
|
|
|
+ headerName: this.$t('nurseConfig.colorRgb'), field: 'color_rgb', sortable: true, filter: false,
|
|
cellRenderer: this.colorFormatter
|
|
cellRenderer: this.colorFormatter
|
|
},
|
|
},
|
|
|
|
|
|
- { headerName: this.$t('action.edit'),
|
|
|
|
|
|
+ {
|
|
|
|
+ headerName: this.$t('action.edit'),
|
|
cellRendererFramework: 'ButtonCellRender',
|
|
cellRendererFramework: 'ButtonCellRender',
|
|
cellRendererParams: {
|
|
cellRendererParams: {
|
|
onClick: this.handEdit,
|
|
onClick: this.handEdit,
|
|
@@ -262,8 +337,10 @@ export default {
|
|
lockPinned: true,
|
|
lockPinned: true,
|
|
width: 100,
|
|
width: 100,
|
|
resizable: false,
|
|
resizable: false,
|
|
- sortable: false },
|
|
|
|
- { headerName: this.$t('action.delete'),
|
|
|
|
|
|
+ sortable: false
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ headerName: this.$t('action.delete'),
|
|
cellRendererFramework: 'ButtonCellRender',
|
|
cellRendererFramework: 'ButtonCellRender',
|
|
cellRendererParams: param => {
|
|
cellRendererParams: param => {
|
|
return {
|
|
return {
|
|
@@ -279,7 +356,8 @@ export default {
|
|
width: 100,
|
|
width: 100,
|
|
resizable: false,
|
|
resizable: false,
|
|
filter: false,
|
|
filter: false,
|
|
- sortable: false }
|
|
|
|
|
|
+ sortable: false
|
|
|
|
+ }
|
|
]
|
|
]
|
|
this.defaultColDef = {
|
|
this.defaultColDef = {
|
|
filter: 'agTextColumnFilter',
|
|
filter: 'agTextColumnFilter',
|
|
@@ -350,12 +428,14 @@ export default {
|
|
this.myTitle = this.$t('nurseConfig.configAdd')
|
|
this.myTitle = this.$t('nurseConfig.configAdd')
|
|
this.addFormVisible = true
|
|
this.addFormVisible = true
|
|
this.addForm = {
|
|
this.addForm = {
|
|
- index_no: 1
|
|
|
|
|
|
+ index_no: 1,
|
|
|
|
+ default_content_show: 3
|
|
}
|
|
}
|
|
} else if (type === 2) {
|
|
} else if (type === 2) {
|
|
this.addOptionForm = {
|
|
this.addOptionForm = {
|
|
option_name: null,
|
|
option_name: null,
|
|
- color_rgb: '#000000'
|
|
|
|
|
|
+ color_rgb: '#000000',
|
|
|
|
+ content_show: 3
|
|
}
|
|
}
|
|
this.pid = row.id
|
|
this.pid = row.id
|
|
this.myTitle = this.$t('nurseConfig.optionAdd')
|
|
this.myTitle = this.$t('nurseConfig.optionAdd')
|
|
@@ -363,7 +443,7 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
addOption() {
|
|
addOption() {
|
|
- this.addNurseConfig(null, { id: this.pid }, 2)
|
|
|
|
|
|
+ this.addNurseConfig(null, {id: this.pid}, 2)
|
|
},
|
|
},
|
|
addOptionSubmit() {
|
|
addOptionSubmit() {
|
|
const _this = this
|
|
const _this = this
|
|
@@ -433,13 +513,15 @@ export default {
|
|
this.addOredit = 'edit'
|
|
this.addOredit = 'edit'
|
|
this.myTitle = this.$t('nurseConfig.configEdit')
|
|
this.myTitle = this.$t('nurseConfig.configEdit')
|
|
if (type === 1) {
|
|
if (type === 1) {
|
|
- this.addForm = { ...row }
|
|
|
|
|
|
+ this.addForm = {...row, default_content_show: row.default_content_show||3}
|
|
this.addFormVisible = true
|
|
this.addFormVisible = true
|
|
} else {
|
|
} else {
|
|
this.addOptionForm = {
|
|
this.addOptionForm = {
|
|
id: row.id,
|
|
id: row.id,
|
|
option_name: row.option_name,
|
|
option_name: row.option_name,
|
|
- color_rgb: '#' + row.color_rgb
|
|
|
|
|
|
+ color_rgb: '#' + row.color_rgb,
|
|
|
|
+ icon_url: row.icon_url,
|
|
|
|
+ content_show: row.content_show||3
|
|
}
|
|
}
|
|
this.addFormOptionVisible = true
|
|
this.addFormOptionVisible = true
|
|
}
|
|
}
|
|
@@ -512,15 +594,15 @@ export default {
|
|
console.log('sortparam', param)
|
|
console.log('sortparam', param)
|
|
const columnState = param.columnApi.getColumnState()
|
|
const columnState = param.columnApi.getColumnState()
|
|
// 排序状态
|
|
// 排序状态
|
|
- const sortState = columnState.filter(function(s) {
|
|
|
|
|
|
+ const sortState = columnState.filter(function (s) {
|
|
return s.sort != null
|
|
return s.sort != null
|
|
- }).map(function(s) {
|
|
|
|
|
|
+ }).map(function (s) {
|
|
return {
|
|
return {
|
|
colId: s.colId,
|
|
colId: s.colId,
|
|
sort: s.sort,
|
|
sort: s.sort,
|
|
sortIndex: s.sortIndex
|
|
sortIndex: s.sortIndex
|
|
}
|
|
}
|
|
- }).sort(function(a, b) {
|
|
|
|
|
|
+ }).sort(function (a, b) {
|
|
return a.sortIndex - b.sortIndex
|
|
return a.sortIndex - b.sortIndex
|
|
})
|
|
})
|
|
if (sortState.length > 0) {
|
|
if (sortState.length > 0) {
|
|
@@ -529,7 +611,7 @@ export default {
|
|
this.params.dir = sortState[0].sort
|
|
this.params.dir = sortState[0].sort
|
|
} else {
|
|
} else {
|
|
let sortstring = ''
|
|
let sortstring = ''
|
|
- sortState.forEach(function(item) {
|
|
|
|
|
|
+ sortState.forEach(function (item) {
|
|
sortstring += item.colId + ' ' + item.sort + ','
|
|
sortstring += item.colId + ' ' + item.sort + ','
|
|
})
|
|
})
|
|
this.params.sort = sortstring.substring(0, sortstring.length - 1)
|
|
this.params.sort = sortstring.substring(0, sortstring.length - 1)
|
|
@@ -549,31 +631,47 @@ export default {
|
|
console.log('model', JSON.stringify(model))
|
|
console.log('model', JSON.stringify(model))
|
|
this.params.filter = JSON.stringify(model)
|
|
this.params.filter = JSON.stringify(model)
|
|
this.gettagList2()
|
|
this.gettagList2()
|
|
|
|
+ },
|
|
|
|
+ clearIcon(type) {
|
|
|
|
+ if(type==='config') {
|
|
|
|
+ this.addForm.default_icon = ''
|
|
|
|
+ }else if (type==='option'){
|
|
|
|
+ this.addOptionForm.icon_url = ''
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ chooseImage(type) {
|
|
|
|
+ this.customerFormVisible = true
|
|
|
|
+ this.chooseType = type
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style scoped>
|
|
<style scoped>
|
|
- .permission-container {
|
|
|
|
- padding: 10px;
|
|
|
|
- background-color: #fff;
|
|
|
|
- }
|
|
|
|
- .el-aside{
|
|
|
|
- padding: 8px 10px;
|
|
|
|
- }
|
|
|
|
- .mytable {
|
|
|
|
- width: 100%;
|
|
|
|
- padding: 20px;
|
|
|
|
- min-height: 480px;
|
|
|
|
- cursor: pointer;
|
|
|
|
- font-size: 16px;
|
|
|
|
- }
|
|
|
|
- /deep/ .colorBtn {
|
|
|
|
- width: 80px !important;
|
|
|
|
- height: 40px !important;
|
|
|
|
- }
|
|
|
|
- /deep/ .m-colorPicker .box.open{
|
|
|
|
- z-index: 1000 !important;
|
|
|
|
- }
|
|
|
|
|
|
+.permission-container {
|
|
|
|
+ padding: 10px;
|
|
|
|
+ background-color: #fff;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.el-aside {
|
|
|
|
+ padding: 8px 10px;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.mytable {
|
|
|
|
+ width: 100%;
|
|
|
|
+ padding: 20px;
|
|
|
|
+ min-height: 480px;
|
|
|
|
+ cursor: pointer;
|
|
|
|
+ font-size: 16px;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+/deep/ .colorBtn {
|
|
|
|
+ width: 80px !important;
|
|
|
|
+ height: 40px !important;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+/deep/ .m-colorPicker .box.open {
|
|
|
|
+ z-index: 1000 !important;
|
|
|
|
+}
|
|
</style>
|
|
</style>
|