|
@@ -9,76 +9,84 @@
|
|
|
<!-- 列表区 -->
|
|
|
<div class="el-table-container">
|
|
|
<div class="el-table-inner-container">
|
|
|
- <el-table ref="workSectionTable" v-loading="workSectionLoading" :data="workSectionList" row-key="id" height="100%" highlight-current-row @current-change="handleWorkSectionChange">
|
|
|
+ <el-table
|
|
|
+ ref="workSectionTable"
|
|
|
+ v-loading="workSectionLoading"
|
|
|
+ :data="workSectionList"
|
|
|
+ row-key="id"
|
|
|
+ height="100%"
|
|
|
+ highlight-current-row
|
|
|
+ @current-change="handleWorkSectionChange"
|
|
|
+ >
|
|
|
<el-table-column label="行号" type="index" width="50" align="center" />
|
|
|
<el-table-column label="工段编码" prop="deptCode" width="80" align="center" />
|
|
|
<el-table-column label="工段名称" prop="label" align="center" />
|
|
|
</el-table>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </section >
|
|
|
+ </section>
|
|
|
|
|
|
<!-- 右侧区域 -->
|
|
|
<section class="list-part-container column-container" style="flex: 2">
|
|
|
- <section class="list-part-container column-container " style="flex: 1;">
|
|
|
- <!-- 搜索区域 -->
|
|
|
- <el-form class="list-search-container" :inline="true">
|
|
|
- <el-form-item class="section-title" label="设备资源" />
|
|
|
- <el-form-item>
|
|
|
- <div class="list-btns-container">
|
|
|
+ <section class="list-part-container column-container" style="flex: 1">
|
|
|
+ <!-- 搜索区域 -->
|
|
|
+ <el-form class="list-search-container" :inline="true">
|
|
|
+ <el-form-item class="section-title" label="设备资源" />
|
|
|
+ <el-form-item>
|
|
|
<el-button type="primary" icon="Plus" @click="handleShowEquipmentFormDialog()">新增</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+
|
|
|
+ <!-- 列表区 -->
|
|
|
+ <div class="el-table-container">
|
|
|
+ <div class="el-table-inner-container">
|
|
|
+ <el-table v-loading="equipmentLoading" :data="equipmentList" height="100%" @selection-change="handleSelectionChange">
|
|
|
+ <el-table-column label="设备类别" prop="categoryName" width="150" align="center" />
|
|
|
+ <el-table-column label="设备名称" prop="equipmentName" width="150" align="center" />
|
|
|
+ <el-table-column label="规格型号" prop="standard" width="150" align="center" />
|
|
|
+ <el-table-column label="设备编码" prop="equipmentCode" width="150" align="center" />
|
|
|
+ <el-table-column label="使用部门" prop="usageDeptAlias" width="150" align="center" />
|
|
|
+ <el-table-column label="备注" prop="remark" header-align="center" align="center" />
|
|
|
+ </el-table>
|
|
|
</div>
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
-
|
|
|
- <!-- 列表区 -->
|
|
|
- <div class="el-table-container">
|
|
|
- <div class="el-table-inner-container">
|
|
|
- <el-table v-loading="equipmentLoading" :data="equipmentList" height="100%" @selection-change="handleSelectionChange">
|
|
|
- <el-table-column label="设备类别" prop="categoryName" width="150" align="center" />
|
|
|
- <el-table-column label="设备名称" prop="equipmentName" width="150" align="center" />
|
|
|
- <el-table-column label="规格型号" prop="standard" width="150" align="center" />
|
|
|
- <el-table-column label="设备编码" prop="equipmentCode" width="150" align="center" />
|
|
|
- <el-table-column label="使用部门" prop="usageDeptAlias" width="150" align="center" />
|
|
|
- <el-table-column label="备注" prop="remark" header-align="center" align="center" />
|
|
|
-
|
|
|
- </el-table>
|
|
|
</div>
|
|
|
- </div>
|
|
|
+ <pagination
|
|
|
+ v-show="equipmentTotal > 0"
|
|
|
+ :total="equipmentTotal"
|
|
|
+ v-model:page="queryParams.pageNum"
|
|
|
+ v-model:limit="queryParams.pageSize"
|
|
|
+ @pagination="getEquipment"
|
|
|
+ />
|
|
|
</section>
|
|
|
- <pagination v-show="total > 0" :total="equipmentTotal" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getEquipment" />
|
|
|
- <section class="list-part-container column-container " style="flex: 1;">
|
|
|
- <!-- 搜索区域 -->
|
|
|
- <el-form class="list-search-container" :inline="true">
|
|
|
- <el-form-item class="section-title" label="添加工序" />
|
|
|
- <el-form-item>
|
|
|
- <div class="list-btns-container">
|
|
|
+ <section class="list-part-container column-container" style="flex: 1">
|
|
|
+ <!-- 搜索区域 -->
|
|
|
+ <el-form class="list-search-container" :inline="true">
|
|
|
+ <el-form-item class="section-title" label="添加工序" />
|
|
|
+ <el-form-item>
|
|
|
<el-button type="primary" icon="Plus" @click="handleShowProcessFormDialog()">新增</el-button>
|
|
|
- <el-button
|
|
|
- type="danger"
|
|
|
- icon="Delete"
|
|
|
- @click="handledelDeptProcess"
|
|
|
- :disabled="deptProcessIds.length === 0"
|
|
|
- >
|
|
|
- 删除
|
|
|
- </el-button>
|
|
|
+ <el-button type="danger" icon="Delete" @click="handledelDeptProcess" :disabled="deptProcessIds.length === 0"> 删除 </el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+
|
|
|
+ <!-- 列表区 -->
|
|
|
+ <div class="el-table-container">
|
|
|
+ <div class="el-table-inner-container">
|
|
|
+ <el-table v-loading="deptProcessLoading" :data="deptProcessList" height="100%" @selection-change="deptProcessSelectionChange">
|
|
|
+ <el-table-column type="selection" width="40" align="center" />
|
|
|
+ <el-table-column label="行号" type="index" width="50" align="center" />
|
|
|
+ <el-table-column label="工序编码" prop="processCode" align="center" />
|
|
|
+ <el-table-column label="工序简称" prop="processAlias" align="center" />
|
|
|
+ </el-table>
|
|
|
</div>
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
-
|
|
|
- <!-- 列表区 -->
|
|
|
- <div class="el-table-container">
|
|
|
- <div class="el-table-inner-container">
|
|
|
- <el-table v-loading="deptProcessLoading" :data="deptProcessList" height="100%" @selection-change="deptProcessSelectionChange">
|
|
|
- <el-table-column type="selection" width="40" align="center" />
|
|
|
- <el-table-column label="行号" type="index" width="50" align="center" />
|
|
|
- <el-table-column label="工序编码" prop="processCode" align="center" />
|
|
|
- <el-table-column label="工序简称" prop="processAlias" align="center" />
|
|
|
- </el-table>
|
|
|
</div>
|
|
|
- </div>
|
|
|
+ <pagination
|
|
|
+ v-show="deptProcessTotal > 0"
|
|
|
+ :total="deptProcessTotal"
|
|
|
+ v-model:page="queryDeptProcessParams.pageNum"
|
|
|
+ v-model:limit="queryDeptProcessParams.pageSize"
|
|
|
+ @pagination="getDeptProcess"
|
|
|
+ />
|
|
|
</section>
|
|
|
- <pagination v-show="total > 0" :total="deptProcessTotal" v-model:page="queryDeptProcessParams.pageNum" v-model:limit="queryDeptProcessParams.pageSize" @pagination="getDeptProcess" />
|
|
|
</section>
|
|
|
<equipment-form ref="equipmentFormRef" :multipleSelected="handleEquipmentMultipleSelected" @handleSaveSuccess="handleRefreshEquipment" />
|
|
|
<process-form ref="processFormRef" :multipleSelected="handleProcessMultipleSelected" @handleSaveSuccess="handleRefreshProcess" />
|
|
@@ -88,7 +96,7 @@
|
|
|
<script setup>
|
|
|
import { workSectionTree } from '@/api/system/dept'
|
|
|
import { detailList, updateBacth } from '@/api/business/equipment'
|
|
|
-import { listDeptProcess, addDeptProcess,delDeptProcess } from '@/api/business/deptProcess'
|
|
|
+import { listDeptProcess, addDeptProcess, delDeptProcess } from '@/api/business/deptProcess'
|
|
|
import equipmentForm from './form'
|
|
|
import processForm from './DialogProcessChoice'
|
|
|
const { proxy } = getCurrentInstance()
|
|
@@ -105,7 +113,7 @@ const data = reactive({
|
|
|
}
|
|
|
})
|
|
|
|
|
|
-const { queryParams, queryDeptProcessParams} = toRefs(data)
|
|
|
+const { queryParams, queryDeptProcessParams } = toRefs(data)
|
|
|
|
|
|
/** 查询 对象 */
|
|
|
const workSectionList = ref([])
|
|
@@ -116,7 +124,6 @@ const equipmentLoading = ref(false)
|
|
|
const deptProcessLoading = ref(false)
|
|
|
const equipmentTotal = ref(0)
|
|
|
const deptProcessTotal = ref(0)
|
|
|
-const total = ref(0)
|
|
|
const single = ref(true)
|
|
|
const currentWorkSection = ref({})
|
|
|
const ids = ref([])
|
|
@@ -172,8 +179,7 @@ function handleEquipmentMultipleSelected(selection) {
|
|
|
item.usageDeptId = currentWorkSection.value.id
|
|
|
})
|
|
|
items = selection
|
|
|
- updateBacth(items).then((res) => {
|
|
|
- })
|
|
|
+ updateBacth(items).then((res) => {})
|
|
|
}
|
|
|
|
|
|
/** 刷新设备区事件 */
|
|
@@ -181,17 +187,16 @@ function handleRefreshEquipment(row) {
|
|
|
getEquipment()
|
|
|
}
|
|
|
|
|
|
-
|
|
|
/*******************************工序方法区*********************************** */
|
|
|
|
|
|
const getDeptProcess = () => {
|
|
|
deptProcessLoading.value = true
|
|
|
-queryDeptProcessParams.value.deptId = currentWorkSection.value.id
|
|
|
-console.log(queryDeptProcessParams.value)
|
|
|
+ queryDeptProcessParams.value.deptId = currentWorkSection.value.id
|
|
|
+ console.log(queryDeptProcessParams.value)
|
|
|
listDeptProcess(queryDeptProcessParams.value).then((res) => {
|
|
|
deptProcessList.value = res.rows
|
|
|
deptProcessLoading.value = false
|
|
|
- equipmentTotal.value = res.total
|
|
|
+ deptProcessTotal.value = res.total
|
|
|
})
|
|
|
}
|
|
|
/** 打开工序对话框事件 */
|
|
@@ -201,16 +206,16 @@ function handleShowProcessFormDialog() {
|
|
|
|
|
|
/**工序多选带回 */
|
|
|
function handleProcessMultipleSelected(selection) {
|
|
|
- for(var i = 0;i<selection.length;i++) {
|
|
|
- var deptProcessAdd = {}
|
|
|
- deptProcessAdd.deptId = currentWorkSection.value.id
|
|
|
- deptProcessAdd.processId = selection[i].id
|
|
|
- deptProcessAdd.processCode = selection[i].processCode
|
|
|
- deptProcessAdd.processAlias = selection[i].processAlias
|
|
|
- deptProcessList.value.push(deptProcessAdd)
|
|
|
+ for (var i = 0; i < selection.length; i++) {
|
|
|
+ var deptProcessAdd = {}
|
|
|
+ deptProcessAdd.deptId = currentWorkSection.value.id
|
|
|
+ deptProcessAdd.processId = selection[i].id
|
|
|
+ deptProcessAdd.processCode = selection[i].processCode
|
|
|
+ deptProcessAdd.processAlias = selection[i].processAlias
|
|
|
+ deptProcessList.value.push(deptProcessAdd)
|
|
|
}
|
|
|
addDeptProcess(deptProcessList.value).then((res) => {
|
|
|
- if(res.code == 200) {
|
|
|
+ if (res.code == 200) {
|
|
|
proxy.$modal.msgSuccess('保存成功')
|
|
|
}
|
|
|
})
|
|
@@ -227,7 +232,6 @@ function deptProcessSelectionChange(selection) {
|
|
|
single.value = selection.length != 1
|
|
|
}
|
|
|
|
|
|
-
|
|
|
/**删除工序工段表数据 */
|
|
|
function handledelDeptProcess() {
|
|
|
proxy.$modal
|
|
@@ -237,15 +241,13 @@ function handledelDeptProcess() {
|
|
|
})
|
|
|
.then(() => {
|
|
|
getDeptProcess()
|
|
|
- proxy.$modal.msgSuccess('删除成功!')
|
|
|
- })
|
|
|
+ proxy.$modal.msgSuccess('删除成功!')
|
|
|
+ })
|
|
|
.catch((e) => {
|
|
|
proxy.$modal.msg('操作失败!')
|
|
|
})
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
onMounted(() => {
|
|
|
getWorkSections()
|
|
|
})
|