projects/mesxc-zjl #327

Merged
juzi merged 3 commits from projects/mesxc-zjl into projects/mesxc-test 2024-04-11 15:37:56 +08:00
15 changed files with 829 additions and 607 deletions
Showing only changes of commit 5d3622bf62 - Show all commits

View File

@ -1,46 +1,52 @@
<template> <template>
<el-switch v-model="state" type="text" size="small" :disabled="readonly" @change="changeHandler" /> <el-switch
v-hasPermi="['base:group-team:edit-worker']"
v-model="state"
type="text"
size="small"
:disabled="readonly"
@change="changeHandler" />
</template> </template>
<script> <script>
export default { export default {
props: { props: {
injectData: { injectData: {
type: Object, type: Object,
default: () => ({}) default: () => ({}),
} },
}, },
data() { data() {
return { return {
state: false state: false,
} };
}, },
computed: { computed: {
readonly() { readonly() {
return !!this.injectData.readonly return !!this.injectData.readonly;
} },
}, },
mounted() { mounted() {
this.mapToState() this.mapToState();
}, },
methods: { methods: {
mapToState() { mapToState() {
if (this.injectData.prop === 'enabled') { if (this.injectData.prop === 'enabled') {
this.state = this.injectData.enabled === 1 ? true : false this.state = this.injectData.enabled === 1 ? true : false;
} }
}, },
changeHandler() { changeHandler() {
let params = {} let params = {};
let payload = {} let payload = {};
params.name = 'state' params.name = 'state';
payload.id = this.injectData.id payload.id = this.injectData.id;
payload.enabled = this.state ? '1' : '0' payload.enabled = this.state ? '1' : '0';
payload.code = this.injectData.code payload.code = this.injectData.code;
payload.name = this.injectData.name payload.name = this.injectData.name;
payload.leaderId = this.injectData.leaderId payload.leaderId = this.injectData.leaderId;
params.payload = payload params.payload = payload;
this.$emit('emitData', params) this.$emit('emitData', params);
} },
} },
} };
</script> </script>

View File

@ -1,41 +1,51 @@
<template> <template>
<div class="workerOperate"> <div class="workerOperate">
<div class="operateBtn"> <div class="operateBtn">
<span class="view" v-if="this.$auth.hasPermi('base:group-team:view-worker')" @click="emitParams('view')">查看</span> <span
<span class="edit" v-if="this.$auth.hasPermi('base:group-team:edit-worker')" @click="emitParams('edit')">编辑</span> class="view"
</div> v-hasPermi="['base:group-team:view-worker']"
</div> @click="emitParams('view')">
查看
</span>
<span
class="edit"
v-hasPermi="['base:group-team:edit-worker']"
@click="emitParams('edit')">
编辑
</span>
</div>
</div>
</template> </template>
<script> <script>
export default { export default {
name: 'WorkerOperate', name: 'WorkerOperate',
props: { props: {
injectData: { injectData: {
type: Object, type: Object,
default: () => ({}) default: () => ({}),
} },
}, },
methods: { methods: {
emitParams(data) { emitParams(data) {
let params = {} let params = {};
params.name = data params.name = data;
params.payload = this.injectData params.payload = this.injectData;
this.$emit('emitData', params) this.$emit('emitData', params);
} },
} },
} };
</script> </script>
<style lang='scss' scoped> <style lang='scss' scoped>
.workerOperate { .workerOperate {
.operateBtn{ .operateBtn {
color: #0B58FF; color: #0b58ff;
.view { .view {
margin-right: 10px; margin-right: 10px;
cursor: pointer; cursor: pointer;
} }
.edit { .edit {
cursor: pointer; cursor: pointer;
} }
} }
} }
</style> </style>

View File

