|
@@ -0,0 +1,581 @@
|
|
|
+<template>
|
|
|
+ <div>
|
|
|
+ <ag-grid-layout
|
|
|
+ toolbar
|
|
|
+ :table-height="tableHeight"
|
|
|
+ theme="ag-theme-alpine"
|
|
|
+ :column-defs="columnDefs"
|
|
|
+ :row-data="rowData"
|
|
|
+ :locale-text="localeText"
|
|
|
+ :grid-options="gridOptions"
|
|
|
+ :default-col-def="defaultColDef"
|
|
|
+ :animate-rows="true"
|
|
|
+ :row-selection="rowSelection"
|
|
|
+ :enable-cell-change-flash="true"
|
|
|
+ @filterChanged="filterModifed"
|
|
|
+ @sortChanged="gridSortChange"
|
|
|
+ @grid-ready="onGridReady"
|
|
|
+ :getRowHeight="getRowHeight"
|
|
|
+ >
|
|
|
+ <!-- @rowDoubleClicked="getList"-->
|
|
|
+ <div slot="toolbar" class="inner-toolbar">
|
|
|
+ <div class="toolbar-search">
|
|
|
+ <en-table-search :placeholder="this.$t('action.keywords')" @search="handlerSearch"/>
|
|
|
+ </div>
|
|
|
+ <div class="toolbar-btns">
|
|
|
+ <el-button type="primary" size="mini" @click="createMessageType">{{
|
|
|
+ this.$t('mc.templateParamerModule.addTemplateParamer')
|
|
|
+ }}
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <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"
|
|
|
+ />
|
|
|
+ </ag-grid-layout>
|
|
|
+ <el-dialog :title.sync="formtitle" :visible.sync="formshow" width="35%">
|
|
|
+ <div>
|
|
|
+ <el-form ref="editform" :rules="rules" label-width="120px" :model="formmodel">
|
|
|
+
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item :label="this.$t('mc.templateParamerModule.paramerName')" prop="param_name">
|
|
|
+ <el-input
|
|
|
+ v-model="formmodel.param_name"
|
|
|
+ clearable
|
|
|
+ :maxlength="100"
|
|
|
+ :placeholder="this.$t('mc.templateParamerModule.paramerName')"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item :label="this.$t('mc.templateParamerModule.paramerPreInput')" prop="template_content">
|
|
|
+ <el-tag
|
|
|
+ :key="tag"
|
|
|
+ v-for="tag in dynamicTags"
|
|
|
+ closable
|
|
|
+ :disable-transitions="false"
|
|
|
+ @close="handleClose(tag)">
|
|
|
+ {{tag}}
|
|
|
+ </el-tag>
|
|
|
+ <el-input
|
|
|
+ class="input-new-tag"
|
|
|
+ v-if="inputVisible"
|
|
|
+ v-model="inputValue"
|
|
|
+ ref="saveTagInput"
|
|
|
+ size="small"
|
|
|
+ @keyup.enter.native="handleInputConfirm"
|
|
|
+ @blur="handleInputConfirm"
|
|
|
+ >
|
|
|
+ </el-input>
|
|
|
+ <el-button v-else class="button-new-tag" size="small" @click="showInput">{{$t('mc.templateParamerModule.addValue')}}</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="" prop="allow_input">
|
|
|
+ <el-checkbox v-model="formmodel.allow_input" @change="allowInputChange" :true-label="1" :false-label="0">
|
|
|
+ {{ this.$t('mc.templateParamerModule.allowInput') }}
|
|
|
+ </el-checkbox>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="" prop="bool_date">
|
|
|
+ <el-checkbox v-model="formmodel.bool_date" :true-label="1" @change="boolDateChange" :disabled="boolDateDisabled" :false-label="0">
|
|
|
+ {{ this.$t('mc.templateParamerModule.boolDate') }}
|
|
|
+ </el-checkbox>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="" prop="bool_time">
|
|
|
+ <el-checkbox v-model="formmodel.bool_time" :true-label="1" @change="boolTimeChange" :disabled="boolTimeDisabled" :false-label="0">
|
|
|
+ {{ this.$t('mc.templateParamerModule.boolTime') }}
|
|
|
+ </el-checkbox>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+
|
|
|
+ <!-- <el-form-item :label="this.$t('mc.messageTypeModule.openType')" prop="device_type">-->
|
|
|
+ <!-- <el-select v-model="formmodel.open_type"-->
|
|
|
+ <!-- :placeholder="this.$t('mc.messageTypeModule.openType')"-->
|
|
|
+ <!-- filterable clearable>-->
|
|
|
+ <!-- <el-option v-for="(item,index) in messageOpenTypeEnum" :key="index" :label="item.key"-->
|
|
|
+ <!-- :value="item.value"/>-->
|
|
|
+ <!-- </el-select>-->
|
|
|
+ <!-- </el-form-item>-->
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-form>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="formshow = false">{{ this.$t('action.cancel') }}</el-button>
|
|
|
+ <el-button type="primary" @click="handlerFormSubmit('editform')">{{ this.$t('action.yes') }}</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import ButtonCellRenderList from "@/components/AgGridCellRender/ButtonCellRenderList.vue";
|
|
|
+import ButtonCellRender from "@/components/AgGridCellRender/ButtonCellRender.vue";
|
|
|
+import TagsCellRender from "@/components/AgGridCellRender/TagsCellRender.vue";
|
|
|
+import ListFilter from "@/components/AgGridCustomFilter/ListFilter.vue";
|
|
|
+import RadioFilter from "@/components/AgGridCustomFilter/RadioFilter.vue";
|
|
|
+import {AG_GRID_LOCALE_CN} from "@/utils/AgGridVueLocaleCn";
|
|
|
+import * as API_TemplateParamer from "@/api/template_paramer";
|
|
|
+import {unix2Date} from "@/utils/Foundation";
|
|
|
+
|
|
|
+export default {
|
|
|
+ name: "index",
|
|
|
+ components: {ButtonCellRenderList, ButtonCellRender, ListFilter, RadioFilter,TagsCellRender},
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ tableData: [],
|
|
|
+ /** 列表参数 */
|
|
|
+ params: {
|
|
|
+ page_size: 20,
|
|
|
+ page_no: 1,
|
|
|
+ fixedCondition: null
|
|
|
+ },
|
|
|
+ /** 新建组织弹出参数 **/
|
|
|
+ formtitle: this.$t('mc.templateParamerModule.addParamer'),
|
|
|
+ formshow: false,
|
|
|
+ /** 频道订阅设置 */
|
|
|
+ formSubscribe: false,
|
|
|
+ formmodel: {},
|
|
|
+ dynamicTags:[],
|
|
|
+ inputVisible: false,
|
|
|
+ inputValue: '',
|
|
|
+ boolDateDisabled:false,
|
|
|
+ boolTimeDisabled:false,
|
|
|
+ rules: {
|
|
|
+ param_name: [
|
|
|
+ {required: true, message: this.$t('mc.templateParamerModule.paramNameRequired'), trigger: 'blur'}
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ boolTransfer: [
|
|
|
+ {key: this.$t('mc.templateParamerModule.yes'), value: 1},
|
|
|
+ {key: this.$t('mc.templateParamerModule.no'), value: 0}
|
|
|
+ ],
|
|
|
+ /** ag-grid参数 **/
|
|
|
+ pageData: [],
|
|
|
+ loading: false,
|
|
|
+ columnDefs: null,
|
|
|
+ rowData: null,
|
|
|
+ defaultColDef: null,
|
|
|
+ gridOptions: null,
|
|
|
+ gridApi: null,
|
|
|
+ columnApi: null,
|
|
|
+ localeText: AG_GRID_LOCALE_CN,
|
|
|
+ filterState: null,
|
|
|
+ rowSelection: null,
|
|
|
+ frameworkComponents: null
|
|
|
+ }
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ tableHeight() {
|
|
|
+ return this.mainAreaHeight - 130
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
+ beforeMount() {
|
|
|
+ this.gridOptions = {
|
|
|
+
|
|
|
+ }
|
|
|
+ this.columnDefs = [
|
|
|
+ {
|
|
|
+ headerName: '#',
|
|
|
+ headerCheckboxSelection: true,
|
|
|
+ headerCheckboxSelectionFilteredOnly: true,
|
|
|
+ checkboxSelection: true,
|
|
|
+ sortable: false, filter: false,
|
|
|
+ width: 100,
|
|
|
+ resizable: false,
|
|
|
+ valueGetter: this.hashValueGetter
|
|
|
+ },
|
|
|
+ {headerName: 'ID', field: 'id', sortable: true, filter: 'agNumberColumnFilter', width: 130},
|
|
|
+ {
|
|
|
+ headerName: this.$t('mc.templateParamerModule.paramerName'),
|
|
|
+ field: 'param_name',
|
|
|
+ filter: 'agNumberColumnFilter',
|
|
|
+ sortable: true,
|
|
|
+ width: 150
|
|
|
+ },
|
|
|
+ {
|
|
|
+ headerName: this.$t('mc.templateParamerModule.paramerPreInput'),
|
|
|
+ field: 'pre_input_option',
|
|
|
+ sortable: true,
|
|
|
+ filter: 'agTextColumnFilter',
|
|
|
+ flex: 1,
|
|
|
+ autoHeight:true,
|
|
|
+ wrapText:true,
|
|
|
+ cellRendererFramework: 'TagsCellRender',
|
|
|
+ cellRendererParams:param => {
|
|
|
+ return {
|
|
|
+ tagType:'primary',
|
|
|
+ tagList: JSON.parse(param.value)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ headerName: this.$t('mc.templateParamerModule.allowInput'),
|
|
|
+ field: 'allow_input',
|
|
|
+ sortable: true,
|
|
|
+ filterFramework: 'RadioFilter',
|
|
|
+ filterParams: {
|
|
|
+ listData: this.boolTransfer
|
|
|
+ },
|
|
|
+ width: 150,
|
|
|
+ cellRenderer: this.booleanFormatter
|
|
|
+ },
|
|
|
+ {
|
|
|
+ headerName: this.$t('mc.templateParamerModule.boolDate'),
|
|
|
+ field: 'bool_date',
|
|
|
+ sortable: true,
|
|
|
+ filterFramework: 'RadioFilter',
|
|
|
+ filterParams: {
|
|
|
+ listData: this.boolTransfer
|
|
|
+ },
|
|
|
+ width: 150,
|
|
|
+ cellRenderer: this.booleanFormatter
|
|
|
+ },
|
|
|
+ {
|
|
|
+ headerName: this.$t('mc.templateParamerModule.boolTime'),
|
|
|
+ field: 'bool_time',
|
|
|
+ sortable: true,
|
|
|
+ filterFramework: 'RadioFilter',
|
|
|
+ filterParams: {
|
|
|
+ listData: this.boolTransfer
|
|
|
+ },
|
|
|
+ width: 150,
|
|
|
+ cellRenderer: this.booleanFormatter
|
|
|
+ },
|
|
|
+ // lockPosition 锁定位置,会在第一列
|
|
|
+ // lockPinned = true 不能拖动然后固定
|
|
|
+ // resizeable 单元个大小是否可以调整
|
|
|
+
|
|
|
+ {
|
|
|
+ headerName: this.$t('action.handle'), field: 'id',
|
|
|
+ cellRendererFramework: 'ButtonCellRenderList',
|
|
|
+ cellRendererParams: param => {
|
|
|
+ return {
|
|
|
+ list: [
|
|
|
+ {
|
|
|
+ onClick: this.handleEdit,
|
|
|
+ label: this.$t('action.edit'),
|
|
|
+ buttonType: 'primary',
|
|
|
+ buttonSize: 'mini'
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ onClick: this.deleteSingle,
|
|
|
+ label: this.$t('action.delete'),
|
|
|
+ buttonType: 'danger',
|
|
|
+ buttonSize: 'mini',
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ },
|
|
|
+ filter: false,
|
|
|
+ pinned: 'right',
|
|
|
+ lockPinned: true,
|
|
|
+ minWidth: 200,
|
|
|
+ resizable: false,
|
|
|
+ sortable: false
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ this.defaultColDef = {
|
|
|
+ sortable: true,
|
|
|
+ resizable: true,
|
|
|
+ comparator: this.dateCustomComparator,
|
|
|
+ filterParams: {
|
|
|
+ debounceMs: 200,
|
|
|
+ newRowsAction: 'keep',
|
|
|
+ textCustomComparator: this.textCustomComparator,
|
|
|
+ comparator: this.dateCustomComparator
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.rowSelection = 'multiple'
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ window.onresize = this.windowResize
|
|
|
+ this.gridApi = this.gridOptions.api
|
|
|
+ this.gridColumnApi = this.gridOptions.columnApi
|
|
|
+ // 设置默认排序字段,应用列状态之后会触发 gridSortChange 函数,会调用getlist,后面不需要再调用this.getlist
|
|
|
+ this.gridColumnApi.applyColumnState({
|
|
|
+ state: [
|
|
|
+ {
|
|
|
+ colId: 'id',
|
|
|
+ sort: 'asc'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ })
|
|
|
+
|
|
|
+ },
|
|
|
+
|
|
|
+ methods: {
|
|
|
+ onGridReady(params) {
|
|
|
+ this.gridApi = params.api;
|
|
|
+ console.log(this.gridApi)
|
|
|
+ this.gridApi.resetRowHeights()
|
|
|
+ },
|
|
|
+ windowResize() {
|
|
|
+ this.$set(this, 'mainAreaHeight', Number(document.documentElement.clientHeight) - 84)
|
|
|
+ },
|
|
|
+ getRowHeight(param){
|
|
|
+ return 60
|
|
|
+ },
|
|
|
+ handlerDelete(ids) {
|
|
|
+ this.$confirm(this.$t('action.sureDelete'), this.$t('action.waring'), {
|
|
|
+ confirmButtonText: this.$t('action.yes'),
|
|
|
+ cancelButtonText: this.$t('action.cancel'),
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ API_TemplateParamer.remove(ids).then(
|
|
|
+ response => {
|
|
|
+ this.getList()
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: this.$t('action.deleted')
|
|
|
+ })
|
|
|
+ }
|
|
|
+ ).catch(response => {
|
|
|
+ console.log(response)
|
|
|
+ // this.$message({
|
|
|
+ // type: 'error',
|
|
|
+ // message: response
|
|
|
+ // })
|
|
|
+ })
|
|
|
+ }).catch(() => {
|
|
|
+ this.$message({
|
|
|
+ type: 'info',
|
|
|
+ message: this.$t('action.cancelDelete')
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+ deleteSingle(row) {
|
|
|
+ this.handlerDelete(row.id)
|
|
|
+ },
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 创建 消息类型
|
|
|
+ */
|
|
|
+ createMessageType() {
|
|
|
+ this.formshow = true
|
|
|
+ this.formmodel = {
|
|
|
+
|
|
|
+ }
|
|
|
+ this.dynamicTags=[]
|
|
|
+ this.formtitle=this.$t('mc.templateParamerModule.addParamer')
|
|
|
+ },
|
|
|
+ /** 分页大小发生改变 */
|
|
|
+ handlePageSizeChange(size) {
|
|
|
+ this.params.page_size = size
|
|
|
+ this.getList()
|
|
|
+ },
|
|
|
+
|
|
|
+ /** 分页页数发生改变 */
|
|
|
+ handlePageCurrentChange(page) {
|
|
|
+ this.params.page_no = page
|
|
|
+ this.getList()
|
|
|
+ },
|
|
|
+ booleanFormatter(params) {
|
|
|
+ if (params.value === null || params.value === undefined) return ''
|
|
|
+ else{
|
|
|
+ return params.value ? `<span style="color:green;">${this.$t('mc.templateParamerModule.yes')}</span>` :`<span style="color:red;">${this.$t('mc.templateParamerModule.no')}</span>`
|
|
|
+ }
|
|
|
+ },
|
|
|
+ /** 加载列表数据 */
|
|
|
+ getList() {
|
|
|
+ this.loading = true
|
|
|
+ const param = this.MixinClone(this.params)
|
|
|
+ this.gridApi.showLoadingOverlay()
|
|
|
+ const _this=this
|
|
|
+ API_TemplateParamer.getList(param).then(response => {
|
|
|
+ this.loading = false
|
|
|
+ // this.tableData = [...response.data]
|
|
|
+ this.pageData = {
|
|
|
+ page_no: response.page_no,
|
|
|
+ page_size: response.page_size,
|
|
|
+ data_total: response.data_total
|
|
|
+ }
|
|
|
+ this.$nextTick(() => {
|
|
|
+ const node = this.gridApi.getDisplayedRowAtIndex(0)
|
|
|
+ if (node !== null && node !== undefined) {
|
|
|
+ node.setSelected(true)
|
|
|
+ }
|
|
|
+
|
|
|
+ })
|
|
|
+ this.rowData = [...response.data]
|
|
|
+
|
|
|
+
|
|
|
+ }).catch(() => {
|
|
|
+ this.loading = false
|
|
|
+ })
|
|
|
+ },
|
|
|
+ /** 处理搜索 */
|
|
|
+ handlerSearch(keywords) {
|
|
|
+ this.params.query = keywords
|
|
|
+ this.getList()
|
|
|
+ },
|
|
|
+ /** 处理字段排序 */
|
|
|
+ tableSort(column) {
|
|
|
+ if (column.order !== null) {
|
|
|
+ this.params.sort = column.prop
|
|
|
+ this.params.dir = column.order === 'ascending' ? 'asc' : 'desc'
|
|
|
+ } else {
|
|
|
+ this.params.sort = null
|
|
|
+ this.params.dir = null
|
|
|
+ }
|
|
|
+ this.getList()
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * 格式化unix时间戳
|
|
|
+ **/
|
|
|
+ unixDateFormatter(param) {
|
|
|
+ if (!param.value) return ''
|
|
|
+ return unix2Date(param.value * 1000)
|
|
|
+ },
|
|
|
+
|
|
|
+ gridSortChange(param) {
|
|
|
+ const columnState = param.columnApi.getColumnState()
|
|
|
+ // 排序状态
|
|
|
+ const sortState = columnState.filter(function (s) {
|
|
|
+ return s.sort != null
|
|
|
+ }).map(function (s) {
|
|
|
+ return {
|
|
|
+ colId: s.colId,
|
|
|
+ sort: s.sort,
|
|
|
+ sortIndex: s.sortIndex
|
|
|
+ }
|
|
|
+ }).sort(function (a, b) {
|
|
|
+ return a.sortIndex - b.sortIndex
|
|
|
+ })
|
|
|
+ if (sortState.length > 0) {
|
|
|
+ if (sortState.length === 1) {
|
|
|
+ this.params.sort = sortState[0].colId
|
|
|
+ this.params.dir = sortState[0].sort
|
|
|
+ } else {
|
|
|
+ let sortstring = ''
|
|
|
+ sortState.forEach(function (item) {
|
|
|
+ sortstring += item.colId + ' ' + item.sort + ','
|
|
|
+ })
|
|
|
+ this.params.sort = sortstring.substring(0, sortstring.length - 1)
|
|
|
+ this.params.dir = ' '
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ delete this.params.sort
|
|
|
+ delete this.params.dir
|
|
|
+ }
|
|
|
+ this.getList()
|
|
|
+ },
|
|
|
+
|
|
|
+ filterModifed(param) { // todo 通过转换后的数值过滤,需要转回原始数值
|
|
|
+ var model = param.api.getFilterModel()
|
|
|
+ this.params.filter = JSON.stringify(model)
|
|
|
+ this.getList()
|
|
|
+ },
|
|
|
+
|
|
|
+ handleEdit(row) {
|
|
|
+ this.formtitle = this.$t('mc.templateParamerModule.editParamer')
|
|
|
+ this.formmodel = {
|
|
|
+ ...row
|
|
|
+ }
|
|
|
+ this.dynamicTags = JSON.parse(row.pre_input_option)
|
|
|
+ this.allowInputChange(this.formmodel.allow_input)
|
|
|
+ this.formshow = true
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * 提交新增表单
|
|
|
+ * @param formname
|
|
|
+ */
|
|
|
+ handlerFormSubmit(formName) {
|
|
|
+ this.$refs[formName].validate((valid) => {
|
|
|
+ if (valid) {
|
|
|
+ this.formmodel.pre_input_option = JSON.stringify(this.dynamicTags)
|
|
|
+ if (!this.formmodel.id) {
|
|
|
+ /** 新增 */
|
|
|
+ API_TemplateParamer.add(this.formmodel).then(() => {
|
|
|
+ this.formshow = false
|
|
|
+ this.$message.success(this.$t('action.addSuccess'))
|
|
|
+ this.getList()
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ API_TemplateParamer.update(this.formmodel.id, this.formmodel).then(() => {
|
|
|
+ this.formshow = false
|
|
|
+ this.$message.success(this.$t('action.editSuccess'))
|
|
|
+ this.getList()
|
|
|
+ })
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.$message.error(this.$t('action.fromError'))
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ handleClose(tag) {
|
|
|
+ this.dynamicTags.splice(this.dynamicTags.indexOf(tag), 1);
|
|
|
+ },
|
|
|
+
|
|
|
+ showInput() {
|
|
|
+ this.inputVisible = true;
|
|
|
+ this.$nextTick(_ => {
|
|
|
+ this.$refs.saveTagInput.$refs.input.focus();
|
|
|
+ });
|
|
|
+ },
|
|
|
+ allowInputChange(value){
|
|
|
+
|
|
|
+ if(!value){
|
|
|
+ this.formmodel.bool_date=false
|
|
|
+ this.formmodel.bool_time=false
|
|
|
+ this.boolDateDisabled=true
|
|
|
+ this.boolTimeDisabled=true
|
|
|
+ }else{
|
|
|
+ this.boolDateDisabled=false
|
|
|
+ this.boolTimeDisabled=false
|
|
|
+ }
|
|
|
+ },
|
|
|
+ boolDateChange(value){
|
|
|
+ if(value){
|
|
|
+ this.formmodel.bool_time=false
|
|
|
+ }
|
|
|
+ },
|
|
|
+ boolTimeChange(value) {
|
|
|
+ if (value) {
|
|
|
+ this.formmodel.bool_date = false
|
|
|
+ }
|
|
|
+ },
|
|
|
+ handleInputConfirm() {
|
|
|
+ let inputValue = this.inputValue;
|
|
|
+ if (inputValue) {
|
|
|
+ this.dynamicTags.push(inputValue);
|
|
|
+ }
|
|
|
+ this.inputVisible = false;
|
|
|
+ this.inputValue = '';
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+</script>
|
|
|
+
|
|
|
+
|
|
|
+<style scoped>
|
|
|
+.el-tag + .el-tag {
|
|
|
+ margin-left: 10px;
|
|
|
+}
|
|
|
+.button-new-tag {
|
|
|
+ margin-left: 10px;
|
|
|
+ height: 32px;
|
|
|
+ line-height: 30px;
|
|
|
+ padding-top: 0;
|
|
|
+ padding-bottom: 0;
|
|
|
+}
|
|
|
+.input-new-tag {
|
|
|
+ width: 90px;
|
|
|
+ margin-left: 10px;
|
|
|
+ vertical-align: bottom;
|
|
|
+}
|
|
|
+</style>
|