草稿编辑月份

zhangtao
laozt 1 year ago
parent ba56467de1
commit 3da23d1037

@ -1,16 +1,13 @@
<template> <template>
<div> <div>
<div class="tables" v-loading="loading"> <div class="tables" v-loading="loading">
<el-table <el-table v-loading="loading" :data="enterpriseList">
v-loading="loading"
:data="enterpriseList"
>
<el-table-column label="计划年份" align="center" prop="plannedYear" /> <el-table-column label="计划年份" align="center" prop="plannedYear" />
<el-table-column label="计划月份" align="center" prop="plannedMonth"> <el-table-column label="计划月份" align="center" prop="plannedMonth">
<template slot-scope="scope"> <template slot-scope="scope">
<span> <span @click="editMonth(scope.row)">
{{ scope.row.plannedMonth }} <i class="el-icon-edit el-edit"></i>{{ scope.row.plannedMonth }}
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
@ -148,6 +145,27 @@ export default {
this.getList(); this.getList();
}, },
methods: { methods: {
//
editMonth(row) {
this.$prompt("请输入月份", "编辑", {
confirmButtonText: "确定",
cancelButtonText: "取消",
inputValue: row.plannedMonth,
inputPlaceholder: "请输入1到12的数字",
inputPattern: /^(1[0-2]|[1-9])$/,
inputErrorMessage: "格式不正确",
closeOnClickModal: false,
})
.then(({ value }) => {
//
})
.catch(() => {
this.$message({
type: "info",
message: "取消输入",
});
});
},
/** 查询计划企业列表 */ /** 查询计划企业列表 */
getList() { getList() {
this.loading = true; this.loading = true;
@ -355,6 +373,14 @@ export default {
::v-deep .el-table::before { ::v-deep .el-table::before {
height: 0; height: 0;
} }
.el-edit {
color: #2378ec;
cursor: pointer;
&:hover {
color: #6aa4f6;
}
}
} }
.pagination { .pagination {
margin-top: 10px; margin-top: 10px;
@ -436,21 +462,6 @@ export default {
} }
.centered { .centered {
align-items: center; align-items: center;
// position: relative;
// .data_icon {
// width: 10px;
// height: 7px;
// position: absolute;
// top: 50%;
// left: 280px;
// z-index: 9;
// color: #c0c4cc;
// font-size: 14px;
// transform: translateY(-50%);
// }
// ::v-deep .el-input__prefix {
// display: none;
// }
} }
} }
.next { .next {

Loading…
Cancel
Save