|
@@ -1,82 +1,85 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <div style="width: 80%">
|
|
|
- <div class="prep-materials" style="margin-top: 5%;margin-left: 10%">
|
|
|
- <el-row>
|
|
|
- <el-col :span="24" class="header">xxxx公司2024-01组试验备料单</el-col>
|
|
|
- </el-row>
|
|
|
- <el-row class="details">
|
|
|
- <el-col :span="6">组编码:2024-01</el-col>
|
|
|
- <el-col :span="6">创建日期:xxxx年xx月xx日</el-col>
|
|
|
- <el-col :span="6">项目结束日期:xxxx年xx月xx日</el-col>
|
|
|
- <el-col :span="6">项目组重复:3次</el-col>
|
|
|
- </el-row>
|
|
|
- <el-table :data="properties" border style="width: 100%">
|
|
|
- <el-table-column fixed prop="property" label="序号" width="100"></el-table-column>
|
|
|
- <el-table-column
|
|
|
- v-for="(product, index) in products"
|
|
|
- :key="index"
|
|
|
- :prop="`value${index}`"
|
|
|
- :label="product['序号']" width="100">
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- <div style="display: flex;width: 100%">
|
|
|
- <p style="display:inline-block;width: 20%">实验要求:</p>
|
|
|
- <el-input
|
|
|
- type="textarea"
|
|
|
- autosize
|
|
|
- placeholder="请输入内容"
|
|
|
- v-model="textarea" style="display: inline-block;margin-left: -13%;margin-top: 1%">
|
|
|
- </el-input>
|
|
|
- </div>
|
|
|
-
|
|
|
+ <div class="prep-materials" style="margin-top: 5%;margin-left: 10%;width: 80%">
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="24" class="header">xxxx公司2024-01组试验备料单</el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row class="details">
|
|
|
+ <el-col :span="6">组编码:2024-01</el-col>
|
|
|
+ <el-col :span="6">创建日期:xxxx年xx月xx日</el-col>
|
|
|
+ <el-col :span="6">项目结束日期:xxxx年xx月xx日</el-col>
|
|
|
+ <el-col :span="6">项目组重复:3次</el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-table :data="properties" border style="width: 100%">
|
|
|
+ <el-table-column fixed prop="property" label="序号" width="100"></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ v-for="(product, index) in products"
|
|
|
+ :key="index"
|
|
|
+ :prop="`value${index}`"
|
|
|
+ :label="product['序号']" width="100"
|
|
|
+ >
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <div style="display: flex;width: 100%">
|
|
|
+ <p style="display:inline-block;width: 20%">实验要求:</p>
|
|
|
+ <el-input
|
|
|
+ type="textarea"
|
|
|
+ autosize
|
|
|
+ placeholder="请输入内容"
|
|
|
+ v-model="textarea" style="display: inline-block;margin-left: -13%;margin-top: 1%"
|
|
|
+ >
|
|
|
+ </el-input>
|
|
|
</div>
|
|
|
+
|
|
|
</div>
|
|
|
- <div style="width: 80%">
|
|
|
- <div class="prep-materials" style="margin-top: 5%;margin-left: 10%">
|
|
|
- <el-row>
|
|
|
- <el-col :span="24" class="header">组重复排序</el-col>
|
|
|
- </el-row>
|
|
|
- <el-table border style="width: 100%;" height="45">
|
|
|
- <el-table-column fixed label="序号" width="100"></el-table-column>
|
|
|
- <el-table-column
|
|
|
- v-for="(product) in products1"
|
|
|
- :label="product['序号']" width="100">
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- <p style="font-size: 12px;color: red;margin-top: 5px">***第一组数据不可编辑</p>
|
|
|
-<!-- 第二组-->
|
|
|
- <el-table border style="width: 100%;margin-top: 1%" height="45">
|
|
|
- <el-table-column fixed label="序号" width="100"></el-table-column>
|
|
|
- <el-table-column
|
|
|
- v-for="(product) in products2"
|
|
|
- :label="product['序号']" width="100">
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- <el-tooltip class="item" effect="dark" content="点击后序号将往后顺移一位" placement="right">
|
|
|
- <el-button @click="shiftData1">移位按钮</el-button>
|
|
|
- </el-tooltip>
|
|
|
|
|
|
+ <div class="prep-materials" style="margin-top: 3%;margin-left: 10%;width: 80%">
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="24" class="header">组重复排序</el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-table border style="width: 100%;" height="45">
|
|
|
+ <el-table-column fixed label="序号" width="100"></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ v-for="(product) in products1"
|
|
|
+ :label="product['序号']" width="100"
|
|
|
+ >
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <p style="font-size: 12px;color: red;margin-top: 5px">***第一组数据不可编辑</p>
|
|
|
+ <!-- 第二组-->
|
|
|
+ <el-table border style="width: 100%;margin-top: 1%" height="45">
|
|
|
+ <el-table-column fixed label="序号" width="100"></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ v-for="(product) in products2"
|
|
|
+ :label="product['序号']" width="100"
|
|
|
+ >
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <el-tooltip class="item" effect="dark" content="点击后序号将往后顺移一位" placement="right">
|
|
|
+ <el-button @click="shiftData1">移位按钮</el-button>
|
|
|
+ </el-tooltip>
|
|
|
|
|
|
- <el-table border style="width: 100%;margin-top: 1%" height="45">
|
|
|
- <el-table-column fixed label="序号" width="100"></el-table-column>
|
|
|
- <el-table-column
|
|
|
- v-for="(product) in products3"
|
|
|
- :label="product['序号']" width="100">
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- <el-tooltip class="item" effect="dark" content="点击后序号将往后顺移一位" placement="right">
|
|
|
- <el-button @click="shiftData1">移位按钮</el-button>
|
|
|
- </el-tooltip>
|
|
|
- <div style="display: flex;width: 100%">
|
|
|
- <p style="display:inline-block;width: 20%">重点强调:</p>
|
|
|
- <el-input
|
|
|
- type="textarea"
|
|
|
- autosize
|
|
|
- placeholder="请输入内容"
|
|
|
- v-model="textarea" style="display: inline-block;margin-left: -13%;margin-top: 1%">
|
|
|
- </el-input>
|
|
|
- </div>
|
|
|
+
|
|
|
+ <el-table border style="width: 100%;margin-top: 1%" height="45">
|
|
|
+ <el-table-column fixed label="序号" width="100"></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ v-for="(product) in products3"
|
|
|
+ :label="product['序号']" width="100"
|
|
|
+ >
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <el-tooltip class="item" effect="dark" content="点击后序号将往后顺移一位" placement="right">
|
|
|
+ <el-button @click="shiftData1">移位按钮</el-button>
|
|
|
+ </el-tooltip>
|
|
|
+ <div style="display: flex;width: 100%">
|
|
|
+ <p style="display:inline-block;width: 20%">重点强调:</p>
|
|
|
+ <el-input
|
|
|
+ type="textarea"
|
|
|
+ autosize
|
|
|
+ placeholder="请输入内容"
|
|
|
+ v-model="textarea" style="display: inline-block;margin-left: -13%;margin-top: 1%"
|
|
|
+ >
|
|
|
+ </el-input>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -121,31 +124,31 @@ export default {
|
|
|
receiverName2: '',
|
|
|
receiverPhone2: '',
|
|
|
receiverAddress2: ''
|
|
|
- };
|
|
|
+ }
|
|
|
},
|
|
|
computed: {
|
|
|
properties() {
|
|
|
- const props = ['产品名称', '产品代码', '实验密度'];
|
|
|
+ const props = ['产品名称', '产品代码', '实验密度']
|
|
|
return props.map(prop => ({
|
|
|
property: prop,
|
|
|
...this.products.reduce((acc, product, index) => ({
|
|
|
...acc,
|
|
|
[`value${index}`]: product[prop]
|
|
|
}), {})
|
|
|
- }));
|
|
|
+ }))
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
shiftData1() {
|
|
|
if (this.products2.length > 1) { // 确保数组至少有两个元素
|
|
|
- const lastItem = this.products2.pop(); // 移除最后一个元素并保存
|
|
|
- this.products2.unshift(lastItem); // 将移除的最后一个元素添加到数组的开头
|
|
|
+ const lastItem = this.products2.pop() // 移除最后一个元素并保存
|
|
|
+ this.products2.unshift(lastItem) // 将移除的最后一个元素添加到数组的开头
|
|
|
}
|
|
|
},
|
|
|
shiftData2() {
|
|
|
if (this.products3.length > 1) { // 确保数组至少有两个元素
|
|
|
- const lastItem = this.products3.pop(); // 移除最后一个元素并保存
|
|
|
- this.products3.unshift(lastItem); // 将移除的最后一个元素添加到数组的开头
|
|
|
+ const lastItem = this.products3.pop() // 移除最后一个元素并保存
|
|
|
+ this.products3.unshift(lastItem) // 将移除的最后一个元素添加到数组的开头
|
|
|
}
|
|
|
}
|
|
|
}
|