| | |
| | | :data="data" |
| | | :option="option" |
| | | :page.sync="page" |
| | | :permission="permissionList" |
| | | @on-load="getList" |
| | | @row-update="rowUpdate" |
| | | @row-save="rowSave" |
| | |
| | | plain |
| | | type="primary" |
| | | icon="el-icon-zoom-in" |
| | | v-if="permissionList.apply" |
| | | @click="applyRangeSearch">查看使用范围 |
| | | </el-button> |
| | | </el-tooltip> |
| | |
| | | |
| | | <script> |
| | | import { getPage,add,update,remove,getAppayRange } from '../../api/omd/revisionRule'; |
| | | import {mapGetters} from "vuex"; |
| | | export default { |
| | | name: "Version", |
| | | data(){ |
| | |
| | | ], |
| | | form:{}, |
| | | option:{ |
| | | height:'auto', |
| | | headerAlign:'center', |
| | | align: 'center', |
| | | border: true, |
| | |
| | | { |
| | | label: "初始值", |
| | | prop:"startCode", |
| | | type: 'number', |
| | | min:1, |
| | | max:99999, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | label: "前缀", |
| | | prop:"prefixCode" |
| | | }, |
| | | { |
| | | label: "后缀", |
| | | prop: "suffixCode" |
| | | }, |
| | | // { |
| | | // label: "前缀", |
| | | // prop:"prefixCode" |
| | | // }, |
| | | // { |
| | | // label: "后缀", |
| | | // prop: "suffixCode" |
| | | // }, |
| | | { |
| | | label: "描述", |
| | | prop:"description", |
| | |
| | | ] |
| | | }, |
| | | applyRangeData: [] |
| | | } |
| | | }, |
| | | computed:{ |
| | | ...mapGetters(["permission"]), |
| | | permissionList(){ |
| | | return{ |
| | | addBtn:this.vaildData(this.permission.modeling_Version.version_add,false), |
| | | apply:this.vaildData(this.permission.modeling_Version.version_applyopen,false), |
| | | delBtn:this.vaildData(this.permission.modeling_Version.version_delete,false), |
| | | editBtn:this.vaildData(this.permission.modeling_Version.version_edit,false), |
| | | } |
| | | } |
| | | }, |
| | | methods:{ |
| | |
| | | }) |
| | | }, |
| | | rowUpdate(row, index, done, loading) { |
| | | update(row).then(() => { |
| | | this.$message.success('修改成功') |
| | | done() |
| | | this.getList(); |
| | | }).catch(() => { |
| | | loading() |
| | | }) |
| | | console.log(row); |
| | | const date = new Date(row.ts); |
| | | const formattedDate = `${date.getFullYear()}-${(date.getMonth() + 1).toString().padStart(2, '0')}-${date.getDate().toString().padStart(2, '0')} ${date.getHours().toString().padStart(2, '0')}:${date.getMinutes().toString().padStart(2, '0')}:${date.getSeconds().toString().padStart(2, '0')}.${date.getMilliseconds().toString().padStart(3, '0')}`; |
| | | row.ts = formattedDate; |
| | | update(row) |
| | | .then(() => { |
| | | this.$message.success('修改成功'); |
| | | done(); |
| | | this.getList(); |
| | | }) |
| | | .catch(() => { |
| | | loading(); |
| | | }); |
| | | }, |
| | | rowDel(row) { |
| | | this.$confirm('此操作将永久删除, 是否继续?', '提示', { |