|
@@ -13,7 +13,7 @@
|
|
<span class="custom-label" v-if='item.isFill === 1' @click="openFill(item.deviceCategoryId,item.deviceId,item.deptId,item.deviceName,item.deviceCode)">
|
|
<span class="custom-label" v-if='item.isFill === 1' @click="openFill(item.deviceCategoryId,item.deviceId,item.deptId,item.deviceName,item.deviceCode)">
|
|
{{item.deviceCode}} ({{ item.deviceName }})
|
|
{{item.deviceCode}} ({{ item.deviceName }})
|
|
</span>
|
|
</span>
|
|
- <span v-else @click="openFill(item.deviceCategoryId,item.deviceId,item.deptId,item.deviceName,item.deviceCode)">
|
|
|
|
|
|
+ <span class="custom-label1" v-else @click="openFill(item.deviceCategoryId,item.deviceId,item.deptId,item.deviceName,item.deviceCode)">
|
|
{{item.deviceCode}} ({{ item.deviceName }})
|
|
{{item.deviceCode}} ({{ item.deviceName }})
|
|
</span>
|
|
</span>
|
|
</template>
|
|
</template>
|
|
@@ -21,25 +21,42 @@
|
|
<el-form label-width="120px">
|
|
<el-form label-width="120px">
|
|
<div style="margin-left: 24px">
|
|
<div style="margin-left: 24px">
|
|
<el-form class="demo-form-inline" :inline="true">
|
|
<el-form class="demo-form-inline" :inline="true">
|
|
- <el-form-item label="所属队伍:">
|
|
|
|
- {{item.orgName}}
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item label="累计运行时间:">
|
|
|
|
- {{totalRunTime1}}h
|
|
|
|
|
|
+ <el-form-item :label="t('operationFillForm.team')" class="custom-label1">
|
|
|
|
+ <span style="text-decoration: underline;">
|
|
|
|
+ {{item.orgName}}
|
|
|
|
+ </span>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
+ <el-row :gutter="20">
|
|
|
|
+ <el-col
|
|
|
|
+ v-for="(item,index) in attrList1"
|
|
|
|
+ :key="index"
|
|
|
|
+ :span="4"
|
|
|
|
+ >
|
|
|
|
+ <el-form-item :label='item.name' class="custom-label1">
|
|
|
|
+ <span style="text-decoration: underline;">
|
|
|
|
+ {{item.totalRunTime}}h
|
|
|
|
+ </span>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
|
|
+ <!-- <el-form-item :label="t('operationFillForm.sumTime')" class="custom-label1">
|
|
|
|
+ <span style="text-decoration: underline;">
|
|
|
|
+ {{totalRunTime1}}h
|
|
|
|
+ </span>
|
|
|
|
+ </el-form-item>-->
|
|
</el-form>
|
|
</el-form>
|
|
</div>
|
|
</div>
|
|
<div v-for="(item,index) in attrList" :key="index">
|
|
<div v-for="(item,index) in attrList" :key="index">
|
|
<el-form-item :label='item.name' prop="deviceId" >
|
|
<el-form-item :label='item.name' prop="deviceId" >
|
|
<el-input
|
|
<el-input
|
|
- v-if="item.isCollection===1"
|
|
|
|
|
|
+ v-if="item.isCollection===1||fillStatus === '1'"
|
|
v-model="item.fillContent"
|
|
v-model="item.fillContent"
|
|
clearable
|
|
clearable
|
|
style="width: 200px"
|
|
style="width: 200px"
|
|
disabled
|
|
disabled
|
|
/>
|
|
/>
|
|
<el-input
|
|
<el-input
|
|
- disabled
|
|
|
|
|
|
+ v-else
|
|
v-model="item.fillContent"
|
|
v-model="item.fillContent"
|
|
clearable
|
|
clearable
|
|
style="width: 200px"
|
|
style="width: 200px"
|
|
@@ -47,8 +64,8 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</div>
|
|
</div>
|
|
<el-form-item>
|
|
<el-form-item>
|
|
- <el-button type="primary" @click="getFillInfo" v-show="showStatus">确定</el-button>
|
|
|
|
- <el-button type="info" @click="deleteFillInfo" v-show="showStatus">取消</el-button>
|
|
|
|
|
|
+ <el-button type="primary" @click="getFillInfo" v-show="showStatus">{{t('operationFillForm.confirm')}}</el-button>
|
|
|
|
+ <el-button type="info" @click="deleteFillInfo" v-show="showStatus">{{t('operationFillForm.cancel')}}</el-button>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
</div>
|
|
</div>
|
|
@@ -83,11 +100,14 @@ const deviceId = params.deviceid
|
|
const deptId = params.deptid
|
|
const deptId = params.deptid
|
|
const createtime = params.createtime
|
|
const createtime = params.createtime
|
|
const list = ref<IotOpeationFillVO[]>([]) // 列表的数据
|
|
const list = ref<IotOpeationFillVO[]>([]) // 列表的数据
|
|
-const attrList = ref<IotOpeationFillVO[]>([]) // 列表的数据
|
|
|
|
|
|
+const attrList = ref<IotOpeationFillVO[]>([]) // 非累计属性集合
|
|
|
|
+const attrList1 = ref<IotOpeationFillVO[]>([]) // 累计属性集合
|
|
const total = ref(0) // 列表的总页数
|
|
const total = ref(0) // 列表的总页数
|
|
const arry1 =ref([]);
|
|
const arry1 =ref([]);
|
|
let totalRunTime1: string = '123'
|
|
let totalRunTime1: string = '123'
|
|
let fillStatus = params.status
|
|
let fillStatus = params.status
|
|
|
|
+
|
|
|
|
+
|
|
let showStatus = true;
|
|
let showStatus = true;
|
|
const queryParams = reactive({
|
|
const queryParams = reactive({
|
|
pageNo: 1,
|
|
pageNo: 1,
|
|
@@ -130,26 +150,22 @@ const showComponent = () => {
|
|
const getList = async () => {
|
|
const getList = async () => {
|
|
loading.value = true
|
|
loading.value = true
|
|
try {
|
|
try {
|
|
- // queryParams.deptId = deptId.split(",")[0];
|
|
|
|
- // queryParams.userId = deptId.split(",")[1];
|
|
|
|
- // queryParams.createTime = formatTimestamp(JSON.parse(deptId.split(",")[2].substring(0,10)));
|
|
|
|
queryParams.orderId = orderId
|
|
queryParams.orderId = orderId
|
|
queryParams.deviceId = deviceId
|
|
queryParams.deviceId = deviceId
|
|
const data = await IotOpeationFillApi.getIotOrderPage(queryParams);
|
|
const data = await IotOpeationFillApi.getIotOrderPage(queryParams);
|
|
list.value = data;
|
|
list.value = data;
|
|
// if(cxStatus){
|
|
// if(cxStatus){
|
|
- if (list.value){
|
|
|
|
- queryParams.deviceCategoryId = list.value[0].deviceCategoryId
|
|
|
|
- queryParams.deptId = list.value[0].deptId;
|
|
|
|
- queryParams.deviceCode = list.value[0].deviceCode;
|
|
|
|
- queryParams.deviceName = list.value[0].deviceName;
|
|
|
|
- queryParams.deviceId = list.value[0].deviceId;
|
|
|
|
- }
|
|
|
|
|
|
+ if (list.value){
|
|
|
|
+ queryParams.deviceCategoryId = list.value[0].deviceCategoryId
|
|
|
|
+ queryParams.deptId = list.value[0].deptId;
|
|
|
|
+ queryParams.deviceCode = list.value[0].deviceCode;
|
|
|
|
+ queryParams.deviceName = list.value[0].deviceName;
|
|
|
|
+ queryParams.deviceId = list.value[0].deviceId;
|
|
|
|
+ }
|
|
|
|
|
|
// }
|
|
// }
|
|
getAttrList();
|
|
getAttrList();
|
|
|
|
|
|
-
|
|
|
|
} finally {
|
|
} finally {
|
|
loading.value = false
|
|
loading.value = false
|
|
}
|
|
}
|
|
@@ -181,7 +197,6 @@ const open = async (type: string, id?: number) => {
|
|
}
|
|
}
|
|
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
|
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
|
const openFill = (deviceCategoryId?:number,deviceId?:number,deptId?:number,deviceName?:string,deviceCode?:string) =>{
|
|
const openFill = (deviceCategoryId?:number,deviceId?:number,deptId?:number,deviceName?:string,deviceCode?:string) =>{
|
|
-
|
|
|
|
queryParams.deviceCategoryId = deviceCategoryId;
|
|
queryParams.deviceCategoryId = deviceCategoryId;
|
|
queryParams.deptId = deptId;
|
|
queryParams.deptId = deptId;
|
|
queryParams.deviceCode = deviceCode;
|
|
queryParams.deviceCode = deviceCode;
|
|
@@ -194,22 +209,26 @@ const openFill = (deviceCategoryId?:number,deviceId?:number,deptId?:number,devic
|
|
const getAttrList = async () => {
|
|
const getAttrList = async () => {
|
|
loading.value = true
|
|
loading.value = true
|
|
try {
|
|
try {
|
|
- totalRunTime1 = 0;
|
|
|
|
queryParams.createTime = formatTimestamp(createtime);
|
|
queryParams.createTime = formatTimestamp(createtime);
|
|
const data = await IotOpeationFillApi.getAttrs(queryParams)
|
|
const data = await IotOpeationFillApi.getAttrs(queryParams)
|
|
- attrList.value = data;
|
|
|
|
|
|
+ attrList.value = data[0].nonSumList;
|
|
|
|
+ attrList1.value = data[0].sumList;
|
|
attrList.value.forEach(function (item,index){
|
|
attrList.value.forEach(function (item,index){
|
|
-
|
|
|
|
- if(item.name==='累计运行时间'){
|
|
|
|
- item.name = '当日运转时间'
|
|
|
|
- }
|
|
|
|
- totalRunTime1 = Number(item.totalRunTime).toFixed(2)
|
|
|
|
|
|
+ /*if(item.name === '当日运转时间'){
|
|
|
|
+ totalRunTime1 = Number(item.totalRunTime).toFixed(2)
|
|
|
|
+ }*/
|
|
item.fillContent = Number(item.fillContent).toFixed(2)
|
|
item.fillContent = Number(item.fillContent).toFixed(2)
|
|
item.deviceCode = queryParams.deviceCode;
|
|
item.deviceCode = queryParams.deviceCode;
|
|
item.deptId = queryParams.deptId;
|
|
item.deptId = queryParams.deptId;
|
|
item.deviceId = queryParams.deviceId;
|
|
item.deviceId = queryParams.deviceId;
|
|
item.deviceCategoryId = queryParams.deviceCategoryId;
|
|
item.deviceCategoryId = queryParams.deviceCategoryId;
|
|
})
|
|
})
|
|
|
|
+ attrList1.value.forEach(function (item,index){
|
|
|
|
+ item.deviceCode = queryParams.deviceCode;
|
|
|
|
+ item.deptId = queryParams.deptId;
|
|
|
|
+ item.deviceId = queryParams.deviceId;
|
|
|
|
+ item.deviceCategoryId = queryParams.deviceCategoryId;
|
|
|
|
+ })
|
|
} finally {
|
|
} finally {
|
|
loading.value = false
|
|
loading.value = false
|
|
}
|
|
}
|
|
@@ -218,6 +237,8 @@ const getAttrList = async () => {
|
|
/** 获取填写信息保存到后台*/
|
|
/** 获取填写信息保存到后台*/
|
|
const getFillInfo = async () => {
|
|
const getFillInfo = async () => {
|
|
try {
|
|
try {
|
|
|
|
+ attrList.value = attrList.value.concat(attrList1.value)
|
|
|
|
+
|
|
attrList.value.forEach(function (item,index){
|
|
attrList.value.forEach(function (item,index){
|
|
item.pointName = item.name;
|
|
item.pointName = item.name;
|
|
item.createTime = formatTimestamp(JSON.parse(deptId.split(",")[2].substring(0,10)));
|
|
item.createTime = formatTimestamp(JSON.parse(deptId.split(",")[2].substring(0,10)));
|
|
@@ -310,7 +331,15 @@ onMounted(() => {
|
|
}
|
|
}
|
|
|
|
|
|
.custom-label {
|
|
.custom-label {
|
|
- color: green;
|
|
|
|
|
|
+ font-weight: 1000;
|
|
|
|
+ font-size: 17px;
|
|
|
|
+ padding: 0 10px;
|
|
|
|
+ color: forestgreen;
|
|
|
|
+}
|
|
|
|
+.custom-label1 {
|
|
|
|
+ font-weight: 1000;
|
|
|
|
+ font-size: 17px;
|
|
|
|
+ padding: 0 10px;
|
|
}
|
|
}
|
|
::v-deep .el-step__icon {
|
|
::v-deep .el-step__icon {
|
|
background-color: #409eff;
|
|
background-color: #409eff;
|
|
@@ -358,4 +387,15 @@ onMounted(() => {
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+.horizontal-container {
|
|
|
|
+ display: flex;
|
|
|
|
+ flex-wrap: wrap; /* 允许换行 */
|
|
|
|
+ gap: 20px; /* 项目间距 */
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.form-item-container {
|
|
|
|
+ flex: 1; /* 等宽分布 */
|
|
|
|
+ min-width: 200px; /* 最小宽度防止挤压 */
|
|
|
|
+}
|
|
</style>
|
|
</style>
|