Commit 196af2ec authored by AiNoeLiYa's avatar AiNoeLiYa

Merge branch 'newprotect' of http://gitlab.91isoft.com:90/yangshuo/template_vue into newprotect

# Conflicts:
#	src/views/equipment/draw.vue
#	src/views/equipment/income.vue
#	src/views/equipment/statistic.vue
parents 709d36cb 9930433f
...@@ -4,18 +4,21 @@ ...@@ -4,18 +4,21 @@
<!-- TODO: 基础设备管理--> <!-- TODO: 基础设备管理-->
<el-form ref="queryForm" style="padding: 0 0 0 10px" :model="queryParams" :inline="true"> <el-form ref="queryForm" style="padding: 0 0 0 10px" :model="queryParams" :inline="true">
<el-form-item label="设备名称" prop="roleName"> <el-form-item label="申请状态" prop="state">
<el-input <el-select
v-model="queryParams.deviceName" v-model="queryParams.state"
placeholder="请输入设备名称" placeholder="请选择状态"
clearable clearable
:maxlength="30"
size="small" size="small"
style="width: 150px" style="width: 150px"
@keyup.enter.native="handleQuery" @change="handleQuery"
/> >
<el-option label="所有" value="all"></el-option>
<el-option label="驳回" value="rejected"></el-option>
<el-option label="待审核" value="pending"></el-option>
<el-option label="通过" value="approved"></el-option>
</el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" size="small" icon="el-icon-search" @click="handleQuery">查询</el-button> <el-button type="primary" size="small" icon="el-icon-search" @click="handleQuery">查询</el-button>
</el-form-item> </el-form-item>
...@@ -40,22 +43,7 @@ ...@@ -40,22 +43,7 @@
{{ scope.row.deviceId || '-' }} {{ scope.row.deviceId || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="LOT" prop="LOT"> <el-table-column label="申请人" prop="createBy">
<template slot-scope="scope">
{{ scope.row.deviceId || '-' }}
</template>
</el-table-column>
<el-table-column label="位置" prop="location">
<template slot-scope="scope">
{{ scope.row.location || '-' }}
</template>
</el-table-column>
<el-table-column label="厚度" prop="ply">
<template slot-scope="scope">
{{ scope.row.ply || '-' }}
</template>
</el-table-column>
<el-table-column label="操作员" prop="createBy">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.createBy || '-' }} {{ scope.row.createBy || '-' }}
</template> </template>
...@@ -72,7 +60,7 @@ ...@@ -72,7 +60,7 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" class-name="small-padding fixed-width" width="140px"> <el-table-column label="操作" class-name="small-padding fixed-width" width="140px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button v-if="scope.row.state !== ' '" type="typeParent" :size="size" @click="handleDetail(scope.row)"> <el-button v-if="scope.row.state !== ' '" :type="typeParent" :size="size" @click="handleDetail(scope.row)">
详情 详情
</el-button> </el-button>
<!-- <el-button v-if="scope.row.state !== ' '" type="typeParent" :size="size" @click="handleUpdate(scope.row)"> <!-- <el-button v-if="scope.row.state !== ' '" type="typeParent" :size="size" @click="handleUpdate(scope.row)">
...@@ -145,6 +133,10 @@ ...@@ -145,6 +133,10 @@
<el-form-item label="状态" prop="state"> <el-form-item label="状态" prop="state">
<el-input v-model.trim="singleDetails.state" :readonly="isReadOnly" /> <el-input v-model.trim="singleDetails.state" :readonly="isReadOnly" />
</el-form-item> </el-form-item>
<el-form-item>
<el-button type="success" @click="handleApprove">通过</el-button>
<el-button type="primary" @click="handleReject">驳回</el-button>
</el-form-item>
</el-form> </el-form>
</el-dialog> </el-dialog>
...@@ -323,6 +315,22 @@ export default { ...@@ -323,6 +315,22 @@ export default {
console.log(this.roleList) console.log(this.roleList)
this.loading = false this.loading = false
}, },
handleReject() {
this.$message({
message: '操作完成',
type: 'warning'
});
this.openDetails = false
this.reset()
},
handleApprove(){
this.$message({
message: '操作完成',
type: 'success'
});
this.openDetails = false
this.reset()
},
// 取消按钮 // 取消按钮
cancel() { cancel() {
this.open = false this.open = false
......
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
size="small" size="small"
icon="el-icon-download" icon="el-icon-download"
@click="handleExport" @click="handleExport"
>导出</el-button> >盘点</el-button>
<!-- <coolbutton :type="exporttypePrimary" :name="exportName" :icon="exportIcon" :size="exportSize" @btn-click="handleExport" />--> <!-- <coolbutton :type="exporttypePrimary" :name="exportName" :icon="exportIcon" :size="exportSize" @btn-click="handleExport" />-->
<!-- <el-button size="mini" @click="resetQuery">重置</el-button>--> <!-- <el-button size="mini" @click="resetQuery">重置</el-button>-->
</el-form-item> </el-form-item>
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
<div class="placeholder" /> <div class="placeholder" />
<div style="padding:10px"> <div style="padding:10px">
<div class="mb12 font-small-bold">设备受入列表</div> <div class="mb12 font-small-bold">设备受入列表</div>
<el-table v-loading="loading" border :data="list" @selection-change="handleSelectionChange"> <!-- <el-table v-loading="loading" border :data="list" @selection-change="handleSelectionChange"> -->
<!-- <el-table-column type="selection" width="55" align="center" />--> <!-- <el-table-column type="selection" width="55" align="center" />-->
<!-- &lt;!&ndash; <el-table-column type="index" label="序号" width="50" />&ndash;&gt;--> <!-- &lt;!&ndash; <el-table-column type="index" label="序号" width="50" />&ndash;&gt;-->
<!-- <el-table-column label="访问编号" width="100" align="center" prop="infoId" show-overflow-tooltip>--> <!-- <el-table-column label="访问编号" width="100" align="center" prop="infoId" show-overflow-tooltip>-->
...@@ -120,15 +120,15 @@ ...@@ -120,15 +120,15 @@
<!-- &lt;!&ndash; </template>&ndash;&gt;--> <!-- &lt;!&ndash; </template>&ndash;&gt;-->
<!-- &lt;!&ndash; </el-table-column>&ndash;&gt;--> <!-- &lt;!&ndash; </el-table-column>&ndash;&gt;-->
<!-- <el-table-column label="登录状态" align="center" prop="status" :formatter="statusFormat" />--> <!-- <el-table-column label="登录状态" align="center" prop="status" :formatter="statusFormat" />-->
<el-table-column type="index" width="55" label="序号" align="center" /> <!-- <el-table-column type="index" width="55" label="序号" align="center" />
<!-- <el-table-column label="访问编号" align="center" prop="businessId" />--> <el-table-column label="访问编号" align="center" prop="businessId" />-->
<el-table-column label="设备名称" align="center" prop="username" /> <!-- <el-table-column label="设备名称" align="center" prop="username" />
<el-table-column label="XXXX" align="center" prop="ipaddr" width="130" :show-overflow-tooltip="true" /> <el-table-column label="XXXX" align="center" prop="ipaddr" width="130" :show-overflow-tooltip="true" />
<el-table-column label="XXXX" align="center" prop="loginLocation" :show-overflow-tooltip="true" /> <el-table-column label="XXXX" align="center" prop="loginLocation" :show-overflow-tooltip="true" /> -->
<!-- <el-table-column label="浏览器" align="center" prop="browser" /> <!-- <el-table-column label="浏览器" align="center" prop="browser" />
<el-table-column label="操作系统" align="center" prop="os" />--> <el-table-column label="操作系统" align="center" prop="os" />-->
<!-- <el-table-column label="登录状态" align="center" prop="status" :formatter="statusFormat" />--> <!-- <el-table-column label="登录状态" align="center" prop="status" :formatter="statusFormat" />-->
<el-table-column label="XXXX" align="center" prop="status"> <!-- <el-table-column label="XXXX" align="center" prop="status">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.status === '0'">失败</span> <span v-if="scope.row.status === '0'">失败</span>
<span v-if="scope.row.status === '1'">成功</span> <span v-if="scope.row.status === '1'">成功</span>
...@@ -146,14 +146,54 @@ ...@@ -146,14 +146,54 @@
</el-table-column> </el-table-column>
<el-table-column label="操作"> <el-table-column label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- <coolbutton :type="textPrimary" :name="deleteName" :size="deleteSize" @btn-click="handleDelete(scope.row.businessId)" />--> <coolbutton :type="textPrimary" :name="deleteName" :size="deleteSize" @btn-click="handleDelete(scope.row.businessId)" />
<el-button <el-button
type="text" type="text"
size="small" size="small"
@click="handleDelete(scope.row.businessId)" @click="handleDelete(scope.row.businessId)"
>删除</el-button> >删除</el-button>
</template> </template>
</el-table-column> -->
<!-- </el-table> -->
<el-table v-loading="loading" border :data="processList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" />
<el-table-column type="index" label="序号" width="80" />
<el-table-column label="工序名称" prop="processCode" :show-overflow-tooltip="true">
<template slot-scope="scope">
{{ scope.row.processCode || '-' }}
</template>
</el-table-column>
<el-table-column label="编码" prop="lot">
<template slot-scope="scope">
{{ scope.row.lot || '-' }}
</template>
</el-table-column>
<el-table-column label="位置" prop="location">
<template slot-scope="scope">
{{ scope.row.location || '-' }}
</template>
</el-table-column>
<el-table-column label="位置" prop="location">
<template slot-scope="scope">
{{ scope.row.location || '-' }}
</template>
</el-table-column> </el-table-column>
<el-table-column label="厚度" prop="thickness">
<template slot-scope="scope">
{{ scope.row.thickness || '-' }}
</template>
</el-table-column>
<el-table-column label="创建人" prop="createBy">
<template slot-scope="scope">
{{ scope.row.createBy || '-' }}
</template>
</el-table-column>
<el-table-column label="创建时间" :show-overflow-tooltip="true" align="center" prop="createTime">
<template slot-scope="scope">
<span>{{ scope.row.createTime | transformDateByFormat('YYYY-MM-DD HH:mm') }}</span>
</template>
</el-table-column>
</el-table> </el-table>
</div> </div>
<pagination <pagination
...@@ -228,6 +268,7 @@ export default { ...@@ -228,6 +268,7 @@ export default {
components: { Template, Coolbutton }, components: { Template, Coolbutton },
data() { data() {
return { return {
processList: [{ processCode: '001', lot: 'xxx', location: '位置01', thickness: '50', createBy: '操作员01', createTime: new Date() }, { processCode: '002', lot: 'xxx', location: '位置02', thickness: '70', createBy: '操作员02', createTime: new Date() }, { processCode: '001', lot: 'xxx', location: '位置01', thickness: '50', createBy: '操作员01', createTime: new Date() }, { processCode: '001', lot: 'xxx', location: '位置01', thickness: '50', createBy: '操作员01', createTime: new Date() }, { processCode: '001', lot: 'xxx', location: '位置01', thickness: '50', createBy: '操作员01', createTime: new Date() }, { processCode: '001', lot: 'xxx', location: '位置01', thickness: '50', createBy: '操作员01', createTime: new Date() }, { processCode: '001', lot: 'xxx', location: '位置01', thickness: '50', createBy: '操作员01', createTime: new Date() }, { processCode: '001', lot: 'xxx', location: '位置01', thickness: '50', createBy: '操作员01', createTime: new Date() }, { processCode: '001', lot: 'xxx', location: '位置01', thickness: '50', createBy: '操作员01', createTime: new Date() }, { processCode: '001', lot: 'xxx', location: '位置01', thickness: '50', createBy: '操作员01', createTime: new Date() }],
endDatePicker: this.handelFixDate(), endDatePicker: this.handelFixDate(),
// 自定义按钮 // 自定义按钮
deletetypePrimary: 'danger', deletetypePrimary: 'danger',
......
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form ref="queryForm" style="padding: 0 0 0 10px" :model="queryParams" :inline="true"> <el-form ref="queryForm" style="padding: 0 0 0 10px" :model="queryParams" :inline="true">
<el-form-item label="设备名称" prop="roleName"> <el-form-item label="设备编码" prop="equipmentCode">
<el-input <el-input
v-model="queryParams.roleName" v-model="queryParams.equipmentCode"
placeholder="请输入设备名称" placeholder="请输入设备编码"
clearable clearable
:maxlength="30" :maxlength="30"
size="small" size="small"
...@@ -12,10 +12,20 @@ ...@@ -12,10 +12,20 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="设备编码" prop="roleKey"> <el-form-item label="lot" prop="lot">
<el-input <el-input
v-model="queryParams.roleKey" v-model="queryParams.roleKey"
placeholder="请输入设备编码" placeholder="请输入设备lot"
clearable
size="small"
style="width: 150px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="位置" prop="location">
<el-input
v-model="queryParams.location"
placeholder="请输入设备位置"
clearable clearable
size="small" size="small"
style="width: 150px" style="width: 150px"
...@@ -40,43 +50,46 @@ ...@@ -40,43 +50,46 @@
<div class="placeholder" /> <div class="placeholder" />
<div style="padding:5px 10px"> <div style="padding:5px 10px">
<div class="mb12 font-small-bold">设备管理列表</div> <div class="mb12 font-small-bold">设备管理列表</div>
<el-table v-loading="loading" border :data="roleList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" border :data="equipmentList" @selection-change="handleSelectionChange">
<el-table-column label="名称" prop="roleName" :show-overflow-tooltip="true"> <el-table-column type="selection" width="55" />
<el-table-column type="index" label="序号" width="80" />
<el-table-column label="编码" prop="equipmentCode" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.roleName || '-' }} {{ scope.row.equipmentCode || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="编码" prop="roleKey"> <el-table-column label="lot" prop="lot" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.roleKey || '-' }} {{ scope.row.lot || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="lot" prop="roleSort"> <el-table-column label="位置" prop="location">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.roleSort || '-' }} {{ scope.row.location || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="位置" prop="roleSort"> <el-table-column label="厚度" prop="thickness">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.roleSort || '-' }} {{ scope.row.thickness || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="厚度" prop="roleSort"> <el-table-column label="创建员" prop="createBy">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.roleSort || '-' }} {{ scope.row.createBy || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="创建人" prop="roleSort"> <el-table-column label="操作时间" :show-overflow-tooltip="true" align="center" prop="createTime">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.roleSort || '-' }} <span>{{ scope.row.createTime | transformDateByFormat('YYYY-MM-DD HH:mm') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="创建时间" :show-overflow-tooltip="true" align="center" prop="createTime"> <el-table-column label="操作" class-name="small-padding fixed-width" width="150px">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.createDate | transformDateByFormat('YYYY-MM-DD HH:mm') }}</span> <el-button :type="typeParent" :size="size" @click="handleDetail(scope.row)">
详情
</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
<pagination <pagination
...@@ -130,6 +143,29 @@ ...@@ -130,6 +143,29 @@
<el-button type="primary" @click="submitForm">确 定</el-button> <el-button type="primary" @click="submitForm">确 定</el-button>
</div> </div>
</el-dialog> </el-dialog>
<!-- TODO: 单项详情信息表单配置 -->
<el-dialog class="aboutSingleDetails" :title="title" :visible.sync="openDetails" width="700px" append-to-body>
<el-form ref="formDetails" :model="singleDetails" size="small" label-width="90px">
<el-form-item label="编码:" prop="processName">
<el-input v-model.trim="singleDetails.equipmentCode" :readonly="true" />
</el-form-item>
<el-form-item label="lot:" prop="workshop">
<el-input v-model.trim="singleDetails.lot" :readonly="true" />
</el-form-item>
<el-form-item label="位置:" prop="location">
<el-input v-model.trim="singleDetails.location" :readonly="true" />
</el-form-item>
<el-form-item label="厚度:" prop="thickness">
<el-input v-model.trim="singleDetails.thickness" :readonly="true" />
</el-form-item>
<el-form-item label="操作时间:" prop="createTime">
{{ singleDetails.createTime | transformDateByFormat('YYYY-MM-DD HH:mm') }}
</el-form-item>
<el-form-item label="操作员:" prop="createBy">
<el-input v-model.trim="singleDetails.createBy" :readonly="true" />
</el-form-item>
</el-form>
</el-dialog>
</div> </div>
</template> </template>
...@@ -144,7 +180,21 @@ export default { ...@@ -144,7 +180,21 @@ export default {
components: { Coolbutton }, components: { Coolbutton },
data() { data() {
return { return {
check: '盘点', // TODO: 表单里的单项详情参数
singleDetails: {
equipmentName: '',
equipmentCode: '',
lot: '',
location: '',
thickness: '',
createBy: '',
createTime: ''
},
// 是否显示弹出层(数据详情)
openDetails: false,
// TODO: 模拟测试数据
equipmentList: [{ equipmentCode: '001', lot: 'xxx', location: '位置01', thickness: '50', createBy: '操作员01', createTime: new Date() }, { equipmentCode: '002', lot: 'xxx', location: '位置02', thickness: '70', createBy: '操作员02', createTime: new Date() }, { equipmentCode: '001', lot: 'xxx', location: '位置01', thickness: '50', createBy: '操作员01', createTime: new Date() }, { equipmentCode: '001', lot: 'xxx', location: '位置01', thickness: '50', createBy: '操作员01', createTime: new Date() }, { equipmentCode: '001', lot: 'xxx', location: '位置01', thickness: '50', createBy: '操作员01', createTime: new Date() }, { equipmentCode: '001', lot: 'xxx', location: '位置01', thickness: '50', createBy: '操作员01', createTime: new Date() }, { equipmentCode: '001', lot: 'xxx', location: '位置01', thickness: '50', createBy: '操作员01', createTime: new Date() }, { equipmentCode: '001', lot: 'xxx', location: '位置01', thickness: '50', createBy: '操作员01', createTime: new Date() }, { equipmentCode: '001', lot: 'xxx', location: '位置01', thickness: '50', createBy: '操作员01', createTime: new Date() }, { equipmentCode: '001', lot: 'xxx', location: '位置01', thickness: '50', createBy: '操作员01', createTime: new Date() }],
check: '开始盘点',
typeParent: 'text', typeParent: 'text',
typePrimary: 'primary', typePrimary: 'primary',
typeSuccess: 'success', typeSuccess: 'success',
...@@ -282,6 +332,13 @@ export default { ...@@ -282,6 +332,13 @@ export default {
// }); // });
}, },
methods: { methods: {
// TODO: 获取所选行详情信息操作
handleDetail(row) {
this.singleDetails = this.formReset
this.singleDetails = row
this.title = '详情信息'
this.openDetails = !this.openDetails
},
handelTab(i, e) { handelTab(i, e) {
const that = this const that = this
if (!that.$refs['input' + i]) { if (!that.$refs['input' + i]) {
...@@ -608,6 +665,18 @@ export default { ...@@ -608,6 +665,18 @@ export default {
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.aboutSingleDetails{
.el-form-item{
.el-input >>> .el-input__inner {
-webkit-appearance: none;
background-color: #FFF;
background-image: none;
border-radius: 4px;
border: 0;
width: 100%;
}
}
}
.app-container { .app-container {
font-size: 18px; font-size: 18px;
padding: 0; padding: 0;
......
This diff is collapsed.
This diff is collapsed.
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form ref="queryForm" style="padding: 0 0 0 10px" :model="queryParams" :inline="true"> <el-form ref="queryForm" style="padding: 0 0 0 10px" :model="queryParams" :inline="true">
<el-form-item label="设备名称" prop="roleName"> <el-form-item label="编码" prop="equipmentCode">
<el-input <el-input
v-model="queryParams.roleName" v-model="queryParams.equipmentCode"
placeholder="请输入设备名称" placeholder="请输入编码"
clearable clearable
:maxlength="30" :maxlength="30"
size="small" size="small"
...@@ -12,10 +12,20 @@ ...@@ -12,10 +12,20 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="设备编码" prop="roleKey"> <el-form-item label="lot" prop="lot">
<el-input <el-input
v-model="queryParams.roleKey" v-model="queryParams.roleKey"
placeholder="请输入设备编码" placeholder="请输入设备lot"
clearable
size="small"
style="width: 150px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="位置" prop="location">
<el-input
v-model="queryParams.location"
placeholder="请输入设备位置"
clearable clearable
size="small" size="small"
style="width: 150px" style="width: 150px"
...@@ -30,9 +40,10 @@ ...@@ -30,9 +40,10 @@
<coolbutton <coolbutton
style="padding: 8px 7px;" style="padding: 8px 7px;"
:type="typePrimary" :type="typePrimary"
:name="check" :name="addProcess"
:size="smallSize" :size="smallSize"
:icon="addIcon" :icon="addIcon"
@btn-click="handleAdd"
/> />
</el-form-item> </el-form-item>
</div> </div>
...@@ -40,40 +51,41 @@ ...@@ -40,40 +51,41 @@
<div class="placeholder" /> <div class="placeholder" />
<div style="padding:5px 10px"> <div style="padding:5px 10px">
<div class="mb12 font-small-bold">设备管理列表</div> <div class="mb12 font-small-bold">设备管理列表</div>
<el-table v-loading="loading" border :data="roleList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" border :data="processList" @selection-change="handleSelectionChange">
<el-table-column label="名称" prop="roleName" :show-overflow-tooltip="true"> <el-table-column type="index" label="序号" width="80" />
<el-table-column label="工序名称" prop="processCode" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.roleName || '-' }} {{ scope.row.processCode || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="编码" prop="roleKey"> <el-table-column label="编码" prop="lot">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.roleKey || '-' }} {{ scope.row.lot || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="lot" prop="roleSort"> <el-table-column label="位置" prop="location">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.roleSort || '-' }} {{ scope.row.location || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="位置" prop="roleSort"> <el-table-column label="位置" prop="location">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.roleSort || '-' }} {{ scope.row.location || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="厚度" prop="roleSort"> <el-table-column label="厚度" prop="thickness">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.roleSort || '-' }} {{ scope.row.thickness || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="创建人" prop="roleSort"> <el-table-column label="操作员" prop="createBy">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.roleSort || '-' }} {{ scope.row.createBy || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="创建时间" :show-overflow-tooltip="true" align="center" prop="createTime"> <el-table-column label="操作时间" :show-overflow-tooltip="true" align="center" prop="createTime">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.createDate | transformDateByFormat('YYYY-MM-DD HH:mm') }}</span> <span>{{ scope.row.createTime | transformDateByFormat('YYYY-MM-DD HH:mm') }}</span>
</template> </template>
</el-table-column> </el-table-column>
...@@ -90,39 +102,23 @@ ...@@ -90,39 +102,23 @@
<!-- 添加或修改设备配置对话框 --> <!-- 添加或修改设备配置对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="80px"> <el-form ref="form" :model="form" :rules="rules" size="small" label-width="80px">
<el-form-item label="名称" prop="roleName"> <el-form-item label="工序名称" prop="roleKey">
<el-input v-model.trim="form.roleName" show-word-limit :maxlength="30" placeholder="请输入设备名称" /> <el-input show-word-limit :maxlength="30" placeholder="请输入工序名称" />
</el-form-item> </el-form-item>
<el-form-item label="设备来源" prop="roleKey"> <el-form-item label="编码" prop="roleKey">
<el-input v-model.trim="form.roleKey" show-word-limit :maxlength="30" placeholder="请输入设备来源" /> <el-input show-word-limit :maxlength="30" placeholder="请输入设备编码" />
</el-form-item> </el-form-item>
<el-form-item label="排序" prop="roleSort"> <el-form-item label="lot" prop="roleSort">
<el-input-number v-model="form.roleSort" style="width: 100%" controls-position="right" :min="0" /> <el-input-number style="width: 100%" controls-position="right" :min="0" />
</el-form-item> </el-form-item>
<el-form-item label="设备批次"> <el-form-item label="位置" prop="roleName">
<!-- <el-checkbox v-model="menuExpand" @change="handleCheckedTreeExpand($event, 'menu')">展开/折叠</el-checkbox>--> <el-input show-word-limit :maxlength="30" placeholder="请输入设备位置" />
<!-- <el-checkbox v-model="menuNodeAll" @change="handleCheckedTreeNodeAll($event, 'menu')">全选/全不选</el-checkbox>--> </el-form-item>
<!-- <el-checkbox v-model="form.menuCheckStrictly" @change="handleCheckedTreeConnect($event, 'menu')">父子联动</el-checkbox>--> <el-form-item label="厚度" prop="roleName">
<el-tree <el-input show-word-limit :maxlength="30" placeholder="请输入设备厚度" />
ref="menu"
class="tree-border"
:data="menuOptions"
show-checkbox
node-key="id"
check-strictly
empty-text="加载中,请稍后"
:props="defaultProps"
@check-change="handleMenuCheckChange"
/>
</el-form-item> </el-form-item>
<el-form-item label="备注"> <el-form-item label="备注">
<el-input <el-input maxlength="200" show-word-limit type="textarea" placeholder="请输入内容" />
v-model.trim="form.remark"
maxlength="200"
show-word-limit
type="textarea"
placeholder="请输入内容"
/>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
...@@ -144,7 +140,21 @@ export default { ...@@ -144,7 +140,21 @@ export default {
components: { Coolbutton }, components: { Coolbutton },
data() { data() {
return { return {
check: '盘点', // TODO: 表单里的单项详情参数
singleDetails: {
equipmentName: '',
equipmentCode: '',
lot: '',
location: '',
thickness: '',
createBy: '',
createTime: ''
},
// 是否显示弹出层(数据详情)
openDetails: false,
// TODO: 模拟测试数据
processList: [{ processCode: '001', lot: 'xxx', location: '位置01', thickness: '50', createBy: '操作员01', createTime: new Date() }, { processCode: '002', lot: 'xxx', location: '位置02', thickness: '70', createBy: '操作员02', createTime: new Date() }, { processCode: '001', lot: 'xxx', location: '位置01', thickness: '50', createBy: '操作员01', createTime: new Date() }, { processCode: '001', lot: 'xxx', location: '位置01', thickness: '50', createBy: '操作员01', createTime: new Date() }, { processCode: '001', lot: 'xxx', location: '位置01', thickness: '50', createBy: '操作员01', createTime: new Date() }, { processCode: '001', lot: 'xxx', location: '位置01', thickness: '50', createBy: '操作员01', createTime: new Date() }, { processCode: '001', lot: 'xxx', location: '位置01', thickness: '50', createBy: '操作员01', createTime: new Date() }, { processCode: '001', lot: 'xxx', location: '位置01', thickness: '50', createBy: '操作员01', createTime: new Date() }, { processCode: '001', lot: 'xxx', location: '位置01', thickness: '50', createBy: '操作员01', createTime: new Date() }, { processCode: '001', lot: 'xxx', location: '位置01', thickness: '50', createBy: '操作员01', createTime: new Date() }],
addProcess: '入库',
typeParent: 'text', typeParent: 'text',
typePrimary: 'primary', typePrimary: 'primary',
typeSuccess: 'success', typeSuccess: 'success',
...@@ -282,6 +292,13 @@ export default { ...@@ -282,6 +292,13 @@ export default {
// }); // });
}, },
methods: { methods: {
// TODO: 获取所选行详情信息操作
handleDetail(row) {
this.singleDetails = this.formReset
this.singleDetails = row
this.title = '详情信息'
this.openDetails = !this.openDetails
},
handelTab(i, e) { handelTab(i, e) {
const that = this const that = this
if (!that.$refs['input' + i]) { if (!that.$refs['input' + i]) {
...@@ -485,7 +502,7 @@ export default { ...@@ -485,7 +502,7 @@ export default {
this.reset() this.reset()
this.getMenuTreeselect() this.getMenuTreeselect()
this.open = true this.open = true
this.title = '添加角色' this.title = '设备入库'
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
......
...@@ -2,35 +2,16 @@ ...@@ -2,35 +2,16 @@
<div class="app-container"> <div class="app-container">
<el-form ref="queryForm" style="padding: 0 0 0 10px" :model="queryParams" :inline="true"> <el-form ref="queryForm" style="padding: 0 0 0 10px" :model="queryParams" :inline="true">
<el-form-item label="设备名称" prop="roleName"> <el-form-item label="设备名称" prop="roleName">
<el-input <el-input v-model="queryParams.roleName" placeholder="请输入设备名称" clearable :maxlength="30" size="small"
v-model="queryParams.roleName" style="width: 150px" @keyup.enter.native="handleQuery" />
placeholder="请输入设备名称"
clearable
:maxlength="30"
size="small"
style="width: 150px"
@keyup.enter.native="handleQuery"
/>
</el-form-item> </el-form-item>
<el-form-item label="设备编码" prop="roleKey"> <el-form-item label="设备编码" prop="roleKey">
<el-input <el-input v-model="queryParams.roleKey" placeholder="请输入设备编码" clearable size="small" style="width: 150px"
v-model="queryParams.roleKey" @keyup.enter.native="handleQuery" />
placeholder="请输入设备编码"
clearable
size="small"
style="width: 150px"
@keyup.enter.native="handleQuery"
/>
</el-form-item> </el-form-item>
<el-form-item label="lot" prop="roleKey"> <el-form-item label="lot" prop="roleKey">
<el-input <el-input v-model="queryParams.roleKey" placeholder="请输入设备lot" clearable size="small" style="width: 150px"
v-model="queryParams.roleKey" @keyup.enter.native="handleQuery" />
placeholder="请输入设备lot"
clearable
size="small"
style="width: 150px"
@keyup.enter.native="handleQuery"
/>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" size="small" icon="el-icon-search" @click="handleQuery">查询</el-button> <el-button type="primary" size="small" icon="el-icon-search" @click="handleQuery">查询</el-button>
...@@ -39,17 +20,18 @@ ...@@ -39,17 +20,18 @@
<el-form-item /> <el-form-item />
</div> </div>
</el-form> </el-form>
<div class="placeholder" /> <div class="placeholder"></div>
<div class="Role" style="width: 100%; height: 400px; display: flex; padding-left: 100px"> <div class="Role" style="width: 100%; height: 600px; display: flex; padding-left: 100px">
<!--左边两个图--> <!--左边两个图-->
<div class="left-charts" style="width: 100%; height: 100%; display: flex; flex-direction: column;"> <div class="left-charts" style="width: 50%; display: flex; flex-direction: column;">
<div id="myChart1" style="width: 50%; height: 50%;" /> <div id="myChart1" style="flex: 1; margin-bottom: 100px;"></div>
<div id="myChart2" style="width: 50%; height: 50%;" /> <div id="myChart2" style="flex: 1;"></div>
</div> </div>
<!--右边两个图--> <!--右边两个图-->
<div class="right-charts" style="width: 100%; height: 100%; display: flex; flex-direction: column;"> <div class="right-charts" style="width: 50%; display: flex; flex-direction: column;">
<div id="myChart5" style="width: 50%; height: 50%;" /> <div id="myChart5" style="flex: 1; margin-bottom: 60px;"></div>
<div id="myChart3" style="width: 50%; height: 50%;" /> <div id="myChart3" style="flex: 1;"></div>
</div> </div>
</div> </div>
</div> </div>
...@@ -57,17 +39,17 @@ ...@@ -57,17 +39,17 @@
<script> <script>
import { import {
addRole, listRole,
changeRoleStatus, getRole,
dataScope,
delRole, delRole,
addRole,
updateRole,
exportRole, exportRole,
getRole, dataScope,
listRole, changeRoleStatus
updateRole
} from '@/api/system/role' } from '@/api/system/role'
import {roleMenuTreeselect, roleMenuTreeselectMC, treeselect as menuTreeselect} from '@/api/system/menu' import { roleMenuTreeselectMC, treeselect as menuTreeselect, roleMenuTreeselect } from '@/api/system/menu'
import {roleDeptTreeselect, treeselect as deptTreeselect} from '@/api/system/dept' import { treeselect as deptTreeselect, roleDeptTreeselect } from '@/api/system/dept'
// import { getRolesByInsId } from '../../../api/businessManage/template' // import { getRolesByInsId } from '../../../api/businessManage/template'
import * as echarts from 'echarts' import * as echarts from 'echarts'
...@@ -204,8 +186,8 @@ export default { ...@@ -204,8 +186,8 @@ export default {
deptOptions: [] deptOptions: []
} }
}, },
mounted: function() { mounted: function () {
this.$nextTick(function() { this.$nextTick(function () {
this.drawLine5('myChart5') this.drawLine5('myChart5')
}) })
...@@ -346,7 +328,7 @@ export default { ...@@ -346,7 +328,7 @@ export default {
shadowOffsetX: 0, shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)' shadowColor: 'rgba(0, 0, 0, 0.5)'
}, },
color: function(params) { color: function (params) {
// 自定义颜色 // 自定义颜色
var colorList = ['red', '#16deb6', '#b24999'] var colorList = ['red', '#16deb6', '#b24999']
return colorList[params.dataIndex] return colorList[params.dataIndex]
...@@ -411,7 +393,7 @@ export default { ...@@ -411,7 +393,7 @@ export default {
shadowOffsetX: 0, shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)' shadowColor: 'rgba(0, 0, 0, 0.5)'
}, },
color: function(params) { color: function (params) {
// 自定义颜色 // 自定义颜色
var colorList = ['red', '#7fdcca'] var colorList = ['red', '#7fdcca']
return colorList[params.dataIndex] return colorList[params.dataIndex]
...@@ -536,14 +518,14 @@ export default { ...@@ -536,14 +518,14 @@ export default {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(function() { }).then(function () {
return changeRoleStatus(row.businessId, row.flag) return changeRoleStatus(row.businessId, row.flag)
}).then(() => { }).then(() => {
this.$message({ this.$message({
message: text + '成功', message: text + '成功',
type: 'success' type: 'success'
}) })
}).catch(function() { }).catch(function () {
row.flag = row.flag === '0' ? '1' : '0' row.flag = row.flag === '0' ? '1' : '0'
}) })
}, },
...@@ -680,7 +662,7 @@ export default { ...@@ -680,7 +662,7 @@ export default {
this.title = '分配数据权限' this.title = '分配数据权限'
}, },
/** 提交按钮 */ /** 提交按钮 */
submitForm: function() { submitForm: function () {
this.$refs['form'].validate(valid => { this.$refs['form'].validate(valid => {
if (valid) { if (valid) {
this.form.menuCheckStrictly = false this.form.menuCheckStrictly = false
...@@ -703,7 +685,7 @@ export default { ...@@ -703,7 +685,7 @@ export default {
}) })
}, },
/** 提交按钮(数据权限) */ /** 提交按钮(数据权限) */
submitDataScope: function() { submitDataScope: function () {
if (this.form.businessId !== undefined && this.form.menuId !== undefined) { if (this.form.businessId !== undefined && this.form.menuId !== undefined) {
this.form.deptIds = this.getDeptAllCheckedKeys() this.form.deptIds = this.getDeptAllCheckedKeys()
dataScope(this.form).then(response => { dataScope(this.form).then(response => {
...@@ -720,7 +702,7 @@ export default { ...@@ -720,7 +702,7 @@ export default {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(function() { }).then(function () {
return delRole(roleIds) return delRole(roleIds)
}).then(() => { }).then(() => {
this.getList() this.getList()
...@@ -728,7 +710,7 @@ export default { ...@@ -728,7 +710,7 @@ export default {
message: '删除成功', message: '删除成功',
type: 'success' type: 'success'
}) })
}).catch(function() { }).catch(function () {
}) })
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
...@@ -738,7 +720,7 @@ export default { ...@@ -738,7 +720,7 @@ export default {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(function() { }).then(function () {
return exportRole(queryParams).then(response => { return exportRole(queryParams).then(response => {
const blob = new Blob([response]) const blob = new Blob([response])
const downloadElement = document.createElement('a') const downloadElement = document.createElement('a')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment