提交 cf769f30 authored 作者: 邓文彬's avatar 邓文彬

fix(pad): bug修改

上级 01fa8e11
......@@ -86,11 +86,11 @@ export default {
},
],
formData: {
inspectionType: "1",
inspectionCode: "1",
recordName: "1",
inspectionTime: "1",
inspectionBy: "1",
inspectionType: "",
inspectionCode: "",
recordName: "",
inspectionTime: "",
inspectionBy: "",
},
};
},
......@@ -105,7 +105,7 @@ export default {
inspectionType: "1",
inspectionCode: `JFXJ${moment().format("yyyyMMDDhhmmss")}${(Math.floor(Math.random() * 900) + 100)}`,
recordName: `${moment().format("yyyyMMDD")}-机房巡检记录`,
inspectionTime: moment().format("yyyy-MM-DD HH:mm:ss"),
inspectionTime: moment().format("yyyy-MM-DD HH:mm"),
inspectionBy: this.$store.state.now_user.user,
inspectionById: this.$store.state.now_user.userId,
createByName: this.$store.state.now_user.user,
......
......@@ -40,7 +40,7 @@
><text class="text">{{ baseInfo.inspectionCode }}</text>
</view>
<view class="base-row-item"
><text class="name">巡检日期</text
><text class="name">巡检时间</text
><text class="text">{{ baseInfo.inspectionTime }}</text>
</view>
</view>
......@@ -53,7 +53,7 @@
</view>
<view class="main">
<view class="content_header">巡检项目(pm)</view>
<view class="content_header">巡检项目</view>
<!-- tabls -->
<Tabs class="tabs" ref="tabs" :options="tabList" @change="changeTab" />
......@@ -167,7 +167,7 @@ export default {
name: "电池间",
isVaild: false, // 校验通过
position: pad_1_3_inspection_position.rows,
descript: "痕迹检查",
descript: "",
},
{
name: "机房值班",
......
......@@ -50,24 +50,37 @@
<uni-forms-item
v-if="item.inspectionResult == 1"
required
class="row-item"
class="row-item note-item"
label="情况摘要"
name="notes"
>
<input
<textarea
type="text"
:disabled="isDisable"
v-model="item.notes"
placeholder="请输入内容"
/>
<view class="qucik-content">
<view v-if="!isDisable" class="quick-input"> 快捷输入 </view>
<view v-if="!isDisable">
<text
class="qucik-text"
v-for="quickItem in quickTextList"
:key="quickItem.text"
@click="clickQuick(item, quickItem)"
>{{ quickItem.text }}</text
>
</view>
</view>
</uni-forms-item>
</uni-forms>
</view>
</template>
<script>
import {
pad_1_1_inspection_items,
pad_1_1_inspection_position,
pad_1_3_inspection_items,
pad_1_3_inspection_position,
pad_room_type,
} from "@/utils/dict.js";
......@@ -104,6 +117,17 @@ export default {
},
roomTypeLabel: "电池间巡检", // 用于获取类型值
quickTextList: [
{
text: "有异常",
},
{
text: "已处理",
},
{
text: "需派单维修",
},
],
};
},
mounted() {
......@@ -154,7 +178,7 @@ export default {
(item) => item.dictLabel == roomTypeLabel
)[0].dictValue;
const temp = pad_1_1_inspection_items.rows.map((item) => {
const temp = pad_1_3_inspection_items.rows.map((item) => {
return {
// ...item,
dictLabel: item.dictLabel,
......@@ -172,15 +196,13 @@ export default {
{
value: 1,
label: "异常",
isActive: false,
},
],
measuredData: "", // 逗号分隔字符串
measuredDataArr: [], // 前端本地使用
postionList: pad_1_1_inspection_position.rows.map((item) => {
postionList: pad_1_3_inspection_position.rows.map((item) => {
return {
...item,
isActive: false,
};
}),
};
......@@ -231,6 +253,10 @@ export default {
};
});
},
clickQuick(item, quickItem) {
item.notes = `${item.notes}${quickItem.text}`;
},
},
};
</script>
......@@ -283,9 +309,53 @@ export default {
}
}
.note-item {
textarea{
width: 100%;
height: 96px;
background: #f7f7f7;
border-radius: 1px;
font-size: 14px;
color: #4a4a4a;
padding: 16px;
font-weight: 400;
}
.qucik-content {
display: flex;
align-items: center;
.quick-input {
margin: 16px 18px 18px 0 ;
font-size: 14px;
color: #7c7c7c;
font-weight: 400;
}
.qucik-text {
display: inline-block;
border: 1px solid rgba(242, 242, 242, 1);
border-radius: 8px;
padding: 0 10px;
height: 32px;
font-size: 12px;
color: #4a4a4a;
line-height: 20px;
font-weight: 400;
margin-right: 12px;
line-height: 32px;
text-align: center;
}
}
}
/deep/ .uni-forms-item__content {
display: flex;
align-items: center;
}
.note-item {
/deep/ .uni-forms-item__content {
display: block;
}
}
}
</style>
......@@ -20,12 +20,11 @@
placeholder-style="color:#C7C7C7"
placeholder="请输入需求文字"
:disabled="isDisable"
/>
<view v-if="!isDisable" class="quick-input"> 快捷输入 </view>
<view v-if="!isDisable">
<view >
<text v-if="!isDisable" class="quick-input"> 快捷输入 </text>
<text v-if="!isDisable">
<text
class="qucik-text"
v-for="item in quickTextList"
......@@ -33,7 +32,8 @@
@click="clickQuick(item)"
>{{ item.text }}</text
>
</view>
</text>
</view>
</uni-forms-item>
</uni-forms>
</view>
......@@ -68,33 +68,17 @@ export default {
roomWatch: "", // 机房值班
},
quickTextList: [
{
text: "门禁异常",
isActive: false,
},
{
text: "已处理",
isActive: false,
},
{
text: "需派单维修",
isActive: false,
},
{
text: "进出总人数:",
isActive: false,
},
{
text: "访客记录:",
isActive: false,
},
{
text: "有",
isActive: false,
},
{
text: "无",
isActive: false,
},
],
roomTypeLabel: "机房值班", // 用于获取类型值
......@@ -165,9 +149,10 @@ export default {
color: #4a4a4a;
padding: 16px;
font-weight: 400;
margin-bottom: 14px;
}
.quick-input {
margin: 16px 18px;
margin: 16px 18px 18px 0;
font-size: 14px;
color: #7c7c7c;
font-weight: 400;
......
......@@ -23,9 +23,9 @@
/>
<view v-if="!isDisable" class="quick-input"> 快捷输入 </view>
<text v-if="!isDisable" class="quick-input"> 快捷输入 </text>
<view v-if="!isDisable">
<text v-if="!isDisable">
<text
class="qucik-text"
v-for="item in quickTextList"
......@@ -33,7 +33,7 @@
@click="clickQuick(item)"
>{{ item.text }}</text
>
</view>
</text>
</uni-forms-item>
<view class="user-info">
......@@ -99,37 +99,26 @@ export default {
successor: "", // 接班人
},
quickTextList: [
{
text: "有异常",
isActive: false,
},
{
text: "已处理",
isActive: false,
},
{
text: "需派单维修",
isActive: false,
},
{
text: "进出总人数:",
isActive: false,
},
{
text: "访客记录:",
isActive: false,
},
{
text: "未完成事项:",
isActive: false,
},
{
text: "有",
isActive: false,
},
{
text: "无",
isActive: false,
},
],
roomTypeLabel: "值班交接", // 用于获取类型值
......@@ -154,7 +143,6 @@ export default {
},
clickQuick(item) {
this.form.dutyHandover = `${this.form.dutyHandover}${item.text}`;
// this.quickTextList[index].isActive = item.isActive;
},
// 校验数据 所有表单
......@@ -204,9 +192,11 @@ export default {
color: #4a4a4a;
padding: 16px;
font-weight: 400;
margin-bottom: 14px;
}
.quick-input {
margin: 16px 18px;
margin: 16px 18px 18px 0 ;
font-size: 14px;
color: #7c7c7c;
font-weight: 400;
......
......@@ -51,16 +51,30 @@
<uni-forms-item
v-if="item.inspectionResult == 1"
required
class="row-item"
class="row-item note-item"
label="情况摘要"
name="notes"
>
<input
<textarea
type="text"
:disabled="isDisable"
v-model="item.notes"
placeholder="请输入内容"
/>
<view class="qucik-content">
<view v-if="!isDisable" class="quick-input"> 快捷输入 </view>
<view v-if="!isDisable">
<text
class="qucik-text"
v-for="quickItem in quickTextList"
:key="quickItem.text"
@click="clickQuick(item, quickItem)"
>{{ quickItem.text }}</text
>
</view>
</view>
</uni-forms-item>
</uni-forms>
</view>
......@@ -105,6 +119,17 @@ export default {
},
roomTypeLabel: "汇聚机房巡检", // 用于获取类型值
quickTextList: [
{
text: "有异常",
},
{
text: "已处理",
},
{
text: "需派单维修",
},
],
};
},
mounted() {
......@@ -173,7 +198,7 @@ export default {
{
value: 1,
label: "异常",
isActive: false,
},
],
measuredData: "", // 逗号分隔字符串
......@@ -181,7 +206,7 @@ export default {
postionList: pad_1_1_inspection_position.rows.map((item) => {
return {
...item,
isActive: false,
};
}),
};
......@@ -232,6 +257,9 @@ export default {
};
});
},
clickQuick(item, quickItem) {
item.notes = `${item.notes}${quickItem.text}`;
},
},
};
</script>
......@@ -284,9 +312,53 @@ export default {
}
}
.note-item {
textarea{
width: 100%;
height: 96px;
background: #f7f7f7;
border-radius: 1px;
font-size: 14px;
color: #4a4a4a;
padding: 16px;
font-weight: 400;
}
.qucik-content {
display: flex;
align-items: center;
.quick-input {
margin: 16px 18px 18px 0 ;
font-size: 14px;
color: #7c7c7c;
font-weight: 400;
}
.qucik-text {
display: inline-block;
border: 1px solid rgba(242, 242, 242, 1);
border-radius: 8px;
padding: 0 10px;
height: 32px;
font-size: 12px;
color: #4a4a4a;
line-height: 20px;
font-weight: 400;
margin-right: 12px;
line-height: 32px;
text-align: center;
}
}
}
/deep/ .uni-forms-item__content {
display: flex;
align-items: center;
}
.note-item {
/deep/ .uni-forms-item__content {
display: block;
}
}
}
</style>
......@@ -49,15 +49,30 @@
<!-- 异常状态时显示 -->
<uni-forms-item
required
class="row-item"
class="row-item note-item"
label="情况摘要"
name="notes"
v-if="item.inspectionResult == 1"
>
<input type="text"
:disabled="isDisable"
v-model="item.notes" placeholder="请输入内容" />
<textarea
type="text"
:disabled="isDisable"
v-model="item.notes"
placeholder="请输入内容"
/>
<view class="qucik-content">
<view v-if="!isDisable" class="quick-input"> 快捷输入 </view>
<view v-if="!isDisable">
<text
class="qucik-text"
v-for="quickItem in quickTextList"
:key="quickItem.text"
@click="clickQuick(item, quickItem)"
>{{ quickItem.text }}</text
>
</view>
</view>
</uni-forms-item>
</uni-forms>
</view>
......@@ -102,6 +117,17 @@ export default {
},
roomTypeLabel: "屏蔽机房巡检", // 用于获取类型值
quickTextList: [
{
text: "有异常",
},
{
text: "已处理",
},
{
text: "需派单维修",
},
],
};
},
mounted() {
......@@ -170,7 +196,7 @@ export default {
{
value: 1,
label: "异常",
isActive: false,
},
],
measuredData: "", // 逗号分隔字符串
......@@ -178,7 +204,7 @@ export default {
postionList: pad_1_2_inspection_position.rows.map((item) => {
return {
...item,
isActive: false,
};
}),
};
......@@ -229,6 +255,9 @@ export default {
};
});
},
clickQuick(item, quickItem) {
item.notes = `${item.notes}${quickItem.text}`;
},
},
};
</script>
......@@ -280,10 +309,53 @@ export default {
}
}
}
.note-item {
textarea{
width: 100%;
height: 96px;
background: #f7f7f7;
border-radius: 1px;
font-size: 14px;
color: #4a4a4a;
padding: 16px;
font-weight: 400;
}
.qucik-content {
display: flex;
align-items: center;
.quick-input {
margin: 16px 18px 18px 0 ;
font-size: 14px;
color: #7c7c7c;
font-weight: 400;
}
.qucik-text {
display: inline-block;
border: 1px solid rgba(242, 242, 242, 1);
border-radius: 8px;
padding: 0 10px;
height: 32px;
font-size: 12px;
color: #4a4a4a;
line-height: 20px;
font-weight: 400;
margin-right: 12px;
line-height: 32px;
text-align: center;
}
}
}
/deep/ .uni-forms-item__content {
display: flex;
align-items: center;
}
.note-item {
/deep/ .uni-forms-item__content {
display: block;
}
}
}
</style>
......@@ -24,7 +24,7 @@
list[activeIndex].position.map((item) => item.dictLabel).join("、")
}}</text>
</view>
<view class="descript-item">
<view v-if="list[activeIndex].descript" class="descript-item">
<text class="name">巡检说明</text>
<text class="text"> {{ list[activeIndex].descript }}</text>
</view>
......
......@@ -68,6 +68,18 @@
placeholder-style="color:#C7C7C7"
placeholder="请输入"
/>
<view>
<text v-if="!isDisable" class="quick-input"> 快捷输入 </text>
<text v-if="!isDisable">
<text
class="qucik-text"
v-for="item in quickTextList"
:key="item.text"
@click="clickQuick(item)"
>{{ item.text }}</text
>
</text>
</view>
</uni-forms-item>
</uni-forms>
</view>
......@@ -79,7 +91,6 @@ import {
pad_room_type,
} from "@/utils/dict.js";
/**
* 汇集机房
*/
......@@ -92,7 +103,9 @@ export default {
data() {
return {
list: [],
form: {},
form: {
conclusion: ''
},
rules: {
// 对notes字段进行必填验证
notes: {
......@@ -120,7 +133,27 @@ export default {
],
},
},
quickTextList: [
{
text: "全部正常",
},
{
text: "门禁异常:",
},
{
text: "卫生异常:",
},
{
text: "设备告警:",
},
{
text: "有",
},
{
text: "无",
},
],
// roomTypeLabel: "汇聚机房巡检", // 用于获取类型值
};
},
......@@ -271,6 +304,9 @@ export default {
return;
});
},
clickQuick(item) {
this.form.conclusion= `${this.form.conclusion}${item.text}`
},
},
};
</script>
......@@ -329,8 +365,12 @@ export default {
}
.textarea-form {
/deep/ .uni-forms-item__content {
display: block;
}
border-bottom: none;
margin-bottom: 0;
.textarea {
width: 100%;
height: 96px;
......@@ -340,6 +380,28 @@ export default {
color: #4a4a4a;
padding: 16px;
font-weight: 400;
margin-bottom: 14px;
}
.quick-input {
margin: 16px 18px 18px 0;
font-size: 14px;
color: #7c7c7c;
font-weight: 400;
}
.qucik-text {
display: inline-block;
border: 1px solid rgba(242, 242, 242, 1);
border-radius: 8px;
padding: 0 10px;
height: 32px;
font-size: 12px;
color: #4a4a4a;
line-height: 20px;
font-weight: 400;
margin-right: 12px;
line-height: 32px;
text-align: center;
}
}
}
......
......@@ -17,7 +17,7 @@
</view>
<!-- 描述 -->
<!-- <view class="descript">
<view class="descript">
<view v-if="list[activeIndex].position" class="descript-item">
<text class="name">巡检位置</text>
<text class="text">{{
......@@ -28,7 +28,7 @@
<text class="name">巡检说明</text>
<text class="text"> {{ list[activeIndex].descript }}</text>
</view>
</view> -->
</view>
</view>
</template>
<script>
......
......@@ -36,7 +36,7 @@
><text class="text">{{ baseInfo.inspectionCode }}</text>
</view>
<view class="base-row-item"
><text class="name">巡检日期</text
><text class="name">巡检时间</text
><text class="text">{{ baseInfo.inspectionTime }}</text>
</view>
</view>
......@@ -102,7 +102,7 @@ import {
writeDarf,
writeInspectionData,
} from "@/utils/IoReadingAndWriting.js";
import { pad_2_1_inspection_position } from "@/utils/dict.js";
import { pad_2_1_inspection_position,pad_2_1_floor } from "@/utils/dict.js";
import { getInspectionDetails, getDarft } from "@/request/index.js";
......@@ -175,8 +175,9 @@ export default {
value: item.dictValue,
isVaild: false, // 校验通过
// type: 1, // 枚举值
position: pad_2_1_inspection_position.rows,
position: pad_2_1_floor.rows,
refName: `TabContentItem_${index}`,
descript: "检查内容包括门禁、卫生、设备告警。"
};
});
......@@ -331,7 +332,7 @@ export default {
...temp[0],
isSubmit: 0,
isException: temp.filter((item) => item.isException > 1).length ? 1 : 0, // 总的数据
isException: temp.filter((item) => item.isException > 0).length ? 1 : 0, // 总的数据
items: [],
synchronization: 0, // 是否导出过
submitTime: moment().format("yyyy-MM-DD"), // 记录提交时间
......
......@@ -620,7 +620,8 @@ export const pad_1_2_inspection_position = {
// 机房巡检_电池间巡检_检查项
export const pad_1_3_inspection_items = {
"total": 11,
"msg": "操作成功",
"code": 200,
"rows": [
{
"createBy": "admin",
......@@ -794,27 +795,23 @@ export const pad_1_3_inspection_items = {
},
{
"createBy": "admin",
"createTime": "2024-09-05 15:50:28",
"createTime": "2024-09-05 15:56:14",
"updateBy": null,
"updateTime": null,
"remark": null,
"dictCode": 1275,
"dictCode": 1306,
"dictSort": 11,
"dictLabel": "清洁",
"dictValue": "11",
"dictType": "pad_1_1_inspection_items",
"dictType": "pad_1_3_inspection_items",
"cssClass": null,
"listClass": "default",
"isDefault": "N",
"status": "0",
"default": false
}
],
"code": 200,
"msg": "查询成功",
"status": null,
"map": null
};
]
}
// 机房巡检_电池间巡检_位置
export const pad_1_3_inspection_position = {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论