diff --git a/src/utils/filter.js b/src/utils/filter.js index 5f10322..c8b889e 100644 --- a/src/utils/filter.js +++ b/src/utils/filter.js @@ -4,7 +4,7 @@ import moment from 'moment' import 'moment/locale/zh-cn' moment.locale('zh-cn') -Vue.filter('NumberFormat', function (value) { +Vue.filter('NumberFormat', function(value) { if (!value) { return '0' } @@ -12,11 +12,11 @@ Vue.filter('NumberFormat', function (value) { return intPartFormat }) -Vue.filter('dayjs', function (dataStr, pattern = 'YYYY-MM-DD HH:mm:ss') { +Vue.filter('dayjs', function(dataStr, pattern = 'YYYY-MM-DD HH:mm:ss') { return moment(dataStr).format(pattern) }) -Vue.filter('moment', function (dataStr, pattern = 'YYYY-MM-DD HH:mm:ss') { +Vue.filter('moment', function(dataStr, pattern = 'YYYY-MM-DD HH:mm:ss') { return moment(dataStr).format(pattern) }) @@ -26,14 +26,14 @@ Vue.filter('moment', function (dataStr, pattern = 'YYYY-MM-DD HH:mm:ss') { * @author yubaoshan * @date 2020-9-15 15:02:20 */ -Vue.filter('Fmoney', function (val) { +Vue.filter('Fmoney', function(val) { // eslint-disable-next-line no-useless-escape val = val.toString().replace(/\$|\,/g, '') if (isNaN(val)) { val = '0' } // eslint-disable-next-line eqeqeq - const sign = (val == (val = Math.abs(val))) + const sign = val == (val = Math.abs(val)) val = Math.floor(val * 100 + 0.50000000001) let cents = val % 100 val = Math.floor(val / 100).toString() @@ -44,7 +44,7 @@ Vue.filter('Fmoney', function (val) { for (let i = 0; i < Math.floor((val.length - (1 + i)) / 3); I++) { val = val.substring(0, val.length - (4 * i + 3)) + ',' + val.substring(val.length - (4 * i + 3)) } - return (((sign) ? '' : '-') + val + '.' + cents) + return (sign ? '' : '-') + val + '.' + cents }) /** @@ -53,7 +53,7 @@ Vue.filter('Fmoney', function (val) { * @author yubaoshan * @date 2020-9-15 15:02:20 */ -Vue.filter('dictType', function (code, value) { +Vue.filter('dictType', function(code, value) { const dictTypeTree = Vue.ls.get(DICT_TYPE_TREE_DATA) if (dictTypeTree === undefined) { return '需重新登录' @@ -77,7 +77,7 @@ Vue.filter('dictType', function (code, value) { * @author yubaoshan * @date 2020-9-19 22:40:22 */ -Vue.filter('dictData', function (code) { +Vue.filter('dictData', function(code) { const dictTypeTree = Vue.ls.get(DICT_TYPE_TREE_DATA) if (dictTypeTree === undefined) { return [] @@ -96,6 +96,6 @@ Vue.filter('dictData', function (code) { * @author yubaoshan * @date 2021-2-8 01:13 */ -Vue.filter('dictDataAll', function () { +Vue.filter('dictDataAll', function() { return Vue.ls.get(DICT_TYPE_TREE_DATA) }) diff --git a/src/views/gen/codeGenerate/addForm.vue b/src/views/gen/codeGenerate/addForm.vue index bf3d19d..6ce4159 100644 --- a/src/views/gen/codeGenerate/addForm.vue +++ b/src/views/gen/codeGenerate/addForm.vue @@ -5,7 +5,8 @@ :visible="visible" :confirmLoading="confirmLoading" @ok="handleSubmit" - @cancel="handleCancel"> + @cancel="handleCancel" + > @@ -14,12 +15,15 @@ + v-decorator="['tableName', { rules: [{ required: true, message: '请选择数据库表!' }] }]" + > {{ item.tableName }} + @click="tableNameSele(item)" + >{{ item.tableName }} @@ -27,7 +31,8 @@ + v-decorator="['busName', { rules: [{ required: true, message: '请输入业务名!' }] }]" + />