Merge branch 'projects/mesxc-test' into projects/mesxc-zhp

This commit is contained in:
‘937886381’ 2024-04-11 16:54:49 +08:00
commit 4866198a98
21 changed files with 861 additions and 619 deletions

View File

@ -76,10 +76,6 @@ export default {
name: this.chartData[i].objName + this.chartData[i].objCode, name: this.chartData[i].objName + this.chartData[i].objCode,
type: 'bar', type: 'bar',
barMaxWidth: 20, barMaxWidth: 20,
label: {
show: true,
position: 'top',
},
data: [], data: [],
}; };
legendData.push(this.chartData[i].objName + this.chartData[i].objCode); legendData.push(this.chartData[i].objName + this.chartData[i].objCode);

View File

@ -68,9 +68,9 @@ export default {
var option = { var option = {
color: ['#288AFF'], color: ['#288AFF'],
// tooltip: { tooltip: {
// trigger: 'axis' trigger: 'axis',
// }, },
grid: { grid: {
left: '4%', left: '4%',
right: '1%', right: '1%',

View File

@ -57,8 +57,10 @@ export default {
let listObj = { useNum: '消耗量' }; // let listObj = { useNum: '消耗量' }; //
for (let i = 0; i < arr.length; i++) { for (let i = 0; i < arr.length; i++) {
let obj = {}; let obj = {};
let fName = arr[i].time.slice(0, 4);
let lName = arr[i].time.slice(4, 6);
obj.prop = arr[i].time; obj.prop = arr[i].time;
obj.label = arr[i].time; obj.label = fName + ' 第 ' + lName + ' 周';
obj.minWidth = 100; obj.minWidth = 100;
tempX.push(obj); tempX.push(obj);
listObj[arr[i].time] = arr[i].useNum || null; listObj[arr[i].time] = arr[i].useNum || null;

View File

@ -45,6 +45,7 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-button <el-button
v-show="!isEdit"
class="addButton" class="addButton"
icon="el-icon-plus" icon="el-icon-plus"
@click="emitButtonClick"> @click="emitButtonClick">
@ -70,6 +71,13 @@ export default {
return []; return [];
}, },
}, },
isEdit: {
type: Boolean,
required: true,
default: () => {
return false;
},
},
}, },
data() { data() {
return {}; return {};

View File

@ -42,6 +42,7 @@
<add-table <add-table
:table-data="tableData" :table-data="tableData"
:table-name-list="tableNameList" :table-name-list="tableNameList"
:isEdit="isEdit"
@emitFun="inputChange" @emitFun="inputChange"
@emitButtonClick="emitButtonClick" /> @emitButtonClick="emitButtonClick" />
</el-col> </el-col>

View File

@ -66,7 +66,7 @@
placeholder="请选择" placeholder="请选择"
style="width: 100%"> style="width: 100%">
<el-option <el-option
v-for="item in getDictDatas(DICT_TYPE.TABLE_NAME)" v-for="item in tableNameList"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value"></el-option> :value="item.value"></el-option>
@ -154,6 +154,7 @@ import {
createEnergyLimit, createEnergyLimit,
getEnergyParamList, getEnergyParamList,
} from '@/api/monitoring/energyLimit'; } from '@/api/monitoring/energyLimit';
import { energyTableGet } from '@/api/base/energyQuantityManual';
export default { export default {
name: 'energyLimitAdd', name: 'energyLimitAdd',
props: { props: {
@ -203,6 +204,7 @@ export default {
{ required: true, message: '指标类型不能为空', trigger: 'change' }, { required: true, message: '指标类型不能为空', trigger: 'change' },
], ],
}, },
tableNameList: [],
detailList: [], detailList: [],
}; };
}, },
@ -267,11 +269,22 @@ export default {
} }
}, },
toggleType() { toggleType() {
if (this.form.energyTypeId && this.form.type) { if (this.form.energyTypeId && this.form.method == 2) {
this.getDetailList(); this.form.tableName = '';
this.form.plcParamId = ''; this.getTableNameList(this.form.energyTypeId);
} }
}, },
// list
getTableNameList(id) {
energyTableGet({ energyTypeId: id }).then((res) => {
this.tableNameList = res.data.tableObjs || [];
if (this.tableNameList.length === 0) {
this.$modal.msgWarning(
'当前能源类型暂无配置表名,请先到《表名配置》页面配置'
);
}
});
},
// //
changeDetSelect(key, treeData) { changeDetSelect(key, treeData) {
let arr = []; // let arr = []; //

View File

@ -1,5 +1,11 @@
<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>
@ -7,40 +13,40 @@ 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,8 +1,18 @@
<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"
v-hasPermi="['base:group-team:view-worker']"
@click="emitParams('view')">
查看
</span>
<span
class="edit"
v-hasPermi="['base:group-team:edit-worker']"
@click="emitParams('edit')">
编辑
</span>
</div> </div>
</div> </div>
</template> </template>
@ -12,23 +22,23 @@ export default {
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;

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' : '',

View File

@ -1,8 +1,12 @@
<template> <template>
<div class="groupTeamScheduling"> <div class="groupTeamScheduling">
<TopTab :roomNameDict='roomNameDict' @emitFun='toggleName'/> <TopTab
:roomNameDict="roomNameDict"
@emitFun="toggleName" />
<div class="operationArea"> <div class="operationArea">
<el-form :inline="true" class="demo-form-inline"> <el-form
:inline="true"
class="demo-form-inline">
<span class="blue-block"></span> <span class="blue-block"></span>
<el-form-item label="月份选择"> <el-form-item label="月份选择">
<el-date-picker <el-date-picker
@ -13,42 +17,86 @@
:disabled="showSetting" :disabled="showSetting"
@change="selectMonth" @change="selectMonth"
:clearable="false" :clearable="false"
style="width: 120px"> style="width: 120px"></el-date-picker>
</el-date-picker>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<span class="separateStyle" v-if="this.$auth.hasPermi('base:group-team-scheduling:set')"></span> <span
class="separateStyle"
v-if="this.$auth.hasPermi('base:group-team-scheduling:set')"></span>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" size="small" v-if="this.$auth.hasPermi('base:group-team-scheduling:set')" :disabled="showSetting || settingBtnDis" @click="settingMsg">设置</el-button> <el-button
type="primary"
size="small"
v-if="this.$auth.hasPermi('base:group-team-scheduling:set')"
:disabled="showSetting || settingBtnDis"
@click="settingMsg">
设置
</el-button>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" size="small" v-show="showSetting && autoScheduling" @click="schedulingBtn">自动排班</el-button> <el-button
type="primary"
size="small"
v-show="showSetting && autoScheduling"
@click="schedulingBtn">
自动排班
</el-button>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<span class="separateStyle" v-show="showSetting"></span> <span
class="separateStyle"
v-show="showSetting"></span>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" size="small" v-show="showSetting" @click="confirmSetting">确认</el-button> <el-button
type="primary"
size="small"
v-show="showSetting"
@click="confirmSetting">
确认
</el-button>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" size="small" plain v-show="showSetting" @click="cancelSetting">取消</el-button> <el-button
type="primary"
size="small"
plain
v-show="showSetting"
@click="cancelSetting">
取消
</el-button>
</el-form-item> </el-form-item>
<el-form-item label="请先选择查询的班组" class="rightItem"> <el-form-item
v-hasPermi="[
'base:quality-inspection-record:query',
'base:core-work-order:query',
'base:core-product:query',
]"
label="请先选择查询的班组"
class="rightItem">
<!-- <el-button type="primary" size="small" :disabled="jumpDisabled" @click="toOtherPage('1')">班组上下片查询</el-button> --> <!-- <el-button type="primary" size="small" :disabled="jumpDisabled" @click="toOtherPage('1')">班组上下片查询</el-button> -->
<el-button type="primary" size="small" :disabled="jumpDisabled" @click="toOtherPage('2')">班组能源查询</el-button> <!-- <el-button type="primary" size="small" :disabled="jumpDisabled" @click="toOtherPage('2')">班组能源查询</el-button> -->
<el-button type="primary" size="small" :disabled="jumpDisabled" @click="toOtherPage('3')">班组检测查询</el-button> <el-button
type="primary"
size="small"
:disabled="jumpDisabled"
@click="toOtherPage('3')">
班组检测查询
</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
<!-- 日历区域 --> <!-- 日历区域 -->
<div class="calenderArea"> <div class="calenderArea">
<div style="font-size: 24px;font-weight: 500">{{ this.month }} {{ this.year }}</div> <div style="font-size: 24px; font-weight: 500">
{{ this.month }} {{ this.year }}
</div>
<el-calendar v-model="startDay"> <el-calendar v-model="startDay">
<!-- 这里使用的是 2.5 slot 语法对于新项目请使用 2.6 slot 语法--> <!-- 这里使用的是 2.5 slot 语法对于新项目请使用 2.6 slot 语法-->
<template <template
slot="dateCell" slot="dateCell"
slot-scope="{date, data}"> slot-scope="{ date, data }">
<div v-if="data.type === 'current-month'"> <div v-if="data.type === 'current-month'">
<!-- 日期 --> <!-- 日期 -->
<div class="dateStyle"> <div class="dateStyle">
@ -56,27 +104,64 @@
</div> </div>
<!-- 班次班组 --> <!-- 班次班组 -->
<!-- class有两个样式一个是类似class1还有个是选中红框显示 --> <!-- class有两个样式一个是类似class1还有个是选中红框显示 -->
<el-row :gutter="2" :class="'class' + (index+1) + (chooseTip === (item.startDay+item.classesId) ? ' team-active' : '')" v-for="(item, index) in list[Number(data.day.split('-')[2])]" :key='index'> <el-row
:gutter="2"
:class="
'class' +
(index + 1) +
(chooseTip === item.startDay + item.classesId
? ' team-active'
: '')
"
v-for="(item, index) in list[Number(data.day.split('-')[2])]"
:key="index">
<el-col :span="12"> <el-col :span="12">
<div class="selectDiv"> <div class="selectDiv">
<!-- 选择班组图标 --> <!-- 选择班组图标 -->
<div class="toggle-icon" v-show="showSetting && (new Date(data.day).valueOf() < new Date().valueOf() ? false: true)"> <div
<svg-icon icon-class="toggle"/> class="toggle-icon"
v-show="
showSetting &&
(new Date(data.day).valueOf() < new Date().valueOf()
? false
: true)
">
<svg-icon icon-class="toggle" />
</div> </div>
<!-- 不能选择班组 --> <!-- 不能选择班组 -->
<div class="toggle-icon-hide" v-show="!(showSetting && (new Date(data.day).valueOf() < new Date().valueOf() ? false: true))"></div> <div
<el-select v-model="item.teamId" size='small' :disabled="!showSetting || (new Date(data.day).valueOf() > new Date().valueOf() ? false: true)"> class="toggle-icon-hide"
v-show="
!(
showSetting &&
(new Date(data.day).valueOf() < new Date().valueOf()
? false
: true)
)
"></div>
<el-select
v-model="item.teamId"
size="small"
:disabled="
!showSetting ||
(new Date(data.day).valueOf() > new Date().valueOf()
? false
: true)
">
<el-option <el-option
v-for="i in teamList" v-for="i in teamList"
:key="i.id" :key="i.id"
:label="i.name" :label="i.name"
:value="i.id"> :value="i.id"></el-option>
</el-option>
</el-select> </el-select>
</div> </div>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-button class="labelClass" @click="chooseTeam(item)">{{ item.classesName }}</el-button> <el-button
class="labelClass"
@click="chooseTeam(item)">
{{ item.classesName }}
</el-button>
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
@ -87,263 +172,299 @@
</template> </template>
<script> <script>
import { getPreset, createOrUpdateList, autoSet } from "@/api/base/groupTeamScheduling"; import {
import { listEnabledByRoom } from "@/api/base/groupTeam"; getPreset,
createOrUpdateList,
autoSet,
} from '@/api/base/groupTeamScheduling';
import { listEnabledByRoom } from '@/api/base/groupTeam';
import moment from 'moment'; import moment from 'moment';
import TopTab from './components/topTab' import TopTab from './components/topTab';
export default { export default {
name: "GroupTeamScheduling", name: 'GroupTeamScheduling',
data() { data() {
return { return {
roomNameDict:null, roomNameDict: null,
startDay: '',// startDay: '', //
year: '',// 2023 year: '', // 2023
month: '',// month: '', //
monthList: ["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"], monthList: [
'一月',
'二月',
'三月',
'四月',
'五月',
'六月',
'七月',
'八月',
'九月',
'十月',
'十一月',
'十二月',
],
list: {}, list: {},
teamList: [],// teamList: [], //
showSetting: false,// showSetting: false, //
settingBtnDis: false, settingBtnDis: false,
jumpDisabled: true,// jumpDisabled: true, //
chooseObj: {}, // chooseObj: {}, //
chooseTip: '',// chooseTip: '', //
autoScheduling: false // autoScheduling: false, //
}; };
}, },
components:{ TopTab }, components: { TopTab },
created() { created() {
this.roomNameDict = this.getDictDatas('workshop')[0].value this.roomNameDict = this.getDictDatas('workshop')[0].value;
this.startDay = new Date() this.startDay = new Date();
// //
this.settingBtn() this.settingBtn();
this.getTeamList() this.getTeamList();
this.toggleMonth() this.toggleMonth();
this.getList() this.getList();
}, },
methods: { methods: {
// //
toggleName(val) { toggleName(val) {
this.roomNameDict = val this.roomNameDict = val;
// //
if (this.showSetting) { if (this.showSetting) {
this.showSetting = !this.showSetting this.showSetting = !this.showSetting;
} }
// //
if (!this.jumpDisabled) { if (!this.jumpDisabled) {
this.clearChoose() this.clearChoose();
} }
// //
this.getTeamList() this.getTeamList();
// //
this.getList() this.getList();
}, },
// //
selectMonth() { selectMonth() {
if (this.startDay) { if (this.startDay) {
this.settingBtn() // ,getlist this.settingBtn(); // ,getlist
this.toggleMonth() this.toggleMonth();
this.getList() this.getList();
this.clearChoose() this.clearChoose();
if ( moment(this.startDay).valueOf() > moment().endOf('month').valueOf()) { if (
this.autoScheduling = true moment(this.startDay).valueOf() > moment().endOf('month').valueOf()
) {
this.autoScheduling = true;
} else { } else {
this.autoScheduling = false this.autoScheduling = false;
} }
} }
}, },
// //
getTeamList() { getTeamList() {
console.log(this.roomNameDict) console.log(this.roomNameDict);
listEnabledByRoom({ listEnabledByRoom({
room: this.roomNameDict room: this.roomNameDict,
}).then(res => { }).then((res) => {
this.teamList = res.data || [] this.teamList = res.data || [];
}) });
}, },
// //
getList() { getList() {
let year = moment(this.startDay).format('YYYY') let year = moment(this.startDay).format('YYYY');
let month = moment(this.startDay).format('M') let month = moment(this.startDay).format('M');
getPreset({ getPreset({
year: year, year: year,
month: month, month: month,
roomNameDict: this.roomNameDict roomNameDict: this.roomNameDict,
}).then(res => { })
let obj = res.data || {} .then((res) => {
let obj = res.data || {};
if (obj) { if (obj) {
for (let item in obj) { for (let item in obj) {
for (let i = 0; i < obj[item].length; i++) { for (let i = 0; i < obj[item].length; i++) {
if (!obj[item][i].teamId) { if (!obj[item][i].teamId) {
obj[item][i].teamId = '' obj[item][i].teamId = '';
} }
} }
} }
} }
this.list = obj this.list = obj;
this.settingBtnDis = false this.settingBtnDis = false;
}).catch(() => {
this.list = {}
this.settingBtnDis = true //
}) })
.catch(() => {
this.list = {};
this.settingBtnDis = true; //
});
}, },
// //
settingMsg() { settingMsg() {
this.showSetting = !this.showSetting this.showSetting = !this.showSetting;
this.clearChoose() this.clearChoose();
}, },
// //
cancelSetting() { cancelSetting() {
this.showSetting = !this.showSetting this.showSetting = !this.showSetting;
this.getList() // this.getList(); //
}, },
// //
confirmSetting() { confirmSetting() {
let num = 0 let num = 0;
// //
if (moment(this.startDay).format('YYYY-MM') === moment().format('YYYY-MM')) { if (
num = Number(moment().format('DD')) moment(this.startDay).format('YYYY-MM') === moment().format('YYYY-MM')
) {
num = Number(moment().format('DD'));
} else { } else {
num = 0 num = 0;
} }
// //
// //
let tempArr = Object.values(this.list) let tempArr = Object.values(this.list);
let arr = [] let arr = [];
for (let i = num; i < tempArr.length; i++) { for (let i = num; i < tempArr.length; i++) {
for (let j = 0; j < tempArr[i].length; j++) { for (let j = 0; j < tempArr[i].length; j++) {
arr.push(tempArr[i][j]) arr.push(tempArr[i][j]);
} }
} }
createOrUpdateList(arr).then(res => { createOrUpdateList(arr).then((res) => {
if (res.code === 0) { if (res.code === 0) {
this.showSetting = !this.showSetting this.showSetting = !this.showSetting;
this.$modal.msgSuccess("操作成功") this.$modal.msgSuccess('操作成功');
this.getList() // this.getList(); //
} }
}) });
}, },
// //
chooseTeam(value) { chooseTeam(value) {
if (this.showSetting) { if (this.showSetting) {
this.$modal.msgWarning("当前处于设置模式") this.$modal.msgWarning('当前处于设置模式');
return false return false;
} }
this.chooseObj = value this.chooseObj = value;
this.chooseTip = value.startDay + value.classesId // this.chooseTip = value.startDay + value.classesId; //
this.jumpDisabled = false // this.jumpDisabled = false; //
}, },
// //
schedulingBtn() { schedulingBtn() {
let tempData = this.list let tempData = this.list;
// 1 // 1
if (this.list[1][0].teamId) { if (this.list[1][0].teamId) {
let tempArr = Object.values(this.list) let tempArr = Object.values(this.list);
let arr = [] let arr = [];
let n = 0 let n = 0;
for (let i = 0; i < tempArr.length; i++) { for (let i = 0; i < tempArr.length; i++) {
if (n > 0) { if (n > 0) {
break; break;
} }
for (let j = 0; j < tempArr[i].length; j++) { for (let j = 0; j < tempArr[i].length; j++) {
if (tempArr[i][j].teamId) { if (tempArr[i][j].teamId) {
arr.push(tempArr[i][j].teamId) arr.push(tempArr[i][j].teamId);
} else { } else {
n++ n++;
} }
} }
} }
let tempNum = 0 let tempNum = 0;
for (let k = 0; k < tempArr.length; k++) { for (let k = 0; k < tempArr.length; k++) {
for (let v = 0; v < tempArr[k].length; v++) { for (let v = 0; v < tempArr[k].length; v++) {
let t = tempNum % arr.length let t = tempNum % arr.length;
if (arr.length === 1) { if (arr.length === 1) {
tempData[k+1][v].teamId = arr[0] tempData[k + 1][v].teamId = arr[0];
} else { } else {
tempData[k+1][v].teamId = arr[t] tempData[k + 1][v].teamId = arr[t];
} }
tempNum++ tempNum++;
} }
} }
this.list = [] this.list = [];
this.list = tempData this.list = tempData;
} else { } else {
// 1, // 1,
// console.log(moment(this.startDay).format("YYYY-MM-DD")) // console.log(moment(this.startDay).format("YYYY-MM-DD"))
autoSet({ autoSet({
year: this.year, year: this.year,
month: moment(this.startDay).month() + 1, month: moment(this.startDay).month() + 1,
roomNameDict: this.roomNameDict roomNameDict: this.roomNameDict,
}).then(res => { }).then((res) => {
this.list = res.data || {} this.list = res.data || {};
}) });
} }
}, },
// //
settingBtn() { settingBtn() {
let nowMonth = moment().startOf('month').valueOf() let nowMonth = moment().startOf('month').valueOf();
let startMonth = moment(this.startDay).valueOf() let startMonth = moment(this.startDay).valueOf();
let nowDate = moment(new Date()).date() let nowDate = moment(new Date()).date();
let sumDate = moment().daysInMonth() let sumDate = moment().daysInMonth();
if (nowMonth > startMonth) { // if (nowMonth > startMonth) {
this.settingBtnDis = true //
this.settingBtnDis = true;
} else { } else {
if (nowDate < sumDate) { if (nowDate < sumDate) {
this.settingBtnDis = false this.settingBtnDis = false;
} else { } else {
this.settingBtnDis = true this.settingBtnDis = true;
} }
} }
}, },
// //
clearChoose() { clearChoose() {
this.chooseObj = {} this.chooseObj = {};
this.chooseTip = "" this.chooseTip = '';
this.jumpDisabled = true this.jumpDisabled = true;
}, },
// //
toggleMonth() { toggleMonth() {
this.year = moment(this.startDay).format("YYYY") this.year = moment(this.startDay).format('YYYY');
let month = Number(moment(this.startDay).format("MM")) let month = Number(moment(this.startDay).format('MM'));
this.month = this.monthList[month - 1] this.month = this.monthList[month - 1];
}, },
// 3 // 3
toOtherPage(val) { toOtherPage(val) {
switch (val) { switch (val) {
case '1': case '1':
this.$router.push({ this.$router.push({
path: '/core/enhance/product-line-24h?startTime='+this.chooseObj.startTime+'&endTime='+this.chooseObj.endTime, path:
}) '/core/enhance/product-line-24h?startTime=' +
this.chooseObj.startTime +
'&endTime=' +
this.chooseObj.endTime,
});
break; break;
case '2': // case '2': //
this.$router.push({ this.$router.push({
path: '/energy/base/energy-quantity-realtime?startTime='+this.chooseObj.startTime+'&endTime='+this.chooseObj.endTime path:
}) '/energy/base/energy-quantity-realtime?startTime=' +
this.chooseObj.startTime +
'&endTime=' +
this.chooseObj.endTime,
});
break; break;
default: default:
this.$router.push({ this.$router.push({
path: '/quality/base/quality-inspection-data/detection-information/statistical-data?startTime='+this.chooseObj.startTime+'&endTime='+this.chooseObj.endTime, path:
'/quality/base/quality-inspection-data/detection-information/statistical-data?startTime=' +
this.chooseObj.startTime +
'&endTime=' +
this.chooseObj.endTime,
// name: 'QualityStatistics', // name: 'QualityStatistics',
// params: { startTime: this.chooseObj.startTime, endTime: this.chooseObj.endTime } // params: { startTime: this.chooseObj.startTime, endTime: this.chooseObj.endTime }
}) });
}
}
}
} }
},
},
};
</script> </script>
<style lang='scss'> <style lang='scss'>
.demo-form-inline { .demo-form-inline {
.el-date-editor .el-range__icon { .el-date-editor .el-range__icon {
font-size: 16px; font-size: 16px;
color: #0B58FF; color: #0b58ff;
} }
.el-input__prefix .el-icon-date { .el-input__prefix .el-icon-date {
font-size: 16px; font-size: 16px;
color: #0B58FF; color: #0b58ff;
} }
} }
.groupTeamScheduling { .groupTeamScheduling {
background-color: #F2F4F9; background-color: #f2f4f9;
.operationArea { .operationArea {
padding: 14px 10px 0 16px; padding: 14px 10px 0 16px;
margin-bottom: 8px; margin-bottom: 8px;
@ -353,7 +474,7 @@ export default {
display: inline-block; display: inline-block;
width: 4px; width: 4px;
height: 16px; height: 16px;
background-color: #0B58FF; background-color: #0b58ff;
border-radius: 1px; border-radius: 1px;
margin-right: 8px; margin-right: 8px;
margin-top: 10px; margin-top: 10px;
@ -362,7 +483,7 @@ export default {
display: inline-block; display: inline-block;
width: 1px; width: 1px;
height: 24px; height: 24px;
background: #E8E8E8; background: #e8e8e8;
vertical-align: middle; vertical-align: middle;
} }
.el-form-item { .el-form-item {
@ -394,7 +515,8 @@ export default {
} }
.el-calendar-table__row { .el-calendar-table__row {
height: 133px; height: 133px;
.prev, .next { .prev,
.next {
pointer-events: none; pointer-events: none;
} }
.el-calendar-day { .el-calendar-day {
@ -411,10 +533,13 @@ export default {
} }
} }
} }
.team-active {// .team-active {
border:2px solid red //
border: 2px solid red;
} }
.class1, .class2, .class3 { .class1,
.class2,
.class3 {
padding: 0; padding: 0;
font-weight: 600; font-weight: 600;
margin-bottom: 2px; margin-bottom: 2px;
@ -458,47 +583,50 @@ export default {
} }
.class1 { .class1 {
.selectDiv { .selectDiv {
.toggle-icon, .toggle-icon-hide { .toggle-icon,
background-color: #FACE00; .toggle-icon-hide {
background-color: #face00;
} }
.el-input--small .el-input__inner { .el-input--small .el-input__inner {
color: #E7A200; color: #e7a200;
background-color: #FFEFC0; background-color: #ffefc0;
} }
} }
.labelClass { .labelClass {
color: #E7A200; color: #e7a200;
background-color: #FFEFC0; background-color: #ffefc0;
} }
} }
.class2 { .class2 {
.selectDiv { .selectDiv {
.toggle-icon, .toggle-icon-hide { .toggle-icon,
background-color: #3984FF; .toggle-icon-hide {
background-color: #3984ff;
} }
.el-input--small .el-input__inner { .el-input--small .el-input__inner {
color: #2D7BFF; color: #2d7bff;
background-color: #BEEAFF; background-color: #beeaff;
} }
} }
.labelClass { .labelClass {
color: #2D7BFF; color: #2d7bff;
background-color: #BEEAFF; background-color: #beeaff;
} }
} }
.class3 { .class3 {
.selectDiv { .selectDiv {
.toggle-icon, .toggle-icon-hide { .toggle-icon,
background-color: #37D97F; .toggle-icon-hide {
background-color: #37d97f;
} }
.el-input--small .el-input__inner { .el-input--small .el-input__inner {
color: #129F51; color: #129f51;
background-color: #E0FFEE; background-color: #e0ffee;
} }
} }
.labelClass { .labelClass {
color: #129F51; color: #129f51;
background-color: #E0FFEE; background-color: #e0ffee;
} }
} }
} }

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', type: 'detail',
btnName: '详情', 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: '删除',