From 29271007d0b124f36e0a9db41b7918de2e008b58 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期三, 30 八月 2023 15:01:23 +0800
Subject: [PATCH] 1.计量单位完成100%
---
src/views/systemSetting/encodingRules.vue | 52 +++++++++++++++++++++++++++++++++++-----------------
1 files changed, 35 insertions(+), 17 deletions(-)
diff --git a/src/views/systemSetting/encodingRules.vue b/src/views/systemSetting/encodingRules.vue
index 9c49280..7efcb65 100644
--- a/src/views/systemSetting/encodingRules.vue
+++ b/src/views/systemSetting/encodingRules.vue
@@ -38,7 +38,22 @@
</el-form>
<div
class="bodyTopFormExpand"
- />
+ style="height:5px"
+ >
+ <!-- <svg-icon-->
+ <!-- v-show="mouseHoverType==='mouseout'"-->
+ <!-- style="cursor: pointer"-->
+ <!-- :icon-class="!isExpandForm?'doubleDown3':'doubleUp3'"-->
+ <!-- @mouseenter="mouseHoverType=$event.type"-->
+ <!-- />-->
+ <!-- <svg-icon-->
+ <!-- v-show="mouseHoverType==='mouseenter'"-->
+ <!-- style="cursor: pointer"-->
+ <!-- :icon-class="!isExpandForm?'doubleDown':'doubleUp'"-->
+ <!-- @click="isExpandForm=!isExpandForm"-->
+ <!-- @mouseout="mouseHoverType=$event.type"-->
+ <!-- />-->
+ </div>
</div>
<div class="elTableDiv">
@@ -86,11 +101,7 @@
prop="filingdate"
label="缂栫爜鏍煎紡"
sortable="custom"
- >
- <template slot-scope="{row}">
- <div>{{ dateType.find(i => i.code === row.filingdate).name }}</div>
- </template>
- </el-table-column>
+ />
<el-table-column
prop="incbit"
label="鑷浣嶆暟"
@@ -194,7 +205,7 @@
</el-form-item>
<el-form-item label="鑷浣嶆暟" prop="incbit" required>
- <el-input v-model="dialogForm.incbit" style="width: 200px" />
+ <el-input v-model="dialogForm.incbit" oninput="value=value.replace(/[^0-9]/g,'')" style="width: 200px" />
</el-form-item>
<el-form-item label="缂栫爜棰勮">
@@ -205,7 +216,13 @@
<span slot="footer" class="dialog-footer">
<div class="footerButton">
<el-button v-waves @click="dialogVisibleCancel">鍙� 娑�</el-button>
- <el-button v-waves type="primary" @click="dialogVisibleConfirm">纭� 瀹�</el-button>
+ <el-button
+ v-waves
+ type="primary"
+ :loading="$store.state.app.buttonIsDisabled"
+ :disabled="$store.state.app.buttonIsDisabled"
+ @click="dialogVisibleConfirm"
+ >纭� 瀹�</el-button>
</div>
</span>
</el-dialog>
@@ -254,9 +271,9 @@
},
encodingPre: '', // 缂栫爜棰勮
dateType: [
- { name: '骞存湀鏃�', code: 'YMD' },
- { name: '骞存湀', code: 'YM' },
- { name: '骞�', code: 'Y' }
+ { name: '骞存湀鏃�', code: '骞存湀鏃�' },
+ { name: '骞存湀', code: '骞存湀' },
+ { name: '骞�', code: '骞�' }
],
menuOptionsAll: [],
menuOptions: [],
@@ -288,11 +305,11 @@
handler(newValue, oldValue) {
const date = new Date()
let newDate = ''
- if (newValue.filingdate === 'YMD') {
+ if (newValue.filingdate === '骞存湀鏃�') {
newDate = date.getFullYear().toString().substring(2, 4) + '' + (date.getMonth() + 1 + '').padStart(2, '0') + '' + (date.getDate() + '').padStart(2, '0')
- } else if (newValue.filingdate === 'YM') {
+ } else if (newValue.filingdate === '骞存湀') {
newDate = date.getFullYear().toString().substring(2, 4) + '' + (date.getMonth() + 1 + '').padStart(2, '0')
- } else if (newValue.filingdate === 'Y') {
+ } else if (newValue.filingdate === '骞�') {
newDate = date.getFullYear().toString().substring(2, 4) + ''
}
this.encodingPre = newValue.prefix + '' + newDate + '' + (1 + '').padStart(newValue.incbit, '0')
@@ -309,7 +326,6 @@
this.getHeight()
this.getCodeMenuSelect()
- console.log(this.$buttoncode)
},
methods: {
async getCodeMenuSelect() {
@@ -417,16 +433,18 @@
dialogVisibleConfirm() {
this.$refs.dialogForm.validate(valid => {
if (valid) {
+ this.$store.state.app.buttonIsDisabled = true
const rightcode = this.$refs.cascader.checkedValue[this.$refs.cascader.checkedValue.length - 1]
this.dialogForm.rightcode = rightcode
this.dialogForm.rightname = this.menuOptions[this.menuOptions.findIndex(i => i.menucode === this.$refs.cascader.checkedValue[0])].children.find(i => i.menucode === rightcode).menuname
-
SaveEncodingRules(this.dialogForm).then(res => {
if (res.code === '200') {
this.$notify.success(this.operation === 'add' ? '娣诲姞鎴愬姛锛�' : '淇敼鎴愬姛锛�')
this.dialogVisible = false
+ this.$store.state.app.buttonIsDisabled = false
this.getEncodingRules()
} else {
+ this.$store.state.app.buttonIsDisabled = false
this.$notify.error(this.operation === 'add' ? '娣诲姞澶辫触锛�' : '淇敼澶辫触锛�')
}
})
@@ -437,7 +455,7 @@
getHeight() {
this.$nextTick(() => {
this.mainHeight = window.innerHeight - 85
- this.tableHeight = this.mainHeight - 255
+ this.tableHeight = this.mainHeight - 240
this.$refs.tableDataRef.doLayout()
})
}
--
Gitblit v1.9.3