@ -125,7 +125,7 @@ export default {
color: 'primary', color: 'primary',
}, },
{ {
type: 'separate', type: this.$auth.hasPermi('base:group-team:create') ? 'separate' : '',
}, },
{ {
type: this.$auth.hasPermi('base:group-team:create') ? 'button' : '', type: this.$auth.hasPermi('base:group-team:create') ? 'button' : '',

File diff suppressed because it is too large Load Diff

View File

@ -88,7 +88,7 @@ export default {
workOrderList: [], workOrderList: [],
workOrderName: '', workOrderName: '',
tableBtn: [ tableBtn: [
this.$auth.hasPermi('base:group-team-view:detail') this.$auth.hasPermi('monitoring:group-team-scheduling:query')
? { ? {
type: 'detail', type: 'detail',
btnName: '详情', btnName: '详情',

View File

@ -97,7 +97,7 @@ export default {
}, },
tableProps, tableProps,
tableBtn: [ tableBtn: [
this.$auth.hasPermi('base:team-production:detail') this.$auth.hasPermi('monitoring:group-team-scheduling:query')
? { ? {
type: 'productionDetail', type: 'productionDetail',
btnName: '查看', btnName: '查看',

View File

@ -173,12 +173,24 @@ export default {
color: 'primary', color: 'primary',
}, },
{ {
type: this.$auth.hasPermi('base:order-group:create') type: this.$auth.hasPermiAnd([
'base:order-group:create',
'base:core-product:query',
'base:core-customer:query',
'base:order:query',
])
? 'separate' ? 'separate'
: '', : '',
}, },
{ {
type: this.$auth.hasPermi('base:order-group:create') ? 'button' : '', type: this.$auth.hasPermiAnd([
'base:order-group:create',
'base:core-product:query',
'base:core-customer:query',
'base:order:query',
])
? 'button'
: '',
btnName: '新增', btnName: '新增',
name: 'add', name: 'add',
color: 'success', color: 'success',
@ -197,7 +209,10 @@ export default {
tableProps, tableProps,
list: [], list: [],
tableBtn: [ tableBtn: [
this.$auth.hasPermi('base:order-group:bind') this.$auth.hasPermiAnd([
'base:order:query',
'base:order-con-group-order:create',
])
? { ? {
type: 'bind', type: 'bind',
btnName: '绑定', btnName: '绑定',
@ -214,7 +229,7 @@ export default {
}, },
} }
: undefined, : undefined,
this.$auth.hasPermi('base:order-group:complete') this.$auth.hasPermi('base:order-group:update')
? { ? {
type: 'complete', type: 'complete',
btnName: '完成', btnName: '完成',
@ -231,7 +246,7 @@ export default {
}, },
} }
: undefined, : undefined,
this.$auth.hasPermi('base:order-group:termination') this.$auth.hasPermi('base:order-group:update')
? { ? {
type: 'termination', type: 'termination',
btnName: '终止', btnName: '终止',
@ -248,7 +263,7 @@ export default {
}, },
} }
: undefined, : undefined,
this.$auth.hasPermi('base:order-group:cancel') this.$auth.hasPermi('base:order-group:update')
? { ? {
type: 'cancel', type: 'cancel',
btnName: '作废', btnName: '作废',
@ -265,11 +280,17 @@ export default {
}, },
} }
: undefined, : undefined,
{ this.$auth.hasPermi('base:order-group:update')
type: 'detail', ? {
btnName: '详情', type: 'detail',
}, btnName: '详情',
this.$auth.hasPermi('base:order-group:edit') }
: undefined,
this.$auth.hasPermiAnd([
'base:order-group:update',
'base:core-product:query',
'base:core-customer:query',
])
? { ? {
type: 'edit', type: 'edit',
btnName: '编辑', btnName: '编辑',

View File

@ -15,7 +15,7 @@
<method-btn <method-btn
v-if="tableBtn.length" v-if="tableBtn.length"
slot="handleBtn" slot="handleBtn"
:width="290" :width="250"
label="操作" label="操作"
:method-list="tableBtn" :method-list="tableBtn"
@clickBtn="handleClick" /> @clickBtn="handleClick" />
@ -169,12 +169,22 @@ export default {
color: 'primary', color: 'primary',
}, },
{ {
type: this.$auth.hasPermi('base:order-manage:create') type: this.$auth.hasPermiAnd([
'base:order:query',
'base:core-product:query',
'base:order:create',
])
? 'separate' ? 'separate'
: '', : '',
}, },
{ {
type: this.$auth.hasPermi('base:order-manage:create') ? 'button' : '', type: this.$auth.hasPermiAnd([
'base:order:query',
'base:core-product:query',
'base:order:create',
])
? 'button'
: '',
btnName: '新增', btnName: '新增',
name: 'add', name: 'add',
color: 'success', color: 'success',
@ -210,7 +220,14 @@ export default {
}, },
} }
: undefined, : undefined,
this.$auth.hasPermi('base:order-manage:bindWorkOrder') this.$auth.hasPermiAnd([
'base:order:update',
'base:core-product:query',
'base:production-line:query',
'extend:process-flow:query',
'base:core-work-order:query',
'base:order:query',
])
? { ? {
type: 'bind', type: 'bind',
btnName: '绑定', btnName: '绑定',
@ -227,7 +244,7 @@ export default {
}, },
} }
: undefined, : undefined,
this.$auth.hasPermi('base:order-manage:complete') this.$auth.hasPermi('base:order:update')
? { ? {
type: 'complete', type: 'complete',
btnName: '完成', btnName: '完成',
@ -244,7 +261,7 @@ export default {
}, },
} }
: undefined, : undefined,
this.$auth.hasPermi('base:order-manage:termination') this.$auth.hasPermi('base:order:update')
? { ? {
type: 'termination', type: 'termination',
btnName: '终止', btnName: '终止',
@ -261,7 +278,7 @@ export default {
}, },
} }
: undefined, : undefined,
this.$auth.hasPermi('base:order-manage:cancel') this.$auth.hasPermi('base:order:update')
? { ? {
type: 'cancel', type: 'cancel',
btnName: '作废', btnName: '作废',
@ -278,13 +295,20 @@ export default {
}, },
} }
: undefined, : undefined,
this.$auth.hasPermi('base:order-manage:detail') this.$auth.hasPermiAnd([
'base:order:query',
'extend:process-flow:query',
])
? { ? {
type: 'detail', type: 'detail',
btnName: '详情', btnName: '详情',
} }
: undefined, : undefined,
this.$auth.hasPermi('base:order-manage:edit') this.$auth.hasPermiAnd([
'base:order:query',
'base:core-product:query',
'base:order:update',
])
? { ? {
type: 'edit', type: 'edit',
btnName: '编辑', btnName: '编辑',

View File

@ -181,7 +181,10 @@ export default {
list: [], list: [],
total: 0, total: 0,
tableBtn: [ tableBtn: [
this.$auth.hasPermi('base:order-completion-monitoring:orderDet') this.$auth.hasPermiAnd([
'base:order:query',
'extend:process-flow:query',
])
? { ? {
type: 'orderDetail', type: 'orderDetail',
btnName: '详情', btnName: '详情',
@ -198,7 +201,11 @@ export default {
}, },
} }
: undefined, : undefined,
this.$auth.hasPermi('base:order-completion-monitoring:qualityDet') this.$auth.hasPermiAnd([
'base:quality-inspection-record:query',
'base:core-product:query',
'base:core-work-order:query',
])
? { ? {
type: 'qualityDetail', type: 'qualityDetail',
btnName: '质量', btnName: '质量',

View File

@ -99,10 +99,14 @@ export default {
color: 'primary', color: 'primary',
}, },
{ {
type: this.$auth.hasPermi('base:voc:export') ? 'separate' : '', type: this.$auth.hasPermi('base:environmental-check-record:export')
? 'separate'
: '',
}, },
{ {
type: this.$auth.hasPermi('base:voc:export') ? 'button' : '', type: this.$auth.hasPermi('base:environmental-check-record:export')
? 'button'
: '',
btnName: '导出', btnName: '导出',
name: 'export', name: 'export',
color: 'primary', color: 'primary',

View File

@ -103,10 +103,14 @@ export default {
color: 'primary', color: 'primary',
}, },
{ {
type: this.$auth.hasPermi('base:voc:create') ? 'separate' : '', type: this.$auth.hasPermi('base:environmental-check:create')
? 'separate'
: '',
}, },
{ {
type: this.$auth.hasPermi('base:voc:create') ? 'button' : '', type: this.$auth.hasPermi('base:environmental-check:create')
? 'button'
: '',
btnName: '新增', btnName: '新增',
name: 'add', name: 'add',
color: 'success', color: 'success',
@ -124,13 +128,16 @@ export default {
tableProps, tableProps,
list: [], list: [],
tableBtn: [ tableBtn: [
this.$auth.hasPermi('base:voc:update') this.$auth.hasPermiAnd([
'base:environmental-check:update',
'base:environmental-check:query',
])
? { ? {
type: 'edit', type: 'edit',
btnName: '编辑', btnName: '编辑',
} }
: undefined, : undefined,
this.$auth.hasPermi('base:voc:delete') this.$auth.hasPermi('base:environmental-check:delete')
? { ? {
type: 'delete', type: 'delete',
btnName: '删除', btnName: '删除',

View File

@ -99,10 +99,14 @@ export default {
color: 'primary', color: 'primary',
}, },
{ {
type: this.$auth.hasPermi('base:waste-gas:export') ? 'separate' : '', type: this.$auth.hasPermi('base:environmental-check-record:export')
? 'separate'
: '',
}, },
{ {
type: this.$auth.hasPermi('base:waste-gas:export') ? 'button' : '', type: this.$auth.hasPermi('base:environmental-check-record:export')
? 'button'
: '',
btnName: '导出', btnName: '导出',
name: 'export', name: 'export',
color: 'primary', color: 'primary',

View File

@ -103,10 +103,14 @@ export default {
color: 'primary', color: 'primary',
}, },
{ {
type: this.$auth.hasPermi('base:waste-gas:create') ? 'separate' : '', type: this.$auth.hasPermi('base:environmental-check:create')
? 'separate'
: '',
}, },
{ {
type: this.$auth.hasPermi('base:waste-gas:create') ? 'button' : '', type: this.$auth.hasPermi('base:environmental-check:create')
? 'button'
: '',
btnName: '新增', btnName: '新增',
name: 'add', name: 'add',
color: 'success', color: 'success',
@ -124,13 +128,16 @@ export default {
tableProps, tableProps,
list: [], list: [],
tableBtn: [ tableBtn: [
this.$auth.hasPermi('base:waste-gas:update') this.$auth.hasPermiAnd([
'base:environmental-check:update',
'base:environmental-check:query',
])
? { ? {
type: 'edit', type: 'edit',
btnName: '编辑', btnName: '编辑',
} }
: undefined, : undefined,
this.$auth.hasPermi('base:waste-gas:delete') this.$auth.hasPermi('base:environmental-check:delete')
? { ? {
type: 'delete', type: 'delete',
btnName: '删除', btnName: '删除',

View File

@ -99,12 +99,14 @@ export default {
color: 'primary', color: 'primary',
}, },
{ {
type: this.$auth.hasPermi('base:waste-water:export') type: this.$auth.hasPermi('base:environmental-check-record:export')
? 'separate' ? 'separate'
: '', : '',
}, },
{ {
type: this.$auth.hasPermi('base:waste-water:export') ? 'button' : '', type: this.$auth.hasPermi('base:environmental-check-record:export')
? 'button'
: '',
btnName: '导出', btnName: '导出',
name: 'export', name: 'export',
color: 'primary', color: 'primary',

View File

@ -103,12 +103,14 @@ export default {
color: 'primary', color: 'primary',
}, },
{ {
type: this.$auth.hasPermi('base:waste-water:create') type: this.$auth.hasPermi('base:environmental-check:create')
? 'separate' ? 'separate'
: '', : '',
}, },
{ {
type: this.$auth.hasPermi('base:waste-water:create') ? 'button' : '', type: this.$auth.hasPermi('base:environmental-check:create')
? 'button'
: '',
btnName: '新增', btnName: '新增',
name: 'add', name: 'add',
color: 'success', color: 'success',
@ -126,13 +128,13 @@ export default {
tableProps, tableProps,
list: [], list: [],
tableBtn: [ tableBtn: [
this.$auth.hasPermi('base:waste-water:update') this.$auth.hasPermi('base:environmental-check:update')
? { ? {
type: 'edit', type: 'edit',
btnName: '编辑', btnName: '编辑',
} }
: undefined, : undefined,
this.$auth.hasPermi('base:waste-water:delete') this.$auth.hasPermi('base:environmental-check:delete')
? { ? {
type: 'delete', type: 'delete',
btnName: '删除', btnName: '删除',