Browse Source

其它报工结束卷 2022年10月26日 sxm

master
[li_she] 3 years ago
parent
commit
bd31aa4e27
  1. 265
      src/views/modules/sys/role-add-or-update.vue
  2. 4
      src/views/modules/yieldReport/otherReport/fqc_split_roll_report.vue
  3. 2
      src/views/modules/yieldReport/otherReport/rework_inspect_report.vue

265
src/views/modules/sys/role-add-or-update.vue

@ -1,7 +1,7 @@
<template>
<el-dialog
class="sl-menu-item"
width="349px"
width="500px"
:title="!dataForm.id ? '新增' : '修改'"
:close-on-click-modal="false"
:visible.sync="visible">
@ -14,14 +14,56 @@
<el-input style="width: 150px" v-model="dataForm.remark" placeholder="备注"></el-input>
</el-form-item>
<el-form-item size="mini" label="授权">
<el-tree
:data="menuList"
:props="menuListTreeProps"
node-key="menuId"
ref="menuListTree"
:default-expand-all="false"
show-checkbox>
</el-tree>
<el-row>
<el-col class="down-tree" :span="14">
<!-- @node-click="getMenuInfo"-->
<!-- @check-change="getMenuInfo"-->
<el-tree
:data="menuList"
:props="menuListTreeProps"
node-key="menuId"
ref="menuListTree"
:default-expand-all="false"
show-checkbox>
<!-- <span class="custom-tree-node" slot-scope="{ node, data }">-->
<!-- <span>{{ node.label }}</span>-->
<!-- <span v-if="data.type ==1">-->
<!-- <el-checkbox type="text" size="mini">只读</el-checkbox>-->
<!-- <el-checkbox type="text" size="mini">删除</el-checkbox>-->
<!-- <el-checkbox type="text" size="mini">修改</el-checkbox>-->
<!-- <el-checkbox type="text" size="mini">完全控制</el-checkbox>-->
<!-- </span>-->
<!-- </span>-->
</el-tree>
</el-col>
<!-- <el-col style="margin-top: 50px;margin-left: 10px" :span="8">-->
<!-- <el-form :inline="true" label-position="top" label-width="95px" style="padding: 5px;">-->
<!-- <el-form-item label="功能编号" prop="menuId">-->
<!-- <el-input style="width: 150px" v-model="menuInfo.menuId"></el-input>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="功能名称" prop="name">-->
<!-- <el-input style="width: 150px" v-model="menuInfo.name"></el-input>-->
<!-- </el-form-item>-->
<!-- <fieldset class="customer-field" style="width: 100%;">-->
<!-- <legend>权限</legend>-->
<!-- <el-form-item>-->
<!-- <el-checkbox v-model="menuInfo.readOnly" label="只读"></el-checkbox>-->
<!-- </el-form-item>-->
<!-- <el-form-item>-->
<!-- <el-checkbox v-model="menuInfo.canModified" label="修改"></el-checkbox>-->
<!-- </el-form-item>-->
<!-- <el-form-item>-->
<!-- <el-checkbox v-model="menuInfo.canDelete" label="删除"></el-checkbox>-->
<!-- </el-form-item>-->
<!-- <el-form-item>-->
<!-- <el-checkbox v-model="menuInfo.fullControl" label="完全控制"></el-checkbox>-->
<!-- </el-form-item>-->
<!-- </fieldset>-->
<!-- </el-form>-->
<!-- </el-col>-->
</el-row>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
@ -32,100 +74,133 @@
</template>
<script>
import {treeDataTranslate} from '@/utils'
import {treeDataTranslate} from '@/utils'
export default {
data() {
return {
visible: false,
menuList: [],
menuListTreeProps: {
label: 'name',
children: 'children'
},
dataForm: {
id: 0,
roleName: '',
remark: ''
export default {
data() {
return {
visible: false,
menuList: [],
menuListTreeProps: {
label: 'name',
children: 'children'
},
menuInfo: {
menuId: null,
name: '',
readOnly: 'N',
canDelete: 'N',
canModified: 'N',
fullControl: 'N'
},
dataForm: {
id: 0,
roleName: '',
remark: ''
},
dataRule: {
roleName: [
{required: true, message: '角色名称不能为空', trigger: 'blur'}
]
},
tempKey: -666666 // key, tree. #
}
},
methods: {
init(id) {
this.dataForm.id = id || 0
this.$http({
url: this.$http.adornUrl('/sys/menu/list'),
method: 'get',
params: this.$http.adornParams()
}).then(({data}) => {
this.menuList = treeDataTranslate(data, 'menuId')
}).then(() => {
this.visible = true
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
this.$refs.menuListTree.setCheckedKeys([])
})
}).then(() => {
if (this.dataForm.id) {
this.$http({
url: this.$http.adornUrl(`/sys/role/info/${this.dataForm.id}`),
method: 'get',
params: this.$http.adornParams()
}).then(({data}) => {
if (data && data.code === 0) {
this.dataForm.roleName = data.role.roleName
this.dataForm.remark = data.role.remark
var idx = data.role.menuIdList.indexOf(this.tempKey)
if (idx !== -1) {
data.role.menuIdList.splice(idx, data.role.menuIdList.length - idx)
}
console.log(data.role.menuIdList)
let x1 = data.role.menuIdList.map(Number)
console.log(x1)
this.$nextTick(() => {
for (let x1Element of x1) {
this.$refs.menuListTree.setChecked(x1Element, true, false)
}
})
}
})
}
})
},
dataRule: {
roleName: [
{required: true, message: '角色名称不能为空', trigger: 'blur'}
]
// ,
getMenuInfo(node, data, value) {
this.menuInfo.menuId = data.data.menuId
this.menuInfo.name = data.data.name
data.readOnly = 'Y'
},
tempKey: -666666 // key, tree. #
}
},
methods: {
init(id) {
this.dataForm.id = id || 0
this.$http({
url: this.$http.adornUrl('/sys/menu/list'),
method: 'get',
params: this.$http.adornParams()
}).then(({data}) => {
this.menuList = treeDataTranslate(data, 'menuId')
}).then(() => {
this.visible = true
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
this.$refs.menuListTree.setCheckedKeys([])
})
}).then(() => {
if (this.dataForm.id) {
this.$http({
url: this.$http.adornUrl(`/sys/role/info/${this.dataForm.id}`),
method: 'get',
params: this.$http.adornParams()
}).then(({data}) => {
if (data && data.code === 0) {
this.dataForm.roleName = data.role.roleName
this.dataForm.remark = data.role.remark
var idx = data.role.menuIdList.indexOf(this.tempKey)
if (idx !== -1) {
data.role.menuIdList.splice(idx, data.role.menuIdList.length - idx)
}
console.log(data.role.menuIdList)
let x1 = data.role.menuIdList.map(Number)
console.log(x1)
this.$nextTick(() => {
for (let x1Element of x1) {
this.$refs.menuListTree.setChecked(x1Element,true,false)
}
//
dataFormSubmit() {
this.$refs['dataForm'].validate((valid) => {
if (valid) {
// let temp = {
// readOnly: 'N',
// canDelete: 'N',
// canModified: 'N',
// fullControl: 'N',
// menuId: this.tempKey
// }
// let menusList = [].concat(this.$refs.menuListTree.getCheckedNodes(), [temp], this.$refs.menuListTree.getHalfCheckedNodes())
this.$http({
url: this.$http.adornUrl(`/sys/role/${!this.dataForm.id ? 'save' : 'update'}`),
method: 'post',
data: this.$http.adornData({
'roleId': this.dataForm.id || undefined,
'roleName': this.dataForm.roleName,
'remark': this.dataForm.remark,
'menuIdList': [].concat(this.$refs.menuListTree.getCheckedKeys(), [this.tempKey], this.$refs.menuListTree.getHalfCheckedKeys())
// 'menuIdList': menusList
})
}
})
}
})
},
//
dataFormSubmit() {
this.$refs['dataForm'].validate((valid) => {
if (valid) {
this.$http({
url: this.$http.adornUrl(`/sys/role/${!this.dataForm.id ? 'save' : 'update'}`),
method: 'post',
data: this.$http.adornData({
'roleId': this.dataForm.id || undefined,
'roleName': this.dataForm.roleName,
'remark': this.dataForm.remark,
'menuIdList': [].concat(this.$refs.menuListTree.getCheckedKeys(), [this.tempKey], this.$refs.menuListTree.getHalfCheckedKeys())
}).then(({data}) => {
if (data && data.code === 0) {
this.$message.success('操作成功')
this.visible = false
this.$emit('refreshDataList')
} else {
this.$message.error(data.msg)
}
})
}).then(({data}) => {
if (data && data.code === 0) {
this.$message.success('操作成功')
this.visible = false
this.$emit('refreshDataList')
} else {
this.$message.error(data.msg)
}
})
}
})
}
})
}
}
}
}
</script>
<style lang="scss">
.down-tree {
height: 300px;
display: block;
overflow-y: scroll;
}
</style>

4
src/views/modules/yieldReport/otherReport/fqc_split_roll_report.vue

@ -227,7 +227,7 @@
</el-button>
</el-form-item>
<el-form-item style="margin-top: 0px;margin-left: 10px;">
<el-button class="customer-bun-mid" type="primary" @click="startProduceModal"
<el-button class="customer-bun-mid" type="primary" @click="showFinishScheduleModal"
:disabled="buttonTags.produceFlag"
style=" margin-bottom: 5px;width: 80px;">
{{buttons.finishSchedule}}
@ -3288,7 +3288,7 @@ export default {
this.scheduleData.seqNo = seqNo;
this.currentRollOps.seqNo = seqNo;
this.operatorData = operatorData;
this.getMultiLanguageList();//
// this.getMultiLanguageList();//
//
this.sfdcTimeList = [];
this.sfdcToolList = [];

2
src/views/modules/yieldReport/otherReport/rework_inspect_report.vue

@ -301,7 +301,7 @@
</el-button>
</el-form-item>
<el-form-item style="margin-top: -24px;margin-left: 100px;">
<el-button class="customer-bun-mid" type="primary" @click="startProduceModal"
<el-button class="customer-bun-mid" type="primary" @click="showFinishScheduleModal"
:disabled="buttonTags.produceFlag"
style=" margin-bottom: 5px;width: 80px;">
{{buttons.finishSchedule}}

Loading…
Cancel
Save