This commit is contained in:
ival 2021-03-29 13:12:13 +08:00
commit e15e5703b4
2 changed files with 13 additions and 7 deletions

View File

@ -15,17 +15,17 @@
border border
> >
<el-table-column prop="name" :label="this.$t('planMonitor.runGraphName')" /> <el-table-column prop="name" :label="this.$t('planMonitor.runGraphName')" />
<el-table-column v-if="!(/^\/design\/userlist/.test(this.$route.fullPath))" :label="this.$t('global.status')"> <!-- <el-table-column v-if="!(/^\/design\/userlist/.test(this.$route.fullPath))" :label="this.$t('global.status')">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag>{{ handlerStatus(scope.row) }}</el-tag> <el-tag>{{ handlerStatus(scope.row) }}</el-tag>
</template> </template>
</el-table-column> </el-table-column> -->
<el-table-column <!-- <el-table-column
v-if="!(/^\/design\/userlist/.test(this.$route.fullPath))" v-if="!(/^\/design\/userlist/.test(this.$route.fullPath))"
prop="explanation" prop="explanation"
show-overflow-tooltip show-overflow-tooltip
:label="this.$t('planMonitor.explanation')" :label="this.$t('planMonitor.explanation')"
/> /> -->
<el-table-column :label="this.$t('planMonitor.creationDate')"> <el-table-column :label="this.$t('planMonitor.creationDate')">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag type="success">{{ handleTime(scope.row.createTime) }}</el-tag> <el-tag type="success">{{ handleTime(scope.row.createTime) }}</el-tag>
@ -33,7 +33,8 @@
</el-table-column> </el-table-column>
<el-table-column :label="this.$t('global.operate')" width="400"> <el-table-column :label="this.$t('global.operate')" width="400">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button v-if="scope.row.status !=='1'" size="mini" class="button_box" type="success" :loading="scope.row.runplanLoading" @click="handleConfirm(scope.row)">{{ $t('planMonitor.load') }}</el-button> <!-- {{ $t('planMonitor.load') }} -->
<el-button v-if="scope.row.status !=='1'" size="mini" class="button_box" type="success" :loading="scope.row.runplanLoading" @click="handleConfirm(scope.row)">编制</el-button>
<el-button v-if="isCreate && scope.row.status !=='1'" size="mini" class="button_box" type="primary" @click="handleEdit(scope.row)">{{ $t('planMonitor.modifyName') }}</el-button> <el-button v-if="isCreate && scope.row.status !=='1'" size="mini" class="button_box" type="primary" @click="handleEdit(scope.row)">{{ $t('planMonitor.modifyName') }}</el-button>
<el-button v-if="isCreate && scope.row.status !=='1'" size="mini" class="button_box" type="danger" @click="handleDelete(scope.row)">{{ $t('global.delete') }}</el-button> <el-button v-if="isCreate && scope.row.status !=='1'" size="mini" class="button_box" type="danger" @click="handleDelete(scope.row)">{{ $t('global.delete') }}</el-button>
<el-button v-if="isCreate && scope.row.status ==='0' && hasRelease" size="mini" class="button_box" type="primary" @click="handlePublish(scope.row)">{{ hasRelease?$t('global.release'):$t('planMonitor.applyRelease') }}</el-button> <el-button v-if="isCreate && scope.row.status ==='0' && hasRelease" size="mini" class="button_box" type="primary" @click="handlePublish(scope.row)">{{ hasRelease?$t('global.release'):$t('planMonitor.applyRelease') }}</el-button>

View File

@ -40,7 +40,8 @@
</el-form> </el-form>
</el-row> </el-row>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="导入运行图" name="three"> <!-- v-if="hasRelease" -->
<!-- <el-tab-pane label="导入运行图" name="three">
<el-row> <el-row>
<el-button type="text" class="uploadDemo"> <el-button type="text" class="uploadDemo">
<input <input
@ -53,7 +54,7 @@
<i class="el-icon-plus" /> <i class="el-icon-plus" />
</el-button> </el-button>
</el-row> </el-row>
</el-tab-pane> </el-tab-pane> -->
</el-tabs> </el-tabs>
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
@ -117,6 +118,10 @@ export default {
{ required: true, message: this.$t('rules.enterTheNameOfTheRunGraph'), trigger: 'blur' } { required: true, message: this.$t('rules.enterTheNameOfTheRunGraph'), trigger: 'blur' }
] ]
}; };
},
hasRelease() {
return this.$store.state.user.roles.includes('04') ||
this.$store.state.user.roles.includes('05');
} }
}, },
mounted() { mounted() {