This commit is contained in:
bb_pan 2025-12-10 09:58:56 +08:00
parent 422aaeca3b
commit d2c4e2c65f
6 changed files with 63 additions and 30 deletions

View File

@ -96,9 +96,9 @@
<div > <div >
<el-table :data="tableData" border stripe :span-method="handleSpanMethod" height="546"> <el-table :data="tableData" border stripe :span-method="handleSpanMethod" height="546">
<!-- <el-table :data="tableData" >--> <!-- <el-table :data="tableData" >-->
<el-table-column label="序号" align="center" width="55" type="index" fixed /> <el-table-column label="序号" align="center" width="55" type="index" />
<el-table-column prop="orderNumber" label="录入单号" align="center" show-overflow-tooltip column-key="orderNumber" <el-table-column prop="orderNumber" label="录入单号" align="center" show-overflow-tooltip column-key="orderNumber"
fixed min-width="200" /> min-width="200" />
<el-table-column prop="major" label="专业" align="center" show-overflow-tooltip min-width="100" /> <el-table-column prop="major" label="专业" align="center" show-overflow-tooltip min-width="100" />
<el-table-column prop="orderNumber" label="工序" align="center" show-overflow-tooltip min-width="100"> <el-table-column prop="orderNumber" label="工序" align="center" show-overflow-tooltip min-width="100">
<template slot-scope="scope"> <template slot-scope="scope">
@ -145,7 +145,7 @@
<span style="color: #00a288; cursor: pointer" @click="handleView(row, 4)">查看</span> <span style="color: #00a288; cursor: pointer" @click="handleView(row, 4)">查看</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column v-for="(item, index) in columns" v-if="item.visible" :key="index" align="center" <el-table-column v-for="(item, index) in columns2" v-if="item.visible" :key="index" align="center"
show-overflow-tooltip :label="item.label" :prop="item.prop"> show-overflow-tooltip :label="item.label" :prop="item.prop">
<template v-slot="{ row }" v-if="/^feature(Item|Value)\d+$/.test(item.prop)"> <template v-slot="{ row }" v-if="/^feature(Item|Value)\d+$/.test(item.prop)">
<span> <span>
@ -240,6 +240,7 @@ export default {
pageSize: 10 pageSize: 10
}, },
manufacturerList: [], manufacturerList: [],
columns2: [],
columns: [ columns: [
{ key: 26, label: `特征项1`, prop: 'featureItem1', visible: true }, { key: 26, label: `特征项1`, prop: 'featureItem1', visible: true },
{ key: 27, label: `特征值1`, prop: 'featureValue1', visible: true }, { key: 27, label: `特征值1`, prop: 'featureValue1', visible: true },
@ -298,6 +299,18 @@ export default {
// orderNumber // orderNumber
this.tableData.sort((a, b) => a.orderNumber.localeCompare(b.orderNumber)) this.tableData.sort((a, b) => a.orderNumber.localeCompare(b.orderNumber))
let maxLength = 0
this.tableData.forEach((item) => {
if (item.propertyVoList && item.propertyVoList.length > maxLength) {
maxLength = item.propertyVoList.length
}
})
maxLength = maxLength > 0 ? maxLength * 2 : 0
this.columns2 = this.columns.slice(0, this.columns.length - 18 + maxLength)
setTimeout(() => {
this.$refs.tableRef.doLayout()
}, 200)
}) })
.catch(error => { .catch(error => {
console.error('获取装备申请列表失败:', error) console.error('获取装备申请列表失败:', error)

View File

@ -12,7 +12,7 @@
<span class="page-title">{{ pageTitle }}</span> <span class="page-title">{{ pageTitle }}</span>
</div> </div>
<div class="dialog-footer" style="float: right"> <div class="dialog-footer" style="float: right">
<el-button size="medium" @click="goBack">取消</el-button> <el-button size="medium" @click="close">取消</el-button>
<el-button type="primary" size="medium" @click="handleSubmit">确认</el-button> <el-button type="primary" size="medium" @click="handleSubmit">确认</el-button>
</div> </div>
</div> </div>
@ -512,7 +512,13 @@ export default {
}, },
// //
goBack() { goBack() {
this.$tab.closePage() // this.$tab.closePage()
this.$router.go(-1)
},
close() {
this.$tab.closePage({ path: '/equipment/equipment-input/add' }).then(() => {
this.$router.go(-1)
})
}, },
deviceTypeChange(val) { deviceTypeChange(val) {
if (val === 0) { if (val === 0) {

View File

@ -170,7 +170,6 @@
align="center" align="center"
show-overflow-tooltip show-overflow-tooltip
column-key="orderNumber" column-key="orderNumber"
fixed
min-width="200" min-width="200"
/> />
<el-table-column prop="major" label="专业" align="center" show-overflow-tooltip min-width="100" /> <el-table-column prop="major" label="专业" align="center" show-overflow-tooltip min-width="100" />
@ -205,7 +204,7 @@
<el-table-column prop="unit" label="计量单位" show-overflow-tooltip align="center" min-width="100" /> <el-table-column prop="unit" label="计量单位" show-overflow-tooltip align="center" min-width="100" />
<el-table-column prop="manufacturer" label="生产厂家" show-overflow-tooltip align="center" min-width="100" /> <el-table-column prop="manufacturer" label="生产厂家" show-overflow-tooltip align="center" min-width="100" />
<el-table-column prop="productionDate" label="出厂日期" show-overflow-tooltip align="center" min-width="100" /> <el-table-column prop="productionDate" label="出厂日期" show-overflow-tooltip align="center" min-width="100" />
<!-- <el-table-column prop="purchaseDate" label="采购日期" align="center"/>--> <el-table-column prop="purchaseDate" label="采购日期" align="center" />
<el-table-column <el-table-column
prop="originalValue" prop="originalValue"
label="资产原值(万元)" label="资产原值(万元)"
@ -213,8 +212,8 @@
align="center" align="center"
min-width="100" min-width="100"
/> />
<!-- <el-table-column prop="maxServiceLifeYears" label="最大使用年限(年)" align="center"/>--> <el-table-column prop="maxServiceLifeYears" label="最大使用年限(年)" align="center" />
<!-- <el-table-column prop="nextMaintenanceDate" label="下次维保日期" align="center"/>--> <el-table-column prop="nextMaintenanceDate" label="下次维保日期" align="center" />
<el-table-column prop="province" label="所属省份" show-overflow-tooltip align="center" min-width="100" /> <el-table-column prop="province" label="所属省份" show-overflow-tooltip align="center" min-width="100" />
<el-table-column prop="appearanceImages" label="装备外观" show-overflow-tooltip align="center" min-width="100"> <el-table-column prop="appearanceImages" label="装备外观" show-overflow-tooltip align="center" min-width="100">
<template v-slot="{ row }"> <template v-slot="{ row }">
@ -257,7 +256,7 @@
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <!-- <el-table-column
prop="orderCreateUser" prop="orderCreateUser"
label="申请人" label="申请人"
show-overflow-tooltip show-overflow-tooltip
@ -272,7 +271,7 @@
align="center" align="center"
fixed="right" fixed="right"
min-width="100" min-width="100"
/> /> -->
<el-table-column <el-table-column
prop="entryStatus" prop="entryStatus"
align="center" align="center"
@ -301,12 +300,12 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="pagination-wrapper"> <div class="pagination-wrapper">
<pagination <pagination
:total="total" :total="total"
@pagination="getList" @pagination="getList"
:page.sync="queryParams.pageNum" :page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize" :limit.sync="queryParams.pageSize"
/> />
</div> </div>
</el-card> </el-card>
<EquipmentEntryEditDialog <EquipmentEntryEditDialog

View File

@ -155,11 +155,11 @@
</el-col> </el-col>
</el-row> </el-row>
<!-- 表格 --> <!-- 表格 -->
<el-table :data="tableData" :span-method="handleSpanMethod" border stripe height="546"> <el-table ref="tableRef" :data="tableData" :span-method="handleSpanMethod" border stripe height="546">
<!-- <el-table :data="tableData" >--> <!-- <el-table :data="tableData" >-->
<el-table-column label="序号" align="center" width="55" type="index" fixed/> <el-table-column label="序号" align="center" width="55" type="index"/>
<el-table-column prop="orderNumber" label="录入单号" align="center" show-overflow-tooltip <el-table-column prop="orderNumber" label="录入单号" align="center" show-overflow-tooltip
column-key="orderNumber" fixed min-width="200" column-key="orderNumber" min-width="200"
/> />
<el-table-column prop="major" label="专业" align="center" show-overflow-tooltip min-width="100"/> <el-table-column prop="major" label="专业" align="center" show-overflow-tooltip min-width="100"/>
<el-table-column prop="orderNumber" label="工序" align="center" show-overflow-tooltip min-width="100"> <el-table-column prop="orderNumber" label="工序" align="center" show-overflow-tooltip min-width="100">
@ -390,6 +390,10 @@ export default {
}) })
maxLength = maxLength > 0 ? maxLength * 2 : 0 maxLength = maxLength > 0 ? maxLength * 2 : 0
this.columns2 = this.columns.slice(0, this.columns.length - 18 + maxLength) this.columns2 = this.columns.slice(0, this.columns.length - 18 + maxLength)
setTimeout(() => {
this.$refs.tableRef.doLayout()
}, 200)
}) })
.catch(error => { .catch(error => {
console.error('获取装备申请列表失败:', error) console.error('获取装备申请列表失败:', error)

View File

@ -141,11 +141,11 @@
重置 重置
</el-button> </el-button>
<el-button class="primary-lease" type="primary" @click="allApproved()" v-if="!this.isAddVisible && this.orderStatus =='0'"> <el-button class="primary-lease" type="primary" @click="allApproved()" v-if="!isAddVisible && orderStatus =='0'">
全部通过 全部通过
</el-button> </el-button>
<el-button class="primary-lease" type="primary" @click="allReject()" v-if="!this.isAddVisible && this.orderStatus =='0'"> <el-button class="primary-lease" type="primary" @click="allReject()" v-if="!isAddVisible && orderStatus =='0'">
全部驳回 全部驳回
</el-button> </el-button>
@ -154,11 +154,11 @@
</el-row> </el-row>
<!-- 表格 --> <!-- 表格 -->
<el-table :data="tableData" :span-method="handleSpanMethod" height="546"> <el-table ref="tableRef" :data="tableData" :span-method="handleSpanMethod" height="546">
<!-- <el-table :data="tableData" >--> <!-- <el-table :data="tableData" >-->
<el-table-column label="序号" align="center" width="55" type="index" fixed/> <el-table-column label="序号" align="center" width="55" type="index"/>
<el-table-column prop="orderNumber" label="录入单号" align="center" show-overflow-tooltip <el-table-column prop="orderNumber" label="录入单号" align="center" show-overflow-tooltip
column-key="orderNumber" fixed min-width="200" column-key="orderNumber" min-width="200"
/> />
<el-table-column prop="major" label="专业" align="center" show-overflow-tooltip min-width="100"/> <el-table-column prop="major" label="专业" align="center" show-overflow-tooltip min-width="100"/>
<el-table-column prop="orderNumber" label="工序" align="center" show-overflow-tooltip min-width="100"> <el-table-column prop="orderNumber" label="工序" align="center" show-overflow-tooltip min-width="100">
@ -238,23 +238,25 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" min-width="300" fixed="right"> <el-table-column label="操作" align="center" min-width="300" fixed="right">
<template slot-scope="{ row }"> <template slot-scope="{ row }">
<el-button type="text" @click="handleViewDetail(row)"> <el-button type="text" icon="el-icon-view" @click="handleViewDetail(row)">
<i class="el-icon-view"></i> 查看 查看
</el-button> </el-button>
<el-button <el-button
type="text" type="text"
icon="el-icon-edit"
@click="approved(row)" @click="approved(row)"
v-if="!isAddVisible && row.entryStatus == '0' && row.orderStatus == '0'" v-if="!isAddVisible && row.entryStatus == '0' && row.orderStatus == '0'"
> >
<i class="el-icon-edit"></i> 通过 通过
</el-button> </el-button>
<el-button <el-button
type="text" type="text"
icon="el-icon-delete"
@click="reject(row)" @click="reject(row)"
v-if="!isAddVisible && row.entryStatus == '0' && row.orderStatus == '0' " v-if="!isAddVisible && row.entryStatus == '0' && row.orderStatus == '0' "
> >
<i class="el-icon-delete"></i> 驳回 驳回
</el-button> </el-button>
</template> </template>
@ -350,7 +352,7 @@ export default {
}, },
mounted() { mounted() {
const { orderId, status, orderStatus, isAddVisible, isApprovalVisible } = this.$route.query const { orderId, status, orderStatus, isAddVisible, isApprovalVisible } = this.$route.query
this.isAddVisible = isAddVisible == 'true' this.isAddVisible = isAddVisible
if (orderId) { if (orderId) {
this.queryParams.orderId = orderId this.queryParams.orderId = orderId
this.orderStatus = status || orderStatus this.orderStatus = status || orderStatus
@ -387,6 +389,10 @@ export default {
}) })
maxLength = maxLength > 0 ? maxLength * 2 : 0 maxLength = maxLength > 0 ? maxLength * 2 : 0
this.columns2 = this.columns.slice(0, this.columns.length - 18 + maxLength) this.columns2 = this.columns.slice(0, this.columns.length - 18 + maxLength)
setTimeout(() => {
this.$refs.tableRef.doLayout()
}, 200)
}) })
.catch(error => { .catch(error => {
console.error('获取装备申请列表失败:', error) console.error('获取装备申请列表失败:', error)

View File

@ -319,6 +319,7 @@
</el-row> </el-row>
<el-table <el-table
ref="tableRef"
:data="tableData" :data="tableData"
:key="Date.now()" :key="Date.now()"
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
@ -1302,6 +1303,10 @@ export default {
}) })
maxLength = maxLength > 0 ? maxLength * 2 : 0 maxLength = maxLength > 0 ? maxLength * 2 : 0
this.columns2 = this.columns.slice(0, this.columns.length - 18 + maxLength) this.columns2 = this.columns.slice(0, this.columns.length - 18 + maxLength)
setTimeout(() => {
this.$refs.tableRef.doLayout()
}, 200)
} catch (error) { } catch (error) {
// this.$message.error('' + (error.message || '')) // this.$message.error('' + (error.message || ''))
console.error(error) console.error(error)