|
@@ -39,9 +39,6 @@
|
|
|
<el-form-item>
|
|
|
<el-button type="primary" @click="onSearch">查询</el-button>
|
|
|
</el-form-item>
|
|
|
- <el-form-item v-if="greenColorMenus.includes(ruleId) && tableData.length" style="float: right;">
|
|
|
- <el-button @click="onChangeValue">编辑</el-button>
|
|
|
- </el-form-item>
|
|
|
<el-form-item style="float: right;">
|
|
|
<el-button v-if="$route.query.type === 'children'" @click="onBack">返回</el-button>
|
|
|
</el-form-item>
|
|
@@ -61,6 +58,10 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="" label="操作" width="120">
|
|
|
+ <template slot="header" slot-scope="scope">
|
|
|
+ <span>操作</span>
|
|
|
+ <i class="el-icon-edit table_edit" v-if="scope._self.judgeEdit" @click="onChangeValue"></i>
|
|
|
+ </template>
|
|
|
<template slot-scope="scope">
|
|
|
<!-- 全年不可修改 -->
|
|
|
<!-- 非人工录入不可修改 -->
|
|
@@ -556,7 +557,8 @@ export default {
|
|
|
return this.$route.query.type === 'children' ? this.cMenus : this.menus
|
|
|
},
|
|
|
judgeEdit() {
|
|
|
- return this.greenColorMenus.includes(this.ruleId)
|
|
|
+ console.log(this.greenColorMenus.includes(this.ruleId))
|
|
|
+ return this.greenColorMenus.includes(this.ruleId) && !!this.tableData.length
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
@@ -566,6 +568,7 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
onChangeValue(row) {
|
|
|
+ console.log(row, 9999)
|
|
|
if (row.time) {
|
|
|
// 单个修改
|
|
|
const { time } = row
|
|
@@ -668,6 +671,13 @@ export default {
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
+.table_edit {
|
|
|
+ margin-left: 10px;
|
|
|
+ cursor: pointer;
|
|
|
+ &:hover {
|
|
|
+ opacity: 0.6;
|
|
|
+ }
|
|
|
+}
|
|
|
.link {
|
|
|
font-weight: 600;
|
|
|
color: #409eff;
|