Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
computedRoomPad
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
邓文彬
computedRoomPad
Commits
e0881957
提交
e0881957
authored
9月 20, 2024
作者:
邓文彬
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(pad): 清除不需要的文件
上级
f61c28db
隐藏空白字符变更
内嵌
并排
正在显示
26 个修改的文件
包含
27 行增加
和
8031 行删除
+27
-8031
App.vue
App.vue
+1
-5
pages.json
pages.json
+4
-40
editPd.vue
pages/index/editPd.vue
+4
-0
inspDetail 2.vue
pages/inspection/inspDetail 2.vue
+0
-893
inspDetail.vue
pages/inspection/inspDetail.vue
+0
-895
inspProcess.vue
pages/inspection/inspProcess.vue
+0
-364
inspection.vue
pages/inspection/inspection.vue
+0
-698
lookInsp.vue
pages/inspection/lookInsp.vue
+0
-312
sampleTable.vue
pages/inspection/sampleTable.vue
+0
-82
inspectionPage.vue
pages/inspectionPage/inspectionPage.vue
+0
-22
repair.vue
pages/repair/repair.vue
+0
-522
repairDetail - 副本.vue
pages/repair/repairDetail - 副本.vue
+0
-403
repairDetail.vue
pages/repair/repairDetail.vue
+0
-472
sampleTable.vue
pages/repair/sampleTable.vue
+0
-77
showRapair.vue
pages/repair/showRapair.vue
+0
-289
lookReport.vue
pages/report/lookReport.vue
+0
-294
dialog_tag.vue
pages/report/report-detail/componets/dialog_tag.vue
+0
-104
deatil_first.vue
pages/report/report-detail/deatil_first.vue
+0
-406
report.vue
pages/report/report.vue
+0
-525
reportInfo - 副本.vue
pages/report/reportInfo - 副本.vue
+0
-778
reportInfo.vue
pages/report/reportInfo.vue
+0
-841
sampleTable.vue
pages/report/sampleTable.vue
+1
-1
synchronization.vue
pages/synchronization/synchronization.vue
+3
-3
dialog.vue
pages/synchronousManagement/dialog.vue
+11
-2
index.js
request/index.js
+1
-1
systemCofig.js
utils/systemCofig.js
+2
-2
没有找到文件。
App.vue
浏览文件 @
e0881957
...
@@ -58,7 +58,7 @@ export default {
...
@@ -58,7 +58,7 @@ export default {
},
},
onShow
:
function
()
{
onShow
:
function
()
{
const
now_user
=
uni
.
getStorageSync
(
"now_user"
)
||
{};
const
now_user
=
uni
.
getStorageSync
(
"now_user"
)
||
{};
if
(
now_use
r
.
name
)
{
if
(
now_use
.
user
)
{
this
.
$store
.
commit
(
"SET_USER"
,
now_user
);
this
.
$store
.
commit
(
"SET_USER"
,
now_user
);
}
}
this
.
init
();
this
.
init
();
...
@@ -68,10 +68,6 @@ export default {
...
@@ -68,10 +68,6 @@ export default {
uni
.
setStorageSync
(
"now_user"
,
this
.
$store
.
state
.
now_user
);
uni
.
setStorageSync
(
"now_user"
,
this
.
$store
.
state
.
now_user
);
uni
.
setStorageSync
(
"last_time"
,
this
.
$store
.
state
.
now_user
.
LastSynchronizationTime
);
uni
.
setStorageSync
(
"last_time"
,
this
.
$store
.
state
.
now_user
.
LastSynchronizationTime
);
// uni.redirectTo({
// url: "/pages/login/login",
// });
// uni.clearStorage(); //将所有缓存清除
console
.
log
(
"---onHide"
,
)
console
.
log
(
"---onHide"
,
)
},
},
...
...
pages.json
浏览文件 @
e0881957
...
@@ -16,52 +16,16 @@
...
@@ -16,52 +16,16 @@
"path"
:
"pages/synchronization/synchronization"
"path"
:
"pages/synchronization/synchronization"
},
},
//巡检管理
//巡检管理
{
"path"
:
"pages/inspection/inspection"
},
{
{
"path"
:
"pages/inspection/inspFirst"
"path"
:
"pages/inspection/inspFirst"
},
},
{
{
"path"
:
"pages/inspection/inspDetail"
},
{
"path"
:
"pages/inspection/sampleTable"
},
{
"path"
:
"pages/inspection/lookInsp"
},
{
"path"
:
"pages/inspection/inspProcess"
},
//报修管理
{
"path"
:
"pages/repair/repair"
},
{
"path"
:
"pages/repair/repairDetail"
},
{
//查看报修
"path"
:
"pages/repair/showRapair"
},
{
//报告管理
"path"
:
"pages/report/report"
},
{
//查看报告
"path"
:
"pages/report/lookReport"
},
{
//新增报告
"path"
:
"pages/report/reportInfo"
},
{
//报告样表
"path"
:
"pages/report/sampleTable"
"path"
:
"pages/report/sampleTable"
},
},
{
//报修样表
"path"
:
"pages/repair/sampleTable"
},
{
//报告管理
1
"path"
:
"pages/report/report-detail/deatil_first"
},
{
//修改密码
{
//修改密码
"path"
:
"pages/index/editPd"
"path"
:
"pages/index/editPd"
},
},
...
...
pages/index/editPd.vue
浏览文件 @
e0881957
...
@@ -180,6 +180,10 @@ export default {
...
@@ -180,6 +180,10 @@ export default {
this
.
logOut
();
this
.
logOut
();
});
});
}
else
{
}
else
{
this
.
formData
=
{
oldPd
:
""
,
newPd
:
""
,
};
uni
.
showToast
({
uni
.
showToast
({
title
:
"更新失败,原密码错误,请重新输入!"
,
title
:
"更新失败,原密码错误,请重新输入!"
,
icon
:
"none"
,
icon
:
"none"
,
...
...
pages/inspection/inspDetail 2.vue
deleted
100644 → 0
浏览文件 @
f61c28db
<
template
>
<view
class=
"container"
>
<!-- 导航栏 -->
<uni-nav-bar
dark
:fixed=
"true"
background-color=
"#5474e8"
status-bar
title=
"杭州内网监管在线"
left-icon=
"left"
left-text=
"返回"
right-text=
"查看样表"
@
clickLeft=
"back(baseFormData)"
@
clickRight=
"lookTable(baseFormData.room)"
/>
<view
class=
"content"
>
<!-- 基本信息 -->
<view
class=
"info-box box-shaow-box"
>
<view
class=
"from-title"
>
<view
class=
"from-title-item"
>
<span
class=
"line-class"
></span>
基本信息
</view>
<view
class=
"center-class"
v-show=
"!isShow"
>
巡检区域:
<span
style=
"color: #ff0000;"
>
{{
showRoomName
(
baseFormData
.
room
)
}}
</span>
</view>
</view>
<view
class=
"collapse-box-icon"
@
tap=
"collapseChange"
>
<image
src=
"../../static/img/upArrow.png"
mode=
""
v-show=
"!isShow"
></image>
<image
src=
"../../static/img/downArrow.png"
mode=
""
v-show=
"isShow"
></image>
</view>
<uni-forms
v-show=
"isShow"
ref=
"baseForm"
:modelValue=
"baseFormData"
label-width=
"100px"
label-align=
"right"
>
<uni-row
class=
"demo-uni-row"
>
<uni-col
:span=
"8"
>
<uni-forms-item
label=
"选择区域:"
>
<uni-data-select
v-model=
"baseFormData.room"
:localdata=
"roomRange"
@
change=
"roomChange"
:clear=
"false"
>
</uni-data-select>
</uni-forms-item>
</uni-col>
<uni-col
:span=
"8"
style=
"padding: 0 5px;"
>
<uni-forms-item
label=
"编号:"
>
<uni-easyinput
:disabled=
"allDisabled"
maxlength=
"50"
v-model=
"baseFormData.number"
/>
</uni-forms-item>
</uni-col>
<uni-col
:span=
"8"
>
<uni-forms-item
label=
"巡检日期:"
>
<uni-datetime-picker
:disabled=
"allDisabled"
type=
"date"
:clear-icon=
"false"
v-model=
"baseFormData.time"
/>
</uni-forms-item>
</uni-col>
</uni-row>
</uni-forms>
</view>
<!-- 巡检项目 -->
<view
class=
"detail-box "
>
<view
class=
"from-title flex-title"
>
<view
class=
"from-title-item"
>
<span
class=
"line-class"
></span>
巡检项目
</view>
<view
class=
"submit-class"
v-if=
"!allDisabled"
>
<button
size=
"mini"
type=
"primary"
class=
"submit-button"
:disabled=
"isDisabled"
@
tap=
"submit"
>
提交
</button>
</view>
</view>
<hm-table
v-if=
"baseFormData.room == '1'"
ref=
"hmTable"
:isShow=
'isShow'
@
saveData=
"saveData"
@
save=
"isSave"
:listData=
"tableData"
:disabled=
"allDisabled"
></hm-table>
<pm-table
v-if=
"baseFormData.room == '2'"
ref=
"pmTable"
:isShow=
'isShow'
@
saveData=
"saveData"
@
save=
"isSave"
:listData=
"tableData"
:disabled=
"allDisabled"
></pm-table>
<cs-table
v-if=
"baseFormData.room == '3'"
ref=
"csTable"
:isShow=
'isShow'
@
saveData=
"saveData"
@
save=
"isSave"
:listData=
"tableData"
:disabled=
"allDisabled"
></cs-table>
<jy-table
v-if=
"baseFormData.room == '4'"
ref=
"jyTable"
:isShow=
'isShow'
@
saveData=
"saveData"
@
save=
"isSave"
:listData=
"tableData"
:disabled=
"allDisabled"
></jy-table>
<ups-table
v-if=
"baseFormData.room == '5'"
ref=
"upsTable"
:isShow=
'isShow'
@
saveData=
"saveData"
@
save=
"isSave"
:listData=
"tableData"
:disabled=
"allDisabled"
></ups-table>
<equi-table
v-if=
"baseFormData.room == '7'"
ref=
"equiTable"
:isShow=
'isShow'
@
saveData=
"saveData"
@
save=
"isSave"
:listData=
"tableData"
:disabled=
"allDisabled"
></equi-table>
<sbf-cs-table
v-if=
"baseFormData.room == '8'"
ref=
"sbfCsTable"
:isShow=
'isShow'
@
saveData=
"saveData"
@
save=
"isSave"
:listData=
"tableData"
:disabled=
"allDisabled"
></sbf-cs-table>
<sbf-ups-table
v-if=
"baseFormData.room == '9'"
ref=
"sbfUpsTable"
:isShow=
'isShow'
@
saveData=
"saveData"
@
save=
"isSave"
:listData=
"tableData"
:disabled=
"allDisabled"
></sbf-ups-table>
<other-table
v-if=
"baseFormData.room == '6'"
ref=
"otherTable"
:isShow=
'isShow'
@
saveData=
"saveData"
@
save=
"isSave"
:listData=
"tableData"
:disabled=
"allDisabled"
></other-table>
<view
class=
"btn-box"
v-if=
"!allDisabled"
>
<button
type=
"warn"
class=
"delBtn"
size=
"mini"
@
tap=
"delInsp"
>
删除
</button>
<button
type=
"primary"
class=
"saveBtn"
size=
"mini"
@
tap=
"saveInsp"
>
保存草稿
</button>
</view>
</view>
</view>
<uni-popup
ref=
"inputDialog"
background-color=
"#fff"
v-if=
"$store.state.oper_type == '新增'"
>
<view
class=
"popup-content"
>
<text
class=
"text"
>
返回后,系统自动生成巡检记录
</text>
</view>
<view
class=
"popup-content"
>
<button
class=
"dialog-btn"
type=
"primary"
size=
"mini"
@
tap=
"dialogInputConfirm"
>
知道了
</button>
</view>
</uni-popup>
<uni-popup
ref=
"inputDialog"
type=
"dialog"
v-else
>
<uni-popup-dialog
ref=
"inputClose"
mode=
"base"
title=
"未确认保存的数据,返回后自动清空."
@
confirm=
"dialogInputConfirm"
confirmText=
"确认"
>
</uni-popup-dialog>
</uni-popup>
<!-- 删除提示框 -->
<uni-popup
ref=
"inputDialog2"
type=
"dialog"
>
<uni-popup-dialog
ref=
"inputClose"
mode=
"base"
title=
"删除"
@
confirm=
"dialogInputConfirm"
>
<view
class=
"content-pop"
>
编号:
{{
popupTitle
.
number
}}
的
{{
showRoomName
(
popupTitle
.
room
)
}}{{
popupTitle
.
name
}}
,确认删除?
</view>
</uni-popup-dialog>
</uni-popup>
</view>
</
template
>
<
script
>
import
hmTable
from
"../../components/inspDetail/hmRoom/hmTable.vue"
import
pmTable
from
"../../components/inspDetail/pmRoom/pmTable.vue"
import
csTable
from
"../../components/inspDetail/csRoom/csTable.vue"
import
jyTable
from
"../../components/inspDetail/jyRoom/jyTable.vue"
import
upsTable
from
"../../components/inspDetail/upsRoom/upsTable.vue"
import
equiTable
from
"../../components/inspDetail/equiRoom/equiTable.vue"
import
sbfCsTable
from
"../../components/inspDetail/sbfCsRoom/sbfCsTable.vue"
import
sbfUpsTable
from
"../../components/inspDetail/sbfUpsRoom/sbfUpsTable.vue"
import
otherTable
from
"../../components/inspDetail/otherRoom/otherTable.vue"
import
allData
from
"../../components/inspDetail/data/allData.js"
import
getDateTime
from
"@/common/getdateTime.js"
export
default
{
components
:
{
hmTable
,
pmTable
,
csTable
,
jyTable
,
upsTable
,
equiTable
,
sbfCsTable
,
sbfUpsTable
,
otherTable
},
data
()
{
return
{
popupTitle
:
{
number
:
null
,
name
:
''
,
room
:
''
},
isDel
:
{},
isShow
:
false
,
baseFormData
:
{
// room: '5',
// number: null,
// time: ''
errorData
:
{}
},
roomRange
:
[{
text
:
'核密机房'
,
value
:
'1'
},
{
text
:
'普密机房'
,
value
:
'2'
},
{
text
:
'传输机房'
,
value
:
'3'
},
{
text
:
'机要值班室'
,
value
:
'4'
},
{
text
:
'UPS机房'
,
value
:
'5'
},
{
text
:
'省备份主机房'
,
value
:
'7'
},
{
text
:
'省备份传输机房'
,
value
:
'8'
},
{
text
:
'省备份UPS机房'
,
value
:
'9'
},
{
text
:
'其他区域'
,
value
:
'6'
}],
contentData
:
{
HMDSPDa
:
""
,
HMDSPDb
:
""
,
HMDSPDc
:
""
,
HMDSPDResult
:
"正常"
,
HMDSPDRemarks
:
""
,
HMDUPDa
:
""
,
HMDUPDb
:
""
,
HMDUPDc
:
""
,
HMDUPDResult
:
"正常"
,
HMDUPDRemarks
:
""
,
HMDSDLa
:
""
,
HMDSDLb
:
""
,
HMDSDLc
:
""
,
HMDSDLResult
:
"正常"
,
HMDSDLRemarks
:
""
,
HMDUDLa
:
""
,
HMDUDLb
:
""
,
HMDUDLc
:
""
,
HMDUDLResult
:
"正常"
,
HMDUDLRemarks
:
""
,
HMDZMDResult
:
"正常"
,
HMDZMDRemarks
:
""
,
HMDJGXResult
:
"正常"
,
HMDJGXRemarks
:
""
,
HMTKTResult
:
"正常"
,
HMTKTRemarks
:
""
,
HMTXFWind
:
""
,
HMTXFResult
:
"正常"
,
HMTXFRemarks
:
""
,
HMXQT1
:
""
,
HMXQTKg
:
""
,
HMXQTResult
:
"正常"
,
HMXQTRemarks
:
""
,
HMXSCY1
:
""
,
HMXSCY2
:
""
,
HMXSCY3
:
""
,
HMXSCYResult
:
"正常"
,
HMXSCYRemarks
:
""
,
HMXSCE1
:
""
,
HMXSCE2
:
""
,
HMXSCEResult
:
"正常"
,
HMXSCERemarks
:
""
,
HMXKZResult
:
"正常"
,
HMXKZRemarks
:
""
,
HMHWSJTemp
:
""
,
HMHWSJHumidity
:
""
,
HMHWSJResult
:
"正常"
,
HMHWSJRemarks
:
""
,
HMHCGQTemp
:
""
,
HMHCGQHumidity
:
""
,
HMHCGQResult
:
"正常"
,
HMHCGQRemarks
:
""
,
HMHKTResult
:
"正常"
,
HMHKTRemarks
:
""
,
HMHSDCa
:
""
,
HMHSDCb
:
""
,
HMHSDCc
:
""
,
HMHSDCResult
:
"正常"
,
HMHSDCRemarks
:
""
,
HMHUCJa
:
""
,
HMHUCJb
:
""
,
HMHUCJc
:
""
,
HMHUCJResult
:
"正常"
,
HMHUCJRemarks
:
""
,
HMATXResult
:
"正常"
,
HMATXRemarks
:
""
,
HMASPResult
:
"正常"
,
HMASPRemarks
:
""
,
HMAMJResult
:
"正常"
,
HMAMJRemarks
:
""
,
HMABBResult
:
"正常"
,
HMABBRemarks
:
""
,
HMPKHk
:
""
,
HMPKHkResult
:
"正常"
,
HMPKHkRemarks
:
""
,
HMPKHm
:
""
,
HMPKHmResult
:
"正常"
,
HMPKHmRemarks
:
""
,
HMPHPResult
:
"正常"
,
HMPHPRemarks
:
""
,
HMPNBQResult
:
"正常"
,
HMPNBQRemarks
:
""
,
HMPBDGResult
:
"正常"
,
HMPBDGRemarks
:
""
,
HMQResult
:
"正常"
,
HMQRemarks
:
""
,
// 普密机房
PMXSC1
:
""
,
PMXSC2
:
""
,
PMXSCResult
:
"正常"
,
PMXSCRemarks
:
""
,
PMARQResult
:
"正常"
,
PMARQRemarks
:
""
,
// cs机房
CSXQT1
:
""
,
CSXQTKg1
:
""
,
CSXQT2
:
""
,
CSXQTKg2
:
""
,
CSXQT3
:
""
,
CSXQTKg3
:
""
,
CSXQTResult
:
"正常"
,
CSXQTRemarks
:
""
,
CSXSCY1
:
""
,
CSXSCYResult
:
"正常"
,
CSXSCYRemarks
:
""
,
CSXSCE1
:
""
,
CSXSCEResult
:
"正常"
,
CSXSCERemarks
:
""
,
CSABJResult
:
"正常"
,
CSABJRemarks
:
""
,
// 机要值班室
JYDPJPResult
:
"正常"
,
JYDPJPRemarks
:
""
,
JYDSResult
:
"正常"
,
JYDSRemarks
:
""
,
JYDZMDResult
:
"正常"
,
JYDZMDRemarks
:
""
,
JYDCZResult
:
"正常"
,
JYDCZRemarks
:
""
,
JYTKTResult
:
"正常"
,
JYTKTRemarks
:
""
,
JYTXFResult
:
"正常"
,
JYTXFRemarks
:
""
,
JYXSC1
:
""
,
JYXSC2
:
""
,
JYXSCResult
:
"正常"
,
JYXSCRemarks
:
""
,
JYJJHJResult
:
"正常"
,
JYJJHJRemarks
:
""
,
JYJSPResult
:
"正常"
,
JYJSPRemarks
:
""
,
JYJGFResult
:
"正常"
,
JYJGFRemarks
:
""
,
JYATXDeviation
:
""
,
JYATXResult
:
"正常"
,
JYATXRemarks
:
""
,
JYASPResult
:
"正常"
,
JYASPRemarks
:
""
,
JYAMJDeviation
:
""
,
JYAMJResult
:
"正常"
,
JYAMJRemarks
:
""
,
JYARQResult
:
"正常"
,
JYARQRemarks
:
""
,
JYAKSResult
:
"正常"
,
JYAKSRemarks
:
""
,
JYHK
:
""
,
JYHC
:
""
,
JYHM
:
""
,
JYHY
:
""
,
JYHHK
:
""
,
JYHHC
:
""
,
JYHHM
:
""
,
JYHHY
:
""
,
// UPS机房
UPSDZJa1
:
""
,
UPSDZJb1
:
""
,
UPSDZJc1
:
""
,
UPSDZJResult1
:
"正常"
,
UPSDZJRemarks1
:
""
,
UPSDZJa2
:
""
,
UPSDZJb2
:
""
,
UPSDZJc2
:
""
,
UPSDZJResult2
:
"正常"
,
UPSDZJRemarks2
:
""
,
UPSXQ1
:
""
,
UPSXQKg1
:
""
,
UPSXQ2
:
""
,
UPSXQKg2
:
""
,
UPSXQResult
:
"正常"
,
UPSXQRemarks
:
""
,
UPSXSC1
:
""
,
UPSXSC2
:
""
,
UPSXSCResult
:
"正常"
,
UPSXSCRemarks
:
""
,
// 其他区域
OYJZMDResult
:
"正常"
,
OYJZMDRemarks
:
""
,
OYJKGResult
:
"正常"
,
OYJKGRemarks
:
""
,
OYJKTResult
:
"正常"
,
OYJKTRemarks
:
""
,
OKFZMDResult
:
"正常"
,
OKFZMDRemarks
:
""
,
OKFKGResult
:
"正常"
,
OKFKGRemarks
:
""
,
OKFRQResult
:
"正常"
,
OKFRQRemarks
:
""
,
OBBZMDResult
:
"正常"
,
OBBZMDRemarks
:
""
,
OBBKGResult
:
"正常"
,
OBBKGRemarks
:
""
,
OBBKTResult
:
"正常"
,
OBBKTRemarks
:
""
,
OBBEResult
:
"正常"
,
OBBERemarks
:
""
,
ODYZMDResult
:
"正常"
,
ODYZMDRemarks
:
""
,
ODYKGResult
:
"正常"
,
ODYKGRemarks
:
""
,
ODYTFResult
:
"正常"
,
ODYTFRemarks
:
""
,
ODYEResult
:
"正常"
,
ODYERemarks
:
""
,
ODYDYJResult
:
"正常"
,
ODYDYJRemarks
:
""
,
ODYSZJResult
:
"正常"
,
ODYSZJRemarks
:
""
,
OWSJResult
:
"正常"
,
OWSJRemarks
:
""
,
OXXSResult
:
"正常"
,
OXXSRemarks
:
""
,
printer
:
{
model
:
"奔图CP2510DN"
,
purpose
:
"主渠道收发"
,
state
:
"密"
,
inkBoxModel
:
"CTL350"
,
inkBoxk
:
""
,
inkBoxc
:
""
,
inkBoxm
:
""
,
inkBoxy
:
""
,
testPage
:
""
,
record
:
""
,
},
printerList
:
[{
printer
:
{
model
:
""
,
purpose
:
""
,
state
:
""
,
inkBoxModel
:
""
,
inkBoxk
:
""
,
inkBoxc
:
""
,
inkBoxm
:
""
,
inkBoxy
:
""
,
testPage
:
""
,
record
:
""
,
},
},
],
},
tempData
:
{},
tableData
:
{},
allData
:
{},
flag
:
true
,
isDisabled
:
true
,
allDisabled
:
false
}
},
onBackPress
(
options
)
{
// 触发返回就会调用此方法,这里实现的是禁用物理返回,顶部导航栏的自定义返回 uni.navigateBack 仍可使用
if
(
options
.
from
==
'backbutton'
)
{
if
(
this
.
baseFormData
.
status
==
'已同步'
)
{
uni
.
navigateBack
()
}
else
{
if
(
!
this
.
isCom
)
{
this
.
$refs
.
inputDialog
.
open
()
}
else
{
uni
.
navigateBack
()
}
}
return
true
;
}
else
if
(
options
.
from
==
'navigateBack'
)
{
return
false
;
}
},
created
()
{
if
(
JSON
.
stringify
(
this
.
$store
.
state
.
temp_data
)
!==
'{}'
)
{
this
.
baseFormData
=
this
.
$store
.
state
.
temp_data
// console.log(this.baseFormData.tempData, '當前暫存的數據');
if
(
this
.
baseFormData
.
tempData
)
{
this
.
tableData
=
this
.
baseFormData
.
tempData
this
.
tempData
=
this
.
baseFormData
.
tempData
this
.
flag
=
false
}
}
if
(
this
.
$store
.
state
.
oper_type
==
'查看'
)
{
this
.
allDisabled
=
true
}
this
.
allData
=
JSON
.
parse
(
JSON
.
stringify
(
allData
))
console
.
log
(
this
.
allData
,
2123
);
},
watch
:
{
"baseFormData.room"
:
{
handler
(
newV
,
oldV
)
{
if
(
newV
&&
this
.
flag
)
{
let
val
=
newV
switch
(
val
)
{
case
'1'
:
console
.
log
(
'核密机房'
);
this
.
tableData
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
allData
.
hmConfigData
));
break
;
case
'2'
:
console
.
log
(
'普密机房'
);
this
.
tableData
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
allData
.
pmConfigData
));
break
;
case
'3'
:
console
.
log
(
'传输机房'
);
this
.
tableData
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
allData
.
csConfigData
));
break
;
case
'4'
:
console
.
log
(
'JY机房'
);
this
.
tableData
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
allData
.
jyConfigData
));
break
;
case
'5'
:
console
.
log
(
'UPS机房'
);
this
.
tableData
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
allData
.
upsConfigData
));
break
;
case
'6'
:
console
.
log
(
'其他机房'
);
this
.
tableData
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
allData
.
otherConfigData
));
break
;
case
'7'
:
console
.
log
(
'生备份主机房'
);
this
.
tableData
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
allData
.
equiConfigData
));
break
;
case
'8'
:
console
.
log
(
'省备份传输机房'
);
this
.
tableData
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
allData
.
sbfCsConfigData
));
break
;
case
'9'
:
console
.
log
(
'省备份UPS机房'
);
this
.
tableData
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
allData
.
sbfUpsConfigData
));
break
;
}
this
.
tempData
=
this
.
tableData
// console.log('监听触发');
}
},
deep
:
true
,
immediate
:
true
}
},
methods
:
{
showRoomName
(
val
)
{
let
res
=
""
;
switch
(
val
)
{
case
"1"
:
res
=
"核密机房"
;
break
;
case
"2"
:
res
=
"普密机房"
;
break
;
case
"3"
:
res
=
"传输机房"
;
break
;
case
"4"
:
res
=
"机要值班室"
;
break
;
case
"5"
:
res
=
"UPS机房"
;
break
;
case
"6"
:
res
=
"其他区域"
;
break
;
case
"7"
:
res
=
"省备份主机房"
;
break
;
case
"8"
:
res
=
"省备份传输机房"
;
break
;
case
"9"
:
res
=
"省备份UPS机房"
;
break
;
}
return
res
;
},
roomChange
(
e
)
{
this
.
flag
=
true
this
.
$nextTick
(()
=>
{
// console.log('改变触发');
this
.
tempData
=
this
.
tableData
this
.
saveTempData
()
})
uni
.
showLoading
({
title
:
'加载中'
,
mask
:
true
});
setTimeout
(()
=>
{
uni
.
hideLoading
()
},
1000
)
},
isSave
(
val
)
{
this
.
isDisabled
=
!
val
},
dialogInputConfirm
()
{
// uni.navigateBack()
uni
.
navigateBack
()
},
back
(
val
)
{
if
(
val
.
status
==
'已同步'
)
{
uni
.
navigateBack
()
}
else
{
if
(
this
.
isDisabled
)
{
this
.
$refs
.
inputDialog
.
open
()
}
else
{
uni
.
navigateBack
()
}
}
},
delInsp
()
{
this
.
$refs
.
inputDialog2
.
open
()
this
.
isDel
=
this
.
baseFormData
this
.
popupTitle
.
number
=
this
.
baseFormData
.
number
this
.
popupTitle
.
room
=
this
.
baseFormData
.
room
this
.
popupTitle
.
name
=
'巡检记录'
},
dialogInputConfirm
()
{
this
.
$store
.
state
.
all_data
.
map
((
item
,
index
)
=>
{
if
(
item
.
uid
==
this
.
isDel
.
uid
)
{
console
.
log
(
'删除'
);
this
.
$store
.
commit
(
'DEL_DATA'
,
index
)
// this.$store.state.all_data.splice(index, 1)
let
timeStr
=
getDateTime
.
dateTimeStr
(
'y-m-d h:i'
)
let
operData
=
{
name
:
this
.
$store
.
state
.
now_user
.
name
,
level
:
'秘密'
,
user
:
this
.
$store
.
state
.
now_user
.
user
,
module
:
'巡检'
,
detail
:
this
.
showRoomName
(
item
.
room
)
+
'巡检记录'
+
'('
+
item
.
number
+
')'
,
type
:
'删除'
,
time
:
timeStr
}
this
.
$store
.
state
.
oper_record
.
unshift
(
operData
)
uni
.
showToast
({
title
:
'删除成功'
,
icon
:
'none'
,
duration
:
2000
})
}
})
uni
.
navigateBack
()
},
saveInsp
()
{
// console.log(123123);
let
val
=
this
.
baseFormData
.
room
let
refName
=
''
switch
(
val
)
{
case
'1'
:
refName
=
"hmTable"
;
break
;
case
'2'
:
refName
=
"pmTable"
;
break
;
case
'3'
:
refName
=
"csTable"
;
break
;
case
'4'
:
refName
=
"jyTable"
;
break
;
case
'5'
:
refName
=
"upsTable"
;
break
;
case
'6'
:
refName
=
"otherTable"
;
break
;
case
'7'
:
refName
=
"equiTable"
;
break
;
case
'8'
:
refName
=
"sbfCsTable"
;
break
;
case
'9'
:
refName
=
"sbfUpsTable"
;
break
;
}
this
.
$refs
[
refName
].
saveData
()
},
collapseChange
()
{
this
.
isShow
=
!
this
.
isShow
},
saveTempData
()
{
this
.
baseFormData
.
tempData
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
tempData
))
// console.log(this.baseFormData, '切换后的数据');
this
.
$store
.
state
.
all_data
.
map
((
item
,
index
)
=>
{
if
(
this
.
baseFormData
.
uid
==
item
.
uid
)
{
this
.
$store
.
state
.
all_data
.
splice
(
index
,
1
,
this
.
baseFormData
)
}
})
},
saveData
(
data
,
tempData
)
{
let
arr
=
tempData
[
Object
.
keys
(
tempData
)[
0
]]
this
.
baseFormData
.
errorData
[
Object
.
keys
(
tempData
)[
0
]]
=
this
.
baseFormData
.
errorData
[
Object
.
keys
(
tempData
)[
0
]]
?
this
.
baseFormData
.
errorData
[
Object
.
keys
(
tempData
)[
0
]]
:
[],
this
.
baseFormData
.
abnormality
=
this
.
baseFormData
.
abnormality
?
this
.
baseFormData
.
abnormality
:
'无异常'
arr
.
map
(
item
=>
{
if
(
item
[
item
[
'resKey'
]]
==
'异常'
||
item
[
item
[
'resKey2'
]]
==
'异常'
)
{
let
isExist
=
this
.
baseFormData
.
errorData
[
Object
.
keys
(
tempData
)[
0
]].
some
(
obj
=>
obj
.
content
==
item
.
content
);
//判断当前异常项是否已经添加
if
(
!
isExist
)
{
item
.
handlerState
=
'已处理'
//初始化字段
item
.
handlerDesc
=
''
item
.
handlerPerson
=
''
item
.
handlerDate
=
''
this
.
baseFormData
.
errorData
[
Object
.
keys
(
tempData
)[
0
]].
push
(
item
)
this
.
baseFormData
.
abnormality
=
'有异常'
}
else
{
console
.
log
(
'对象已经存在'
);
}
}
})
this
.
contentData
=
{
...
this
.
contentData
,
...
data
}
this
.
tempData
=
{
...
this
.
tempData
,
...
tempData
}
// console.log(this.contentData, this.tempData);
this
.
baseFormData
.
content
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
contentData
))
this
.
baseFormData
.
tempData
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
tempData
))
this
.
baseFormData
.
errorData
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
baseFormData
.
errorData
))
if
(
this
.
baseFormData
.
uid
)
{
// console.log('已存在',this.baseFormData);
this
.
$store
.
state
.
all_data
.
map
((
item
,
index
)
=>
{
if
(
this
.
baseFormData
.
uid
==
item
.
uid
)
{
this
.
$store
.
state
.
all_data
.
splice
(
index
,
1
,
this
.
baseFormData
)
//每保存一项内容就保存到缓存
}
})
uni
.
showToast
({
title
:
'保存成功'
,
icon
:
'none'
,
duration
:
2000
})
}
},
submit
()
{
this
.
baseFormData
.
status
=
'待同步'
//pad端添加状态
this
.
$store
.
state
.
all_data
.
map
((
item
,
index
)
=>
{
if
(
this
.
baseFormData
.
uid
==
item
.
uid
)
{
this
.
$store
.
state
.
all_data
.
splice
(
index
,
1
,
this
.
baseFormData
)
}
})
uni
.
showToast
({
title
:
'保存成功'
,
icon
:
'none'
,
duration
:
2000
})
if
(
this
.
$store
.
state
.
oper_type
==
'新增'
)
{
uni
.
redirectTo
({
url
:
"/pages/inspection/inspection"
})
}
else
if
(
this
.
$store
.
state
.
oper_type
==
'编辑'
)
{
uni
.
navigateBack
()
}
},
lookTable
(
val
)
{
this
.
$store
.
commit
(
'SET_ROOM'
,
val
)
uni
.
navigateTo
({
url
:
"/pages/inspection/sampleTable"
})
}
}
}
</
script
>
<
style
lang=
"less"
scoped
>
.popup-content {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: center;
padding: 15px;
height: 50px;
background-color: #fff;
}
.dialog-btn {
background-color: #5474e8;
}
.submit-class {
.submit-button {
background-color: #5474e8;
box-shadow: 0px 3px 6px 0px rgba(84, 116, 232, 0.16);
}
}
.container {
width: 100%;
height: 100%;
.content {
width: 100%;
height: calc(100% - 44px - var(--status-bar-height));
background-image: linear-gradient(0deg, #f3f6fa 0%, rgba(130, 153, 238, 0.73) 49%, #5474e8 100%);
background-size: 100% 40rpx;
background-repeat: no-repeat;
padding: 20px;
padding-top: 0;
.from-title {
display: flex;
align-items: center;
// justify-content: space-between;
font-size: 18px !important;
margin-bottom: 10px;
.line-class {
display: inline-block;
width: 2px;
height: 18px;
background-color: #5474e8;
margin-right: 5px;
}
.from-title-item {
display: flex;
align-items: center;
}
.center-class {
position: absolute;
left: 50%;
transform: translate(-50%);
color: #778ca2;
}
}
.flex-title {
justify-content: space-between;
}
.info-box {
width: 100%;
// height: 112px;
padding: 10px;
padding-bottom: 2px;
background-color: #ffffff;
position: relative;
.collapse-box-icon {
position: absolute;
right: 10px;
top: 10px;
width: 14px;
height: 14px;
// background-color: red;
image {
width: 100%;
height: 100%;
}
}
}
.detail-box {
width: 100%;
padding: 10px;
background-color: #ffffff;
margin-top: 20px;
position: relative;
background-color: #ffffff;
box-shadow: 0px 0px 6px 0px rgba(84, 116, 232, 0.16);
border-radius: 10px 10px 0 0;
.btn-box {
width: 984px;
height: 60px;
border-radius: 0 0 10px 10px;
position: fixed;
left: 20px;
bottom: 10px;
background-color: #ffffff;
// border: 1px solid red;
display: flex;
align-items: center;
button {
width: 130px;
height: 40px;
line-height: 40px;
box-shadow: 0px 3px 6px 0px rgba(84, 116, 232, 0.16);
}
.saveBtn {
// width: ;
background-color: #5474e8;
// border-radius: 10px;
}
}
}
}
}
</
style
>
\ No newline at end of file
pages/inspection/inspDetail.vue
deleted
100644 → 0
浏览文件 @
f61c28db
<
template
>
<view
class=
"container"
>
<!-- 导航栏 -->
<uni-nav-bar
dark
:fixed=
"true"
background-color=
"#5474e8"
status-bar
title=
"杭州内网监管在线"
left-icon=
"left"
left-text=
"返回"
right-text=
"查看样表"
@
clickLeft=
"back(baseFormData)"
@
clickRight=
"lookTable(baseFormData.room)"
/>
<view
class=
"content"
>
<!-- 基本信息 -->
<view
class=
"info-box box-shaow-box"
>
<view
class=
"from-title"
>
<view
class=
"from-title-item"
>
<span
class=
"line-class"
></span>
基本信息
</view>
<view
class=
"center-class"
v-show=
"!isShow"
>
巡检区域:
<span
style=
"color: #ff0000;"
>
{{
showRoomName
(
baseFormData
.
room
)
}}
</span>
</view>
</view>
<view
class=
"collapse-box-icon"
@
tap=
"collapseChange"
>
<image
src=
"../../static/img/upArrow.png"
mode=
""
v-show=
"!isShow"
></image>
<image
src=
"../../static/img/downArrow.png"
mode=
""
v-show=
"isShow"
></image>
</view>
<uni-forms
v-show=
"isShow"
ref=
"baseForm"
:modelValue=
"baseFormData"
label-width=
"100px"
label-align=
"right"
:rules=
"rules"
>
<uni-row
class=
"demo-uni-row"
>
<uni-col
:span=
"8"
>
<uni-forms-item
label=
"选择区域:"
required
name=
"room"
>
<uni-data-select
v-model=
"baseFormData.room"
:localdata=
"roomRange"
@
change=
"roomChange"
:clear=
"false"
disabled
>
</uni-data-select>
</uni-forms-item>
</uni-col>
<uni-col
:span=
"8"
style=
"padding: 0 5px;"
>
<uni-forms-item
label=
"编号:"
required
name=
"number"
>
<uni-easyinput
:disabled=
"allDisabled"
maxlength=
"50"
v-model=
"baseFormData.number"
/>
</uni-forms-item>
</uni-col>
<uni-col
:span=
"8"
>
<uni-forms-item
label=
"巡检日期:"
required
name=
"time"
>
<uni-datetime-picker
:disabled=
"allDisabled"
type=
"date"
:clear-icon=
"false"
v-model=
"baseFormData.time"
/>
</uni-forms-item>
</uni-col>
</uni-row>
</uni-forms>
</view>
<!-- 巡检项目 -->
<view
class=
"detail-box "
>
<view
class=
"from-title flex-title"
>
<view
class=
"from-title-item"
>
<span
class=
"line-class"
></span>
巡检项目
</view>
<view
class=
"submit-class"
v-if=
" !allDisabled"
>
<button
size=
"mini"
type=
"primary"
class=
"submit-button"
:disabled=
"isDisabled"
@
tap=
"submit"
>
提交
</button>
</view>
</view>
<item-room
:itemData=
'tableData'
:isShow=
'isShow'
ref=
"itemRoom"
@
saveData=
'saveData'
@
save=
'isSave'
:disabled=
"allDisabled"
></item-room>
<view
class=
"btn-box"
v-if=
"!allDisabled"
>
<button
type=
"warn"
class=
"delBtn"
size=
"mini"
@
tap=
"delInsp"
>
删除
</button>
<button
type=
"primary"
class=
"saveBtn"
size=
"mini"
@
tap=
"saveInsp"
>
保存草稿
</button>
</view>
</view>
</view>
<uni-popup
ref=
"inputDialog"
background-color=
"#fff"
v-if=
"$store.state.oper_type == '新增'"
>
<view
class=
"popup-content"
>
<text
class=
"text"
>
返回后,系统自动生成巡检记录
</text>
</view>
<view
class=
"popup-content"
>
<button
class=
"dialog-btn"
type=
"primary"
size=
"mini"
@
tap=
"dialogInputConfirm"
>
知道了
</button>
</view>
</uni-popup>
<uni-popup
ref=
"inputDialog"
type=
"dialog"
v-else
>
<uni-popup-dialog
ref=
"inputClose"
mode=
"base"
title=
"未确认保存的数据,返回后自动保存."
@
confirm=
"dialogInputConfirm"
confirmText=
"确认"
>
</uni-popup-dialog>
</uni-popup>
<!-- 删除提示框 -->
<uni-popup
ref=
"inputDialog2"
type=
"dialog"
>
<uni-popup-dialog
ref=
"inputClose"
mode=
"base"
title=
"删除"
@
confirm=
"deleteConfirm"
>
<view
class=
"content-pop"
>
编号:
{{
popupTitle
.
number
}}
的
{{
showRoomName
(
popupTitle
.
room
)
}}{{
popupTitle
.
name
}}
,确认删除?
</view>
</uni-popup-dialog>
</uni-popup>
</view>
</
template
>
<
script
>
import
itemRoom
from
"@/components/inspDetail/itemRoom.vue"
import
allData
from
"../../components/inspDetail/data/allData.js"
import
getDateTime
from
"@/common/getdateTime.js"
export
default
{
components
:
{
itemRoom
},
data
()
{
return
{
rules
:
{
room
:
{
// name 字段的校验规则
rules
:
[
// 校验 name 不能为空
{
required
:
true
,
errorMessage
:
'请选择区域'
,
},
],
validateTrigger
:
'submit'
},
number
:
{
// number 字段的校验规则
rules
:
[
// 校验 number 不能为空
{
required
:
true
,
errorMessage
:
'请填写编号'
,
},
],
validateTrigger
:
'submit'
},
time
:
{
// number 字段的校验规则
rules
:
[
// 校验 number 不能为空
{
required
:
true
,
errorMessage
:
'请选择日期'
,
},
],
validateTrigger
:
'submit'
},
},
popupTitle
:
{
number
:
null
,
name
:
''
,
room
:
''
},
isDel
:
{},
isShow
:
false
,
baseFormData
:
{
// room: '5',
// number: null,
// time: ''
errorData
:
{}
},
roomRange
:
[{
text
:
'核密机房'
,
value
:
'1'
},
{
text
:
'普密机房'
,
value
:
'2'
},
{
text
:
'传输机房'
,
value
:
'3'
},
{
text
:
'机要值班室'
,
value
:
'4'
},
{
text
:
'UPS机房'
,
value
:
'5'
},
{
text
:
'省备份主机房'
,
value
:
'7'
},
{
text
:
'省备份传输机房'
,
value
:
'8'
},
{
text
:
'省备份UPS机房'
,
value
:
'9'
},
{
text
:
'其他区域'
,
value
:
'6'
}],
contentData
:
{
HMDSPDa
:
""
,
HMDSPDb
:
""
,
HMDSPDc
:
""
,
HMDSPDResult
:
"正常"
,
HMDSPDRemarks
:
""
,
HMDUPDa
:
""
,
HMDUPDb
:
""
,
HMDUPDc
:
""
,
HMDUPDResult
:
"正常"
,
HMDUPDRemarks
:
""
,
HMDSDLa
:
""
,
HMDSDLb
:
""
,
HMDSDLc
:
""
,
HMDSDLResult
:
"正常"
,
HMDSDLRemarks
:
""
,
HMDUDLa
:
""
,
HMDUDLb
:
""
,
HMDUDLc
:
""
,
HMDUDLResult
:
"正常"
,
HMDUDLRemarks
:
""
,
HMDZMDResult
:
"正常"
,
HMDZMDRemarks
:
""
,
HMDJGXResult
:
"正常"
,
HMDJGXRemarks
:
""
,
HMTKTResult
:
"正常"
,
HMTKTRemarks
:
""
,
HMTXFWind
:
""
,
HMTXFResult
:
"正常"
,
HMTXFRemarks
:
""
,
HMXQT1
:
""
,
HMXQTKg
:
""
,
HMXQTResult
:
"正常"
,
HMXQTRemarks
:
""
,
HMXSCY1
:
""
,
HMXSCY2
:
""
,
HMXSCY3
:
""
,
HMXSCYResult
:
"正常"
,
HMXSCYRemarks
:
""
,
HMXSCE1
:
""
,
HMXSCE2
:
""
,
HMXSCEResult
:
"正常"
,
HMXSCERemarks
:
""
,
HMXKZResult
:
"正常"
,
HMXKZRemarks
:
""
,
HMHWSJTemp
:
""
,
HMHWSJHumidity
:
""
,
HMHWSJResult
:
"正常"
,
HMHWSJRemarks
:
""
,
HMHCGQTemp
:
""
,
HMHCGQHumidity
:
""
,
HMHCGQResult
:
"正常"
,
HMHCGQRemarks
:
""
,
HMHKTResult
:
"正常"
,
HMHKTRemarks
:
""
,
HMHSDCa
:
""
,
HMHSDCb
:
""
,
HMHSDCc
:
""
,
HMHSDCResult
:
"正常"
,
HMHSDCRemarks
:
""
,
HMHUCJa
:
""
,
HMHUCJb
:
""
,
HMHUCJc
:
""
,
HMHUCJResult
:
"正常"
,
HMHUCJRemarks
:
""
,
HMATXResult
:
"正常"
,
HMATXRemarks
:
""
,
HMASPResult
:
"正常"
,
HMASPRemarks
:
""
,
HMAMJResult
:
"正常"
,
HMAMJRemarks
:
""
,
HMABBResult
:
"正常"
,
HMABBRemarks
:
""
,
HMPKHk
:
""
,
HMPKHkResult
:
"正常"
,
HMPKHkRemarks
:
""
,
HMPKHm
:
""
,
HMPKHmResult
:
"正常"
,
HMPKHmRemarks
:
""
,
HMPHPResult
:
"正常"
,
HMPHPRemarks
:
""
,
HMPNBQResult
:
"正常"
,
HMPNBQRemarks
:
""
,
HMPBDGResult
:
"正常"
,
HMPBDGRemarks
:
""
,
HMQResult
:
"正常"
,
HMQRemarks
:
""
,
// 普密机房
PMXSC1
:
""
,
PMXSC2
:
""
,
PMXSCResult
:
"正常"
,
PMXSCRemarks
:
""
,
PMARQResult
:
"正常"
,
PMARQRemarks
:
""
,
// cs机房
CSXQT1
:
""
,
CSXQTKg1
:
""
,
CSXQT2
:
""
,
CSXQTKg2
:
""
,
CSXQT3
:
""
,
CSXQTKg3
:
""
,
CSXQTResult
:
"正常"
,
CSXQTRemarks
:
""
,
CSXSCY1
:
""
,
CSXSCYResult
:
"正常"
,
CSXSCYRemarks
:
""
,
CSXSCE1
:
""
,
CSXSCEResult
:
"正常"
,
CSXSCERemarks
:
""
,
CSABJResult
:
"正常"
,
CSABJRemarks
:
""
,
// 机要值班室
JYDPJPResult
:
"正常"
,
JYDPJPRemarks
:
""
,
JYDSResult
:
"正常"
,
JYDSRemarks
:
""
,
JYDZMDResult
:
"正常"
,
JYDZMDRemarks
:
""
,
JYDCZResult
:
"正常"
,
JYDCZRemarks
:
""
,
JYTKTResult
:
"正常"
,
JYTKTRemarks
:
""
,
JYTXFResult
:
"正常"
,
JYTXFRemarks
:
""
,
JYXSC1
:
""
,
JYXSC2
:
""
,
JYXSCResult
:
"正常"
,
JYXSCRemarks
:
""
,
JYJJHJResult
:
"正常"
,
JYJJHJRemarks
:
""
,
JYJSPResult
:
"正常"
,
JYJSPRemarks
:
""
,
JYJGFResult
:
"正常"
,
JYJGFRemarks
:
""
,
JYATXDeviation
:
""
,
JYATXResult
:
"正常"
,
JYATXRemarks
:
""
,
JYASPResult
:
"正常"
,
JYASPRemarks
:
""
,
JYAMJDeviation
:
""
,
JYAMJResult
:
"正常"
,
JYAMJRemarks
:
""
,
JYARQResult
:
"正常"
,
JYARQRemarks
:
""
,
JYAKSResult
:
"正常"
,
JYAKSRemarks
:
""
,
JYHK
:
""
,
JYHC
:
""
,
JYHM
:
""
,
JYHY
:
""
,
JYHHK
:
""
,
JYHHC
:
""
,
JYHHM
:
""
,
JYHHY
:
""
,
// UPS机房
UPSDZJa1
:
""
,
UPSDZJb1
:
""
,
UPSDZJc1
:
""
,
UPSDZJResult1
:
"正常"
,
UPSDZJRemarks1
:
""
,
UPSDZJa2
:
""
,
UPSDZJb2
:
""
,
UPSDZJc2
:
""
,
UPSDZJResult2
:
"正常"
,
UPSDZJRemarks2
:
""
,
UPSXQ1
:
""
,
UPSXQKg1
:
""
,
UPSXQ2
:
""
,
UPSXQKg2
:
""
,
UPSXQResult
:
"正常"
,
UPSXQRemarks
:
""
,
UPSXSC1
:
""
,
UPSXSC2
:
""
,
UPSXSCResult
:
"正常"
,
UPSXSCRemarks
:
""
,
// 其他区域
OYJZMDResult
:
"正常"
,
OYJZMDRemarks
:
""
,
OYJKGResult
:
"正常"
,
OYJKGRemarks
:
""
,
OYJKTResult
:
"正常"
,
OYJKTRemarks
:
""
,
OKFZMDResult
:
"正常"
,
OKFZMDRemarks
:
""
,
OKFKGResult
:
"正常"
,
OKFKGRemarks
:
""
,
OKFRQResult
:
"正常"
,
OKFRQRemarks
:
""
,
OBBZMDResult
:
"正常"
,
OBBZMDRemarks
:
""
,
OBBKGResult
:
"正常"
,
OBBKGRemarks
:
""
,
OBBKTResult
:
"正常"
,
OBBKTRemarks
:
""
,
OBBEResult
:
"正常"
,
OBBERemarks
:
""
,
ODYZMDResult
:
"正常"
,
ODYZMDRemarks
:
""
,
ODYKGResult
:
"正常"
,
ODYKGRemarks
:
""
,
ODYTFResult
:
"正常"
,
ODYTFRemarks
:
""
,
ODYEResult
:
"正常"
,
ODYERemarks
:
""
,
ODYDYJResult
:
"正常"
,
ODYDYJRemarks
:
""
,
ODYSZJResult
:
"正常"
,
ODYSZJRemarks
:
""
,
OWSJResult
:
"正常"
,
OWSJRemarks
:
""
,
OXXSResult
:
"正常"
,
OXXSRemarks
:
""
,
printer
:
{
model
:
"奔图CP2510DN"
,
purpose
:
"主渠道收发"
,
state
:
"密"
,
inkBoxModel
:
"CTL350"
,
inkBoxk
:
""
,
inkBoxc
:
""
,
inkBoxm
:
""
,
inkBoxy
:
""
,
testPage
:
""
,
record
:
""
,
},
printerList
:
[{
model
:
""
,
purpose
:
""
,
state
:
""
,
inkBoxModel
:
""
,
inkBoxk
:
""
,
inkBoxc
:
""
,
inkBoxm
:
""
,
inkBoxy
:
""
,
testPage
:
""
,
record
:
""
},
{
model
:
""
,
purpose
:
""
,
state
:
""
,
inkBoxModel
:
""
,
inkBoxk
:
""
,
inkBoxc
:
""
,
inkBoxm
:
""
,
inkBoxy
:
""
,
testPage
:
""
,
record
:
""
},
{
model
:
""
,
purpose
:
""
,
state
:
""
,
inkBoxModel
:
""
,
inkBoxk
:
""
,
inkBoxc
:
""
,
inkBoxm
:
""
,
inkBoxy
:
""
,
testPage
:
""
,
record
:
""
},
],
},
tempData
:
{},
tableData
:
{},
allData
:
{},
flag
:
true
,
isDisabled
:
true
,
allDisabled
:
false
}
},
onBackPress
(
options
)
{
// 触发返回就会调用此方法,这里实现的是禁用物理返回,顶部导航栏的自定义返回 uni.navigateBack 仍可使用
if
(
options
.
from
==
'backbutton'
)
{
if
(
this
.
baseFormData
.
status
==
'已同步'
)
{
uni
.
navigateBack
()
}
else
{
if
(
!
this
.
isCom
)
{
this
.
$refs
.
inputDialog
.
open
()
}
else
{
uni
.
navigateBack
()
}
}
return
true
;
}
else
if
(
options
.
from
==
'navigateBack'
)
{
return
false
;
}
},
created
()
{
if
(
JSON
.
stringify
(
this
.
$store
.
state
.
temp_data
)
!==
'{}'
)
{
this
.
baseFormData
=
this
.
$store
.
state
.
temp_data
if
(
this
.
baseFormData
.
tempData
)
{
this
.
tableData
=
this
.
baseFormData
.
tempData
this
.
tempData
=
this
.
baseFormData
.
tempData
this
.
flag
=
false
}
if
(
this
.
baseFormData
.
content
){
this
.
contentData
=
this
.
baseFormData
.
content
}
}
if
(
this
.
$store
.
state
.
oper_type
==
'查看'
)
{
this
.
allDisabled
=
true
}
console
.
log
(
this
.
contentData
,
'看的数据'
);
this
.
allData
=
JSON
.
parse
(
JSON
.
stringify
(
allData
))
},
watch
:
{
"baseFormData.room"
:
{
handler
(
newV
,
oldV
)
{
if
(
newV
&&
this
.
flag
)
{
let
val
=
newV
switch
(
val
)
{
case
'1'
:
console
.
log
(
'核密机房'
);
this
.
tableData
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
allData
.
hmConfigData
));
break
;
case
'2'
:
console
.
log
(
'普密机房'
);
this
.
tableData
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
allData
.
pmConfigData
));
break
;
case
'3'
:
console
.
log
(
'传输机房'
);
this
.
tableData
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
allData
.
csConfigData
));
break
;
case
'4'
:
console
.
log
(
'JY机房'
);
this
.
tableData
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
allData
.
jyConfigData
));
break
;
case
'5'
:
console
.
log
(
'UPS机房'
);
this
.
tableData
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
allData
.
upsConfigData
));
break
;
case
'6'
:
console
.
log
(
'其他机房'
);
this
.
tableData
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
allData
.
otherConfigData
));
break
;
case
'7'
:
console
.
log
(
'生备份主机房'
);
this
.
tableData
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
allData
.
equiConfigData
));
break
;
case
'8'
:
console
.
log
(
'省备份传输机房'
);
this
.
tableData
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
allData
.
sbfCsConfigData
));
break
;
case
'9'
:
console
.
log
(
'省备份UPS机房'
);
this
.
tableData
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
allData
.
sbfUpsConfigData
));
break
;
}
this
.
tempData
=
this
.
tableData
// console.log('监听触发');
}
},
deep
:
true
,
immediate
:
true
}
},
methods
:
{
showRoomName
(
val
)
{
let
res
=
""
;
switch
(
val
)
{
case
"1"
:
res
=
"核密机房"
;
break
;
case
"2"
:
res
=
"普密机房"
;
break
;
case
"3"
:
res
=
"传输机房"
;
break
;
case
"4"
:
res
=
"机要值班室"
;
break
;
case
"5"
:
res
=
"UPS机房"
;
break
;
case
"6"
:
res
=
"其他区域"
;
break
;
case
"7"
:
res
=
"省备份主机房"
;
break
;
case
"8"
:
res
=
"省备份传输机房"
;
break
;
case
"9"
:
res
=
"省备份UPS机房"
;
break
;
}
return
res
;
},
roomChange
(
e
)
{
this
.
flag
=
true
this
.
$nextTick
(()
=>
{
// console.log('改变触发');
this
.
tempData
=
this
.
tableData
this
.
saveTempData
()
})
uni
.
showLoading
({
title
:
'加载中'
,
mask
:
true
});
setTimeout
(()
=>
{
uni
.
hideLoading
()
},
1000
)
},
isSave
(
val
)
{
this
.
isDisabled
=
!
val
},
dialogInputConfirm
()
{
this
.
saveInsp
()
// uni.navigateBack()
uni
.
navigateBack
()
},
back
(
val
)
{
if
(
val
.
status
==
'已同步'
)
{
uni
.
navigateBack
()
}
else
{
if
(
this
.
isDisabled
)
{
this
.
$refs
.
inputDialog
.
open
()
}
else
{
uni
.
navigateBack
()
}
}
},
delInsp
()
{
this
.
$refs
.
inputDialog2
.
open
()
this
.
isDel
=
this
.
baseFormData
this
.
popupTitle
.
number
=
this
.
baseFormData
.
number
this
.
popupTitle
.
room
=
this
.
baseFormData
.
room
this
.
popupTitle
.
name
=
'巡检记录'
},
deleteConfirm
()
{
this
.
$store
.
state
.
all_data
.
map
((
item
,
index
)
=>
{
if
(
item
.
uid
==
this
.
isDel
.
uid
)
{
console
.
log
(
'删除'
);
this
.
$store
.
commit
(
'DEL_DATA'
,
index
)
// this.$store.state.all_data.splice(index, 1)
let
timeStr
=
getDateTime
.
dateTimeStr
(
'y-m-d h:i'
)
let
operData
=
{
name
:
this
.
$store
.
state
.
now_user
.
name
,
level
:
'秘密'
,
user
:
this
.
$store
.
state
.
now_user
.
user
,
module
:
'巡检'
,
detail
:
this
.
showRoomName
(
item
.
room
)
+
'巡检记录'
+
'('
+
item
.
number
+
')'
,
type
:
'删除'
,
time
:
timeStr
}
this
.
$store
.
state
.
oper_record
.
unshift
(
operData
)
uni
.
showToast
({
title
:
'删除成功'
,
icon
:
'none'
,
duration
:
2000
})
}
})
uni
.
navigateBack
()
},
saveInsp
()
{
this
.
$refs
.
itemRoom
.
saveData
()
},
collapseChange
()
{
this
.
isShow
=
!
this
.
isShow
},
saveTempData
()
{
this
.
baseFormData
.
tempData
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
tempData
))
// console.log(this.baseFormData, '切换后的数据');
this
.
$store
.
state
.
all_data
.
map
((
item
,
index
)
=>
{
if
(
this
.
baseFormData
.
uid
==
item
.
uid
)
{
this
.
$store
.
state
.
all_data
.
splice
(
index
,
1
,
this
.
baseFormData
)
}
})
},
saveData
(
data
,
tempData
)
{
let
arr
=
tempData
[
Object
.
keys
(
tempData
)[
0
]]
this
.
baseFormData
.
errorData
[
Object
.
keys
(
tempData
)[
0
]]
=
this
.
baseFormData
.
errorData
[
Object
.
keys
(
tempData
)[
0
]]
?
this
.
baseFormData
.
errorData
[
Object
.
keys
(
tempData
)[
0
]]
:
[],
this
.
baseFormData
.
abnormality
=
this
.
baseFormData
.
abnormality
?
this
.
baseFormData
.
abnormality
:
'无异常'
arr
.
map
(
item
=>
{
if
(
item
[
item
[
'resKey'
]]
==
'异常'
||
item
[
item
[
'resKey2'
]]
==
'异常'
)
{
let
isExist
=
this
.
baseFormData
.
errorData
[
Object
.
keys
(
tempData
)[
0
]].
some
(
obj
=>
obj
.
content
==
item
.
content
);
//判断当前异常项是否已经添加
if
(
!
isExist
)
{
item
.
handlerState
=
'已处理'
//初始化字段
item
.
handlerDesc
=
''
item
.
handlerPerson
=
''
item
.
handlerDate
=
''
this
.
baseFormData
.
errorData
[
Object
.
keys
(
tempData
)[
0
]].
push
(
item
)
}
else
{
console
.
log
(
'对象已经存在'
);
}
this
.
baseFormData
.
abnormality
=
'有异常'
this
.
baseFormData
.
status
=
'编辑中'
//有异常的状态下都为编辑中
}
})
console
.
log
(
this
.
contentData
,
'this.contentDatathis.contentData'
);
this
.
contentData
=
{
...
this
.
contentData
,
...
data
}
this
.
tempData
=
{
...
this
.
tempData
,
...
tempData
}
this
.
baseFormData
.
content
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
contentData
))
this
.
baseFormData
.
tempData
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
tempData
))
this
.
baseFormData
.
errorData
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
baseFormData
.
errorData
))
console
.
log
(
this
.
baseFormData
,
'this.baseFormData'
);
if
(
this
.
baseFormData
.
uid
)
{
this
.
$store
.
state
.
all_data
.
map
((
item
,
index
)
=>
{
if
(
this
.
baseFormData
.
uid
==
item
.
uid
)
{
this
.
$store
.
state
.
all_data
.
splice
(
index
,
1
,
this
.
baseFormData
)
//每保存一项内容就保存到缓存
}
})
uni
.
showToast
({
title
:
'保存成功'
,
icon
:
'none'
,
duration
:
2000
})
}
},
submit
()
{
this
.
$refs
.
baseForm
.
validate
().
then
(
res
=>
{
if
(
this
.
baseFormData
.
abnormality
==
'有异常'
)
{
this
.
baseFormData
.
status
=
'编辑中'
//有异常状态始终为编辑中
}
else
{
this
.
baseFormData
.
status
=
'待同步'
}
this
.
baseFormData
.
isSub
=
true
this
.
$store
.
state
.
all_data
.
map
((
item
,
index
)
=>
{
if
(
this
.
baseFormData
.
uid
==
item
.
uid
)
{
this
.
$store
.
state
.
all_data
.
splice
(
index
,
1
,
this
.
baseFormData
)
}
})
uni
.
showToast
({
title
:
'保存成功'
,
icon
:
'none'
,
duration
:
2000
})
if
(
this
.
$store
.
state
.
oper_type
==
'新增'
)
{
uni
.
redirectTo
({
url
:
"/pages/inspection/inspection"
})
}
else
if
(
this
.
$store
.
state
.
oper_type
==
'编辑'
)
{
uni
.
navigateBack
()
}
}).
catch
(
err
=>
{
uni
.
showToast
({
title
:
'请检查基本信息填写情况'
,
icon
:
'none'
,
duration
:
2000
})
})
},
lookTable
(
val
)
{
this
.
$store
.
commit
(
'SET_ROOM'
,
val
)
uni
.
navigateTo
({
url
:
"/pages/inspection/sampleTable"
})
}
}
}
</
script
>
<
style
lang=
"less"
scoped
>
.popup-content {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: center;
padding: 15px;
height: 50px;
background-color: #fff;
}
.dialog-btn {
background-color: #5474e8;
}
.submit-class {
.submit-button {
background-color: #5474e8;
box-shadow: 0px 3px 6px 0px rgba(84, 116, 232, 0.16);
}
}
.container {
width: 100%;
height: 100%;
.content {
width: 100%;
height: calc(100% - 44px - var(--status-bar-height));
background-image: linear-gradient(0deg, #f3f6fa 0%, rgba(130, 153, 238, 0.73) 49%, #5474e8 100%);
background-size: 100% 40rpx;
background-repeat: no-repeat;
padding: 20px;
padding-top: 0;
.from-title {
display: flex;
align-items: center;
// justify-content: space-between;
font-size: 18px !important;
margin-bottom: 10px;
.line-class {
display: inline-block;
width: 2px;
height: 18px;
background-color: #5474e8;
margin-right: 5px;
}
.from-title-item {
display: flex;
align-items: center;
}
.center-class {
position: absolute;
left: 50%;
transform: translate(-50%);
color: #778ca2;
}
}
.flex-title {
justify-content: space-between;
}
.info-box {
width: 100%;
// height: 112px;
padding: 10px;
padding-bottom: 2px;
background-color: #ffffff;
position: relative;
.collapse-box-icon {
position: absolute;
right: 10px;
top: 10px;
width: 14px;
height: 14px;
// background-color: red;
image {
width: 100%;
height: 100%;
}
}
}
.detail-box {
width: 100%;
height:480px;
padding: 10px;
background-color: #ffffff;
margin-top: 20px;
position: relative;
background-color: #ffffff;
box-shadow: 0px 0px 6px 0px rgba(84, 116, 232, 0.16);
border-radius: 10px 10px 0 0;
// will-change: max-height;
// max-height: 0;
// transition: height 0.5s ease;
.btn-box {
width: 984px;
height: 60px;
border-radius: 0 0 10px 10px;
position: fixed;
left: 20px;
bottom: 10px;
background-color: #ffffff;
// border: 1px solid red;
display: flex;
align-items: center;
button {
width: 130px;
height: 40px;
line-height: 40px;
box-shadow: 0px 3px 6px 0px rgba(84, 116, 232, 0.16);
}
.saveBtn {
// width: ;
background-color: #5474e8;
// border-radius: 10px;
}
}
}
}
}
</
style
>
\ No newline at end of file
pages/inspection/inspProcess.vue
deleted
100644 → 0
浏览文件 @
f61c28db
<
template
>
<view
class=
"container"
>
<!-- 导航栏 -->
<uni-nav-bar
dark
:fixed=
"true"
background-color=
"#5474e8"
status-bar
title=
"杭州内网监管在线"
left-icon=
"left"
left-text=
"返回"
@
clickLeft=
"back(baseFormData)"
/>
<view
class=
"content"
>
<!-- 基本信息 -->
<view
class=
"info-box box-shaow-box"
>
<view
class=
"from-title"
>
<view
class=
"from-title-item"
>
<span
class=
"line-class"
></span>
例行巡检异常项处理
</view>
<view
class=
"center-class"
v-show=
"!isShow"
>
巡检区域:
<span
style=
"color: #f34545;"
>
{{
showRoomName
(
baseFormData
.
room
)
}}
</span>
</view>
</view>
<view
class=
"collapse-box-icon"
@
tap=
"collapseChange"
>
<image
src=
"../../static/img/upArrow.png"
mode=
""
v-show=
"!isShow"
></image>
<image
src=
"../../static/img/downArrow.png"
mode=
""
v-show=
"isShow"
></image>
</view>
<uni-forms
v-show=
"isShow"
ref=
"baseForm"
:modelValue=
"baseFormData"
label-width=
"100px"
label-align=
"right"
>
<uni-row
class=
"demo-uni-row"
>
<uni-col
:span=
"8"
>
<uni-forms-item
label=
"巡检区域:"
>
<span
style=
"color: #f34545;"
>
{{
showRoomName
(
baseFormData
.
room
)
}}
</span>
</uni-forms-item>
</uni-col>
<uni-col
:span=
"8"
style=
"padding: 0 5px;"
>
<uni-forms-item
label=
"编号:"
>
{{
baseFormData
.
number
}}
</uni-forms-item>
</uni-col>
<uni-col
:span=
"8"
>
<uni-forms-item
label=
"巡检日期:"
>
<span>
{{
baseFormData
.
time
}}
</span>
</uni-forms-item>
</uni-col>
</uni-row>
</uni-forms>
</view>
<!-- 巡检项目 -->
<view
class=
"detail-box "
>
<view
class=
"from-title flex-title"
>
<view
class=
"from-title-item"
>
<span
class=
"line-class"
></span>
巡检项目异常项
<span
class=
"num_class"
>
{{
num
}}
项异常
</span>
</view>
<view
class=
"submit-class"
>
<button
size=
"mini"
type=
"primary"
class=
"submit-button"
:disabled=
"isDisabled"
@
tap=
"submit"
>
提交
</button>
</view>
</view>
<room
:rdata=
'tableData'
:isShow=
'isShow'
ref=
"itemRoom"
@
retrunData=
'retrunData'
@
save=
'isSave'
></room>
<view
class=
"btn-box"
>
<button
type=
"primary"
class=
"saveBtn"
size=
"mini"
@
tap=
"saveInsp"
>
保存草稿
</button>
</view>
</view>
</view>
</view>
</
template
>
<
script
>
import
allData
from
"../../components/inspDetail/data/allData.js"
import
room
from
"../../components/inspAbnormal/room.vue"
import
getDateTime
from
"@/common/getdateTime.js"
export
default
{
components
:
{
room
},
data
()
{
return
{
isShow
:
false
,
baseFormData
:
{
// room: '5',
// number: null,
// time: ''
},
tableData
:
{},
isDisabled
:
true
,
allDisabled
:
false
,
num
:
0
}
},
created
()
{
if
(
JSON
.
stringify
(
this
.
$store
.
state
.
temp_data
)
!==
'{}'
)
{
this
.
baseFormData
=
this
.
$store
.
state
.
temp_data
this
.
$store
.
commit
(
'SET_STARTTIME'
,
this
.
baseFormData
.
time
)
if
(
this
.
baseFormData
.
errorData
)
{
let
obj
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
baseFormData
.
errorData
))
for
(
let
key
in
obj
){
if
(
obj
[
key
].
length
==
0
){
delete
obj
[
key
]
}
}
this
.
tableData
=
obj
for
(
let
key
in
this
.
tableData
)
{
this
.
num
+=
1
}
}
}
},
methods
:
{
showRoomName
(
val
)
{
let
res
=
""
;
switch
(
val
)
{
case
"1"
:
res
=
"核密机房"
;
break
;
case
"2"
:
res
=
"普密机房"
;
break
;
case
"3"
:
res
=
"传输机房"
;
break
;
case
"4"
:
res
=
"机要值班室"
;
break
;
case
"5"
:
res
=
"UPS机房"
;
break
;
case
"6"
:
res
=
"其他区域"
;
break
;
case
"7"
:
res
=
"省备份主机房"
;
break
;
case
"8"
:
res
=
"省备份传输机房"
;
break
;
case
"9"
:
res
=
"省备份UPS机房"
;
break
;
}
return
res
;
},
isSave
(
val
)
{
this
.
isDisabled
=
!
val
},
dialogInputConfirm
()
{
// uni.navigateBack()
uni
.
navigateBack
()
},
back
()
{
uni
.
navigateBack
()
},
// 点击保存草稿
saveInsp
()
{
// console.log(this.$refs.itemRoom,'this.$refs.itemRoom');
this
.
$refs
.
itemRoom
.
saveData
()
},
// 子孙组件将编辑好的数据返回,进行保存
retrunData
(
val
)
{
console
.
log
(
val
);
this
.
baseFormData
.
errorData
=
val
this
.
$store
.
state
.
all_data
.
map
((
item
,
index
)
=>
{
if
(
this
.
baseFormData
.
uid
==
item
.
uid
)
{
this
.
$store
.
state
.
all_data
.
splice
(
index
,
1
,
this
.
baseFormData
)
}
})
uni
.
showToast
({
title
:
'保存成功'
,
icon
:
'none'
,
duration
:
2000
})
},
// 展开收起基本信息
collapseChange
()
{
this
.
isShow
=
!
this
.
isShow
},
// 点击提交
submit
()
{
let
timeStr
=
getDateTime
.
dateTimeStr
(
'y-m-d h:i:s'
)
let
obj
=
this
.
baseFormData
.
errorData
const
isValueExist
=
(
obj
,
value
)
=>
{
// 遍历对象的属性值(数组)
for
(
const
arr
of
Object
.
values
(
obj
))
{
// 使用some方法判断数组中是否包含目标值
if
(
arr
.
some
(
item
=>
item
.
handlerState
===
value
))
{
return
true
;
}
}
return
false
;
};
if
(
isValueExist
(
obj
,
'未处理'
)){
this
.
baseFormData
.
abnormality
=
'有异常'
this
.
baseFormData
.
status
=
'编辑中'
}
else
{
this
.
baseFormData
.
abnormality
=
'已处理'
if
(
this
.
baseFormData
.
isSub
){
this
.
baseFormData
.
status
=
'待同步'
}
}
this
.
baseFormData
.
submissionTime
=
timeStr
this
.
$store
.
state
.
all_data
.
map
((
item
,
index
)
=>
{
if
(
this
.
baseFormData
.
uid
==
item
.
uid
)
{
this
.
$store
.
state
.
all_data
.
splice
(
index
,
1
,
this
.
baseFormData
)
}
})
uni
.
showToast
({
title
:
'提交成功'
,
icon
:
'none'
,
duration
:
2000
,
success
()
{
uni
.
navigateBack
()
}
})
},
}
}
</
script
>
<
style
lang=
"less"
scoped
>
.num_class {
display: inline-block;
padding: 2px 13px;
color: #ff6161;
background-color: rgba(255, 97, 97, 0.16);
margin-left: 4px;
}
.uni-forms-item {
align-items: center;
}
.popup-content {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: center;
padding: 15px;
height: 50px;
background-color: #fff;
}
.dialog-btn {
background-color: #5474e8;
}
.submit-class {
.submit-button {
background-color: #5474e8;
box-shadow: 0px 3px 6px 0px rgba(84, 116, 232, 0.16);
}
}
.container {
width: 100%;
height: 100%;
.content {
width: 100%;
height: calc(100% - 44px - var(--status-bar-height));
background-image: linear-gradient(0deg, #f3f6fa 0%, rgba(130, 153, 238, 0.73) 49%, #5474e8 100%);
background-size: 100% 40rpx;
background-repeat: no-repeat;
padding: 20px;
padding-top: 0;
.from-title {
display: flex;
align-items: center;
// justify-content: space-between;
font-size: 18px !important;
margin-bottom: 10px;
.line-class {
display: inline-block;
width: 2px;
height: 18px;
background-color: #5474e8;
margin-right: 5px;
}
.from-title-item {
display: flex;
align-items: center;
}
.center-class {
position: absolute;
left: 50%;
transform: translate(-50%);
color: #778ca2;
}
}
.flex-title {
justify-content: space-between;
}
.info-box {
width: 100%;
// height: 112px;
padding: 10px;
padding-bottom: 2px;
background-color: #ffffff;
position: relative;
transition: height 0.5s;
.collapse-box-icon {
position: absolute;
right: 10px;
top: 10px;
width: 14px;
height: 14px;
// background-color: red;
image {
width: 100%;
height: 100%;
}
}
}
.detail-box {
width: 100%;
padding: 10px;
background-color: #ffffff;
margin-top: 20px;
position: relative;
background-color: #ffffff;
box-shadow: 0px 0px 6px 0px rgba(84, 116, 232, 0.16);
border-radius: 10px 10px 0 0;
.btn-box {
width: 984px;
height: 60px;
border-radius: 0 0 10px 10px;
position: fixed;
left: 20px;
bottom: 10px;
background-color: #ffffff;
// border: 1px solid red;
display: flex;
align-items: center;
.saveBtn {
// width: ;
width: 130px;
height: 40px;
line-height: 40px;
background-color: #5474e8;
box-shadow: 0px 3px 6px 0px rgba(84, 116, 232, 0.16);
// border-radius: 10px;
}
}
}
}
}
</
style
>
\ No newline at end of file
pages/inspection/inspection.vue
deleted
100644 → 0
浏览文件 @
f61c28db
<
template
>
<view
class=
"container"
>
<!-- 导航栏 -->
<uni-nav-bar
dark
:fixed=
"true"
background-color=
"#5474e8"
status-bar
title=
"杭州内网监管在线"
/>
<view
class=
"content"
>
<!-- 标签页 -->
<myTabs></myTabs>
<!-- 搜索区域 -->
<view
class=
"search-box"
>
<view
class=
"search-box-item"
style=
"flex: 1"
>
<view
class=
"text"
>
区域:
</view>
<uni-data-checkbox
mode=
"tag"
v-model=
"searchForm.room"
:localdata=
"roomList"
@
change=
"selectChange"
></uni-data-checkbox>
</view>
<view
style=
"display: flex;"
>
<view
class=
"search-box-item"
>
<view
class=
"text"
>
类型:
</view>
<uni-data-checkbox
mode=
"tag"
v-model=
"searchForm.type"
:localdata=
"typeList"
@
change=
"selectChange"
></uni-data-checkbox>
</view>
<view
class=
"search-box-item"
style=
"flex: 1"
>
<view
class=
"text"
>
异常项:
</view>
<uni-data-checkbox
mode=
"tag"
multiple
v-model=
"searchForm.abnormality"
:localdata=
"stateList"
@
change=
"selectChange"
></uni-data-checkbox>
</view>
</view>
<view
class=
"search-box-item"
style=
"width: 100%;"
>
<view
class=
"text"
>
时间:
</view>
<time-select
@
change=
"timeChange"
></time-select>
</view>
</view>
<!-- 主要内容卡片视图 -->
<view
class=
"card-main"
>
<view
class=
"card-main-custom"
>
<!-- 查询结果 -->
<view
class=
"search-result"
>
<span
class=
"search-result-text"
>
查询结果:
</span>
<span
class=
"search-result-number"
>
{{
listData
.
length
}}
条
</span>
</view>
<!-- 开始按钮 -->
<view
class=
"begin-button"
@
tap=
"toInsp"
>
<span>
开始巡检
</span>
<uni-icons
type=
"right"
color=
"#5474e8"
></uni-icons>
</view>
</view>
<view
class=
"card-box"
>
<view
class=
"card-item-box"
v-for=
"(v,i) in timeList"
:key=
"i"
>
<span
class=
"time-tip"
>
{{
v
.
time
}}
</span>
<view
class=
"card-flex-box"
>
<view
class=
"card"
v-for=
"(item,index) in v.listData"
:key=
"index"
>
<!-- 信息区域 -->
<view
class=
"card-top"
>
<view
class=
"card-title"
>
{{
item
.
time
}}
<span
class=
"status_tips"
v-if=
"item.abnormality == '有异常'"
>
{{
item
.
abnormality
}}
</span>
<span
class=
"status_tips status_finish"
v-if=
"item.abnormality == '已处理'"
>
{{
item
.
abnormality
}}
</span>
</view>
<view
class=
"card-item"
>
<span
class=
"card-item-title"
>
记录:
</span>
{{
showRoomName
(
item
.
room
)
}}
巡检记录
</view>
<view
class=
"card-item"
>
<span
class=
"card-item-title"
>
编号:
</span>
{{
item
.
number
}}
</view>
</view>
<!-- 按钮区域 -->
<view
class=
"card-bottom"
>
<!--
<view
class=
"card-bottom-btn-del card-bottom-btn"
@
tap=
"delInsp(item)"
v-if=
"item.status !== '已同步'"
>
删除
</view>
-->
<view
class=
"card-bottom-btn-edit card-bottom-btn"
@
tap=
"clickEdit(item)"
v-if=
"item.status !== '已同步'"
>
编辑
</view>
<view
class=
"card-bottom-btn-del card-bottom-btn"
@
tap=
"process(item)"
v-if=
"(item.abnormality == '有异常' || item.abnormality == '已处理') && item.status !== '已同步'"
>
处理
</view>
<view
class=
"card-bottom-btn-look card-bottom-btn"
v-if=
"item.status == '已同步'"
@
tap=
"clickLook(item)"
>
查看
</view>
</view>
<!-- 标签 -->
<view
class=
"card-label"
:class=
"item.status == '已同步' ? 'synced-label' : item.status == '编辑中' ? 'edit-label' : ''"
>
{{
item
.
status
}}
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<!-- 删除提示框 -->
<uni-popup
ref=
"inputDialog"
type=
"dialog"
>
<uni-popup-dialog
ref=
"inputClose"
mode=
"base"
title=
"删除"
@
confirm=
"dialogInputConfirm"
>
<view
class=
"content-pop"
>
编号:
{{
popupTitle
.
number
}}
的
{{
showRoomName
(
popupTitle
.
room
)
}}{{
popupTitle
.
name
}}
,确认删除?
</view>
</uni-popup-dialog>
</uni-popup>
</view>
</
template
>
<
script
>
import
myTabs
from
"components/myTabs/myTabs.vue"
import
timeSelect
from
"@/components/global/timeSelect.vue"
import
getDateTime
from
"@/common/getdateTime.js"
export
default
{
components
:
{
myTabs
,
timeSelect
},
data
()
{
return
{
popupTitle
:
{
number
:
null
,
name
:
''
,
room
:
''
},
num
:
0
,
searchForm
:
{
type
:
''
,
room
:
''
,
abnormality
:
''
,
startTime
:
''
,
endTime
:
''
,
},
typeList
:
[{
text
:
'全部'
,
value
:
''
},
{
text
:
'编辑中'
,
value
:
'编辑中'
},
{
text
:
'待同步'
,
value
:
'待同步'
},
{
text
:
'已同步'
,
value
:
'已同步'
}],
stateList
:
[{
text
:
'未处理'
,
value
:
'有异常'
},
{
text
:
'已处理'
,
value
:
'已处理'
},
],
roomList
:
[{
text
:
'全部'
,
value
:
''
},
{
text
:
'核密机房'
,
value
:
'1'
},
{
text
:
'普密机房'
,
value
:
'2'
},
{
text
:
'传输机房'
,
value
:
'3'
},
{
text
:
'机要值班室'
,
value
:
'4'
},
{
text
:
'UPS机房'
,
value
:
'5'
},
{
text
:
'省备份主机房'
,
value
:
'7'
},
{
text
:
'省备份传输机房'
,
value
:
'8'
},
{
text
:
'省备份UPS机房'
,
value
:
'9'
},
{
text
:
'其他区域'
,
value
:
'6'
}],
savedFilePath
:
null
,
test
:
[],
inspData
:
[{
room
:
'6'
,
status
:
'已同步'
,
time
:
'2023-4-12'
,
number
:
123123
}],
listData
:
[],
isDel
:
{},
backButtonPress
:
0
,
timeList
:
[]
}
},
// 定义返回退出
onBackPress
(
options
)
{
this
.
backButtonPress
++
;
if
(
this
.
backButtonPress
>
1
)
{
uni
.
setStorageSync
(
'oper_record'
,
this
.
$store
.
state
.
oper_record
)
uni
.
setStorageSync
(
'all_data'
,
this
.
$store
.
state
.
all_data
)
uni
.
setStorageSync
(
'now_user'
,
this
.
$store
.
state
.
now_user
);
uni
.
setStorageSync
(
'last_time'
,
this
.
$store
.
state
.
last_time
);
plus
.
runtime
.
quit
();
}
else
{
plus
.
nativeUI
.
toast
(
'再划一次退出应用'
);
}
setTimeout
(
function
()
{
this
.
backButtonPress
=
0
;
},
1000
);
return
true
;
},
onShow
()
{
this
.
getData
()
uni
.
showLoading
({
title
:
'加载中'
,
mask
:
true
});
setTimeout
(()
=>
{
uni
.
hideLoading
()
},
1000
)
},
methods
:
{
clickLook
(
val
)
{
uni
.
showLoading
({
title
:
'加载中'
,
mask
:
true
});
this
.
$store
.
commit
(
'SET_TYPE'
,
'查看'
)
this
.
$store
.
commit
(
'SET_TEMP_DATA'
,
val
)
uni
.
navigateTo
({
url
:
"/pages/inspection/inspDetail"
,
success
()
{
uni
.
hideLoading
()
},
fail
(
err
)
{
console
.
log
(
err
);
}
})
},
clickEdit
(
val
)
{
uni
.
showLoading
({
title
:
'加载中'
,
mask
:
true
});
this
.
$store
.
commit
(
'SET_TYPE'
,
'编辑'
)
this
.
$store
.
commit
(
'SET_TEMP_DATA'
,
val
)
let
timeStr
=
getDateTime
.
dateTimeStr
(
'y-m-d h:i'
)
let
operData
=
{
name
:
this
.
$store
.
state
.
now_user
.
name
,
level
:
'秘密'
,
user
:
this
.
$store
.
state
.
now_user
.
user
,
module
:
'巡检'
,
detail
:
this
.
showRoomName
(
val
.
room
)
+
'巡检记录'
+
'('
+
val
.
number
+
')'
,
type
:
this
.
$store
.
state
.
oper_type
,
time
:
timeStr
}
this
.
$store
.
state
.
oper_record
.
unshift
(
operData
)
//保存新编辑记录
uni
.
navigateTo
({
url
:
"/pages/inspection/inspDetail"
,
success
()
{
uni
.
hideLoading
()
}
})
},
process
(
item
)
{
this
.
$store
.
commit
(
'SET_TEMP_DATA'
,
item
)
uni
.
navigateTo
({
url
:
"/pages/inspection/inspProcess"
,
success
(
res
)
{
uni
.
hideLoading
()
},
})
},
delInsp
(
item
)
{
this
.
$refs
.
inputDialog
.
open
()
this
.
isDel
=
item
this
.
popupTitle
.
number
=
item
.
number
this
.
popupTitle
.
room
=
item
.
room
this
.
popupTitle
.
name
=
'巡检记录'
},
dialogInputConfirm
()
{
this
.
$store
.
state
.
all_data
.
map
((
item
,
index
)
=>
{
if
(
item
.
uid
==
this
.
isDel
.
uid
)
{
this
.
$store
.
commit
(
'DEL_DATA'
,
index
)
// this.$store.state.all_data.splice(index, 1)
let
timeStr
=
getDateTime
.
dateTimeStr
(
'y-m-d h:i'
)
let
operData
=
{
name
:
this
.
$store
.
state
.
now_user
.
name
,
level
:
'秘密'
,
user
:
this
.
$store
.
state
.
now_user
.
user
,
module
:
'巡检'
,
detail
:
this
.
showRoomName
(
item
.
room
)
+
'巡检记录'
+
'('
+
item
.
number
+
')'
,
type
:
'删除'
,
time
:
timeStr
}
this
.
$store
.
state
.
oper_record
.
unshift
(
operData
)
uni
.
showToast
({
title
:
'删除成功'
,
icon
:
'none'
,
duration
:
2000
})
}
})
this
.
getData
()
},
showRoomName
(
val
)
{
let
res
=
""
;
switch
(
val
)
{
case
"1"
:
res
=
"核密机房"
;
break
;
case
"2"
:
res
=
"普密机房"
;
break
;
case
"3"
:
res
=
"传输机房"
;
break
;
case
"4"
:
res
=
"机要值班室"
;
break
;
case
"5"
:
res
=
"UPS机房"
;
break
;
case
"6"
:
res
=
"其他区域"
;
break
;
case
"7"
:
res
=
"省备份主机房"
;
break
;
case
"8"
:
res
=
"省备份传输机房"
;
break
;
case
"9"
:
res
=
"省备份UPS机房"
;
break
;
}
return
res
;
},
toInsp
()
{
this
.
$store
.
commit
(
'SET_TYPE'
,
'新增'
)
this
.
$store
.
commit
(
'SET_TEMP_DATA'
,
{})
uni
.
navigateTo
({
url
:
"/pages/inspection/inspFirst"
,
success
(
res
)
{
console
.
log
(
res
);
},
fail
(
err
)
{
console
.
log
(
err
);
}
})
},
timeChange
(
val
)
{
this
.
searchForm
.
startTime
=
val
.
startTime
this
.
searchForm
.
endTime
=
val
.
endTime
this
.
selectChange
()
},
selectChange
()
{
const
{
type
,
room
,
abnormality
,
startTime
,
endTime
}
=
this
.
searchForm
this
.
listData
=
this
.
inspData
.
filter
(
item
=>
{
let
matchType
=
true
;
// 类型筛选
let
matchRoom
=
true
;
// 区域筛选
let
matchTime
=
true
;
// 时间筛选
let
matchState
=
true
;
// 状态筛选
if
(
type
)
{
matchType
=
item
.
status
==
type
}
if
(
room
)
{
matchRoom
=
item
.
room
==
room
}
if
(
abnormality
.
length
>
0
)
{
matchState
=
abnormality
.
indexOf
(
item
.
abnormality
)
>
-
1
}
if
(
startTime
&&
endTime
)
{
matchTime
=
Date
.
parse
(
item
.
time
)
<=
Date
.
parse
(
endTime
)
&&
Date
.
parse
(
item
.
time
)
>=
Date
.
parse
(
startTime
)
}
return
matchType
&&
matchRoom
&&
matchTime
&&
matchState
})
let
arr
=
[]
this
.
listData
.
map
(
item
=>
{
let
mouth
=
item
.
time
.
split
(
'-'
)[
1
].
slice
(
0
,
1
)
==
'0'
?
item
.
time
.
split
(
'-'
)[
1
].
substring
(
1
)
:
item
.
time
.
split
(
'-'
)[
1
]
let
time
=
item
.
time
.
split
(
'-'
)[
0
]
+
'年'
+
mouth
+
'月'
let
index
=
arr
.
findIndex
(
item
=>
{
return
item
.
time
==
time
})
if
(
index
!==
-
1
)
{
arr
[
index
].
listData
.
push
(
item
)
arr
[
index
].
listData
=
arr
[
index
].
listData
.
sort
((
a
,
b
)
=>
b
.
time
.
localeCompare
(
a
.
time
))
}
else
{
arr
.
push
({
time
:
time
,
listData
:
[
item
]
})
}
})
this
.
timeList
=
arr
.
sort
((
a
,
b
)
=>
b
.
time
.
localeCompare
(
a
.
time
))
},
getData
()
{
const
value
=
this
.
$store
.
state
.
all_data
;
let
arr
=
[]
if
(
value
)
{
if
(
this
.
$store
.
state
.
now_user
.
permission
!==
1
)
{
value
.
map
(
item
=>
{
if
(
item
.
type
==
'1'
&&
item
.
oid
==
this
.
$store
.
state
.
now_user
.
areaName
)
{
arr
.
push
(
item
)
}
})
}
else
{
value
.
map
(
item
=>
{
if
(
item
.
type
==
'1'
)
{
arr
.
push
(
item
)
}
})
}
arr
.
sort
((
a
,
b
)
=>
{
return
a
.
creatTime
<
b
.
creatTime
?
1
:
-
1
})
let
arr1
=
arr
.
filter
(
item
=>
item
.
status
==
'编辑中'
)
let
arr2
=
arr
.
filter
(
item
=>
item
.
status
==
'待同步'
)
let
arr3
=
arr
.
filter
(
item
=>
item
.
status
==
'已同步'
)
this
.
inspData
=
[...
arr1
,
...
arr2
,
...
arr3
]
}
this
.
selectChange
()
}
}
}
</
script
>
<
style
scoped
lang=
"less"
>
.status_tips {
display: inline-block;
width: 56px;
height: 22px;
background-color: rgba(226, 79, 81, 0.1);
border-radius: 12px;
border: solid 1px #e24f51;
text-align: center;
font-size: 10.59rpx;
color: #e24f51;
margin-left: 16px;
}
.status_finish {
color: #5474e8;
background-color: rgba(84, 116, 232, 0.12);
border: solid 1px #5474e8;
}
.container {
width: 100%;
height: 100%;
.content {
width: 100%;
background-image: linear-gradient(0deg, #f3f6fa 0%, rgba(130, 153, 238, 0.73) 49%, #5474e8 100%);
background-size: 100% 40rpx;
background-repeat: no-repeat;
}
}
.search-box {
width: 715rpx;
// height: 68px;
background-color: #ffffff;
margin: 0 auto;
box-shadow: 0px 2px 4px 0px rgba(84, 116, 232, 0.16);
border-radius: 16px;
margin-top: 2.35rpx;
font-size: 9.41rpx;
color: #778ca2;
display: flex;
justify-content: space-between;
flex-wrap: wrap;
padding: 14.12rpx 10rpx 16.47rpx 20rpx;
.search-box-item {
display: flex;
align-items: center;
position: relative;
/deep/.time-content .time-input {
left: 280rpx;
}
}
.text {
margin-right: 5.88rpx;
}
}
.card-main {
width: 726.5rpx;
height: 244rpx;
background-color: #ffffff;
margin: 0 auto;
margin-top: 11.76rpx;
box-shadow: 0px 0px 6px 0px rgba(84, 116, 232, 0.16);
border-radius: 10px;
.card-main-custom {
width: 100%;
height: 28rpx;
// padding: 0 40px 0 30px;
padding: 0 23.53rpx 0 17.65rpx;
// background-color: #4061d5;
background-color: rgba(64, 97, 213, 0.06);
box-shadow: 0px 0px 4px 0px rgba(84, 116, 232, 0.16);
border-radius: 10px 10px 0px 0px;
display: flex;
justify-content: space-between;
align-items: center;
.search-result {
font-size: 11.76rpx;
.search-result-text {
color: rgba(119, 140, 162, .7);
margin-right: 5px;
}
.search-result-number {
color: #32343b;
}
}
.begin-button {
color: #5474e8;
}
}
.card-box {
width: 100%;
height: calc(100% - 28rpx);
overflow: hidden;
overflow-y: auto;
.card-item-box {
width: 100%;
padding-top: 11.76rpx;
.time-tip {
color: #ffffff;
padding: 3px 11px 5px 10px;
background-color: #5474e8;
box-shadow: 0px 3px 6px 0px rgba(84, 116, 232, 0.16);
border-radius: 0px 16px 16px 0px;
opacity: 0.7;
}
.card-flex-box {
width: 100%;
padding: 0 17.5rpx;
padding-top: 20px;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
}
.card-flex-box::after {
content: "";
width: 219rpx;
height: 0;
visibility: hidden;
}
}
.card {
width: 219rpx;
height: 92rpx;
background-color: #ffffff;
box-shadow: 0px 1px 12px 0px rgba(84, 116, 232, 0.2);
border-radius: 2px;
border: solid 1px rgba(119, 140, 162, 0.3);
margin-bottom: 17.65rpx;
position: relative;
font-size: 9.41rpx;
.card-top {
width: 100%;
height: 70rpx;
color: #3a3c4b;
// padding: 10px 0 0 20px;
padding: 11.76rpx;
.card-title {
width: 160rpx;
font-size: 10.59rpx;
font-family: AlibabaPuHuiTi-Medium;
margin-bottom: 5.88rpx;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.card-item {
margin-bottom: 5.88rpx;
}
.card-item-title {
color: #778ca2;
margin-right: 5.88rpx;
}
}
.card-label {
width: 52.94rpx;
height: 20rpx;
// width: 90px;
// height: 34px;
line-height: 20rpx;
background-color: #ffae4e;
border-radius: 16px 0px 0px 16px;
color: #ffffff;
text-align: center;
position: absolute;
right: 0;
top: 9.41rpx;
}
.synced-label {
background-color: rgba(119, 140, 162, 0.3);
}
.edit-label {
background-color: #5474e8;
}
.card-bottom {
// border-radius: 2px;
width: 100%;
height: calc(100% - 70rpx);
display: flex;
// background-color:#36d;
.card-bottom-btn {
text-align: center;
line-height: 22rpx;
}
.card-bottom-btn-del {
width: 50%;
height: 100%;
color: #e24f51;
background-color: rgba(226, 79, 81, 0.12);
}
.card-bottom-btn-look {
flex: 1;
height: 100%;
color: #5474e8;
background-color: rgba(84, 116, 232, 0.12);
}
.card-bottom-btn-edit {
flex: 1;
height: 100%;
color: #5474e8;
background-color: rgba(84, 116, 232, 0.12);
position: relative;
.border-left {
display: inline-block;
width: 1px;
height: 20px;
background-color: rgba(84, 116, 232, 0.25);
position: absolute;
left: 0;
top: 50%;
transform: translate(0, -50%);
}
}
}
}
}
}
</
style
>
\ No newline at end of file
pages/inspection/lookInsp.vue
deleted
100644 → 0
浏览文件 @
f61c28db
<
template
>
<view
class=
"container"
>
<!-- 导航栏 -->
<uni-nav-bar
dark
:fixed=
"true"
background-color=
"#5474e8"
status-bar
title=
"杭州内网监管在线"
left-icon=
"left"
left-text=
"返回"
right-text=
"查看样表"
@
clickLeft=
"back"
@
clickRight=
"lookTable(baseFormData.room)"
/>
<view
class=
"content"
>
<!-- 基本信息 -->
<view
class=
"info-box box-shaow-box"
>
<view
class=
"from-title"
>
<view
class=
"from-title-item"
>
<span
class=
"line-class"
></span>
基本信息
</view>
<view
class=
"center-class"
v-show=
"!isShow"
>
巡检区域:
<span
style=
"color: #ff0000;"
>
{{
showRoomName
(
baseFormData
.
room
)
}}
</span>
</view>
</view>
<view
class=
"collapse-box-icon"
@
tap=
"collapseChange"
>
<image
src=
"../../static/img/upArrow.png"
mode=
""
v-show=
"!isShow"
></image>
<image
src=
"../../static/img/downArrow.png"
mode=
""
v-show=
"isShow"
></image>
</view>
<uni-forms
v-show=
"isShow"
ref=
"baseForm"
:modelValue=
"baseFormData"
label-width=
"100px"
label-align=
"right"
>
<uni-row
class=
"demo-uni-row"
>
<uni-col
:span=
"8"
>
<uni-forms-item
label=
"选择区域:"
>
<uni-data-select
:disabled=
"allDisabled"
v-model=
"baseFormData.room"
:localdata=
"roomRange"
:clear=
"false"
>
</uni-data-select>
</uni-forms-item>
</uni-col>
<uni-col
:span=
"8"
style=
"padding: 0 5px;"
>
<uni-forms-item
label=
"编号:"
>
<uni-easyinput
:disabled=
"allDisabled"
maxlength=
"50"
v-model=
"baseFormData.number"
/>
</uni-forms-item>
</uni-col>
<uni-col
:span=
"8"
>
<uni-forms-item
label=
"巡检日期:"
>
<uni-datetime-picker
:disabled=
"allDisabled"
type=
"date"
:clear-icon=
"false"
v-model=
"baseFormData.time"
/>
</uni-forms-item>
</uni-col>
</uni-row>
</uni-forms>
</view>
<!-- 巡检项目 -->
<view
class=
"detail-box "
>
<view
class=
"from-title flex-title"
>
<view
class=
"from-title-item"
>
<span
class=
"line-class"
></span>
巡检项目
</view>
</view>
<hm-table
v-if=
"baseFormData.room == '1'"
ref=
"hmTable"
:isShow=
'isShow'
@
save=
"isSave"
:listData=
"tableData"
:disabled=
"allDisabled"
></hm-table>
<pm-table
v-if=
"baseFormData.room == '2'"
ref=
"pmTable"
:isShow=
'isShow'
@
save=
"isSave"
:listData=
"tableData"
:disabled=
"allDisabled"
></pm-table>
<cs-table
v-if=
"baseFormData.room == '3'"
ref=
"csTable"
:isShow=
'isShow'
@
save=
"isSave"
:listData=
"tableData"
:disabled=
"allDisabled"
></cs-table>
<jy-table
v-if=
"baseFormData.room == '4'"
ref=
"jyTable"
:isShow=
'isShow'
@
save=
"isSave"
:listData=
"tableData"
:disabled=
"allDisabled"
></jy-table>
<ups-table
v-if=
"baseFormData.room == '5'"
ref=
"upsTable"
:isShow=
'isShow'
@
save=
"isSave"
:listData=
"tableData"
:disabled=
"allDisabled"
></ups-table>
<other-table
v-if=
"baseFormData.room == '6'"
ref=
"otherTable"
:isShow=
'isShow'
@
save=
"isSave"
:listData=
"tableData"
:disabled=
"allDisabled"
></other-table>
</view>
</view>
</view>
</
template
>
<
script
>
import
hmTable
from
"../../components/inspDetail/hmRoom/hmTable.vue"
import
pmTable
from
"../../components/inspDetail/pmRoom/pmTable.vue"
import
csTable
from
"../../components/inspDetail/csRoom/csTable.vue"
import
jyTable
from
"../../components/inspDetail/jyRoom/jyTable.vue"
import
upsTable
from
"../../components/inspDetail/upsRoom/upsTable.vue"
import
otherTable
from
"../../components/inspDetail/otherRoom/otherTable.vue"
import
allData
from
"../../components/inspDetail/data/allData.js"
export
default
{
components
:
{
hmTable
,
pmTable
,
csTable
,
jyTable
,
upsTable
,
otherTable
},
data
()
{
return
{
isShow
:
false
,
baseFormData
:
{
// room: '5',
// number: null,
// time: ''
},
roomRange
:
[{
text
:
'核密机房'
,
value
:
'1'
},
{
text
:
'普密机房'
,
value
:
'2'
},
{
text
:
'传输机房'
,
value
:
'3'
},
{
text
:
'机要值班室'
,
value
:
'4'
},
{
text
:
'UPS机房'
,
value
:
'5'
},
{
text
:
'其他区域'
,
value
:
'6'
}],
contentData
:
{},
tempData
:
{},
tableData
:
{},
allData
:
{},
flag
:
true
,
isDisabled
:
true
,
allDisabled
:
false
}
},
created
()
{
if
(
JSON
.
stringify
(
this
.
$store
.
state
.
temp_data
)
!==
'{}'
)
{
this
.
baseFormData
=
this
.
$store
.
state
.
temp_data
// console.log(this.baseFormData.tempData, '當前暫存的數據');
if
(
this
.
baseFormData
.
tempData
)
{
this
.
tableData
=
this
.
baseFormData
.
tempData
this
.
tempData
=
this
.
baseFormData
.
tempData
this
.
flag
=
false
}
}
if
(
this
.
$store
.
state
.
oper_type
==
'查看'
)
{
this
.
allDisabled
=
true
}
this
.
allData
=
JSON
.
parse
(
JSON
.
stringify
(
allData
))
},
methods
:
{
showRoomName
(
val
)
{
let
res
=
""
;
switch
(
val
)
{
case
"1"
:
res
=
"核密机房"
;
break
;
case
"2"
:
res
=
"普密机房"
;
break
;
case
"3"
:
res
=
"传输机房"
;
break
;
case
"4"
:
res
=
"机要值班室"
;
break
;
case
"5"
:
res
=
"UPS机房"
;
break
;
case
"6"
:
res
=
"其他区域"
;
break
;
}
return
res
;
},
isSave
(
val
)
{
this
.
isDisabled
=
!
val
},
back
()
{
uni
.
navigateBack
()
},
collapseChange
()
{
this
.
isShow
=
!
this
.
isShow
},
lookTable
(
val
)
{
this
.
$store
.
commit
(
'SET_ROOM'
,
val
)
uni
.
navigateTo
({
url
:
"/pages/inspection/sampleTable"
})
}
}
}
</
script
>
<
style
lang=
"less"
scoped
>
.popup-content {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: center;
padding: 15px;
height: 50px;
background-color: #fff;
}
.submit-class {
.submit-button {
background-color: #5474e8;
box-shadow: 0px 3px 6px 0px rgba(84, 116, 232, 0.16);
}
}
.container {
width: 100%;
height: 100%;
.content {
width: 100%;
height: calc(100% - 44px - var(--status-bar-height));
background-image: linear-gradient(0deg, #f3f6fa 0%, rgba(130, 153, 238, 0.73) 49%, #5474e8 100%);
background-size: 100% 40rpx;
background-repeat: no-repeat;
padding: 20px;
padding-top: 0;
.from-title {
display: flex;
align-items: center;
// justify-content: space-between;
font-size: 18px !important;
margin-bottom: 10px;
.line-class {
display: inline-block;
width: 2px;
height: 18px;
background-color: #5474e8;
margin-right: 5px;
}
.from-title-item {
display: flex;
align-items: center;
}
.center-class {
position: absolute;
left: 50%;
transform: translate(-50%);
color: #778ca2;
}
}
.flex-title {
justify-content: space-between;
}
.info-box {
width: 100%;
// height: 112px;
padding: 10px;
padding-bottom: 2px;
background-color: #ffffff;
position: relative;
.collapse-box-icon {
position: absolute;
right: 10px;
top: 10px;
width: 14px;
height: 14px;
// background-color: red;
image {
width: 100%;
height: 100%;
}
}
}
.detail-box {
width: 100%;
padding: 10px;
background-color: #ffffff;
margin-top: 20px;
position: relative;
background-color: #ffffff;
box-shadow: 0px 0px 6px 0px rgba(84, 116, 232, 0.16);
border-radius: 10px 10px 0 0;
.btn-box {
width: 984px;
height: 60px;
border-radius: 0 0 10px 10px;
position: fixed;
left: 20px;
bottom: 10px;
background-color: #ffffff;
// border: 1px solid red;
display: flex;
align-items: center;
.saveBtn {
background-color: #5474e8;
box-shadow: 0px 3px 6px 0px rgba(84, 116, 232, 0.16);
// border-radius: 10px;
}
}
}
}
}
</
style
>
\ No newline at end of file
pages/inspection/sampleTable.vue
deleted
100644 → 0
浏览文件 @
f61c28db
<
template
>
<view
class=
"content"
>
<uni-nav-bar
dark
:fixed=
"true"
background-color=
"#5474e8"
status-bar
left-icon=
"left"
left-text=
"返回"
@
clickLeft=
"back"
title=
"杭州内网监管在线"
/>
<view
class=
"main"
>
<view
class=
"container box-shaow-box"
>
<view
class=
"image-item "
>
<image
src=
"../../static/img/insp-table/hm.png"
mode=
"widthFix"
v-if=
"room == '1'"
></image>
<image
src=
"../../static/img/insp-table/pm.png"
mode=
"widthFix"
v-if=
"room == '2'"
></image>
<image
src=
"../../static/img/insp-table/cs.png"
mode=
"widthFix"
v-if=
"room == '3'"
></image>
<image
src=
"../../static/img/insp-table/jy.png"
mode=
"widthFix"
v-if=
"room == '4'"
></image>
<image
src=
"../../static/img/insp-table/ups.png"
mode=
"widthFix"
v-if=
"room == '5'"
></image>
<image
src=
"../../static/img/insp-table/other.png"
mode=
"widthFix"
v-if=
"room == '6'"
></image>
<image
src=
"../../static/img/insp-table/sbf.png"
mode=
"widthFix"
v-if=
"room == '7'"
></image>
<image
src=
"../../static/img/insp-table/sbfcs.png"
mode=
"widthFix"
v-if=
"room == '8'"
></image>
<image
src=
"../../static/img/insp-table/sbfups.png"
mode=
"widthFix"
v-if=
"room == '9'"
></image>
</view>
</view>
</view>
</view>
</
template
>
<
script
>
export
default
{
data
(){
return
{
room
:
null
,
}
},
created
()
{
this
.
room
=
this
.
$store
.
state
.
roomNum
},
methods
:
{
back
()
{
uni
.
navigateBack
()
}
}
}
</
script
>
<
style
lang=
"less"
scoped
>
.content {
width: 100%;
height: 100%;
.main {
width: 100%;
// background-color: red;
background-image: linear-gradient(0deg, #f3f6fa 0%, rgba(130, 153, 238, 0.73) 49%, #5474e8 100%);
background-size: 100% 40rpx;
background-repeat: no-repeat;
.container {
margin: 0 auto;
width: 730rpx;
height: 400rpx;
padding: 17.65rpx;
padding-bottom: 0;
// width: 341.18rpx;
overflow: hidden;
overflow: auto;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
.image-item {
width: 682rpx;
height: 930rpx;
background-color: #ffffff;
box-shadow: 0px 0px 9.41rpx 0px rgba(84, 116, 232, 0.2);
border-radius: 4px;
margin-bottom: 11.76rpx;
}
image {
width: 100%;
// object-fit: contain;
}
}
}
}
</
style
>
pages/inspectionPage/inspectionPage.vue
deleted
100644 → 0
浏览文件 @
f61c28db
<
template
>
<view>
新巡检页
</view>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
}
},
methods
:
{
}
}
</
script
>
<
style
>
</
style
>
pages/repair/repair.vue
deleted
100644 → 0
浏览文件 @
f61c28db
<
template
>
<view
class=
""
>
<uni-nav-bar
dark
:fixed=
"true"
background-color=
"#5474e8"
status-bar
title=
"杭州内网监管在线"
/>
<view
class=
"content"
>
<myTabs></myTabs>
<!-- 搜索区域 -->
<view
class=
"search-box"
>
<view
class=
"search-box-item"
>
<view
class=
"text"
>
同步:
</view>
<uni-data-checkbox
mode=
"tag"
v-model=
"searchForm.type"
:localdata=
"typeList"
@
change=
"selectChange"
>
</uni-data-checkbox>
</view>
<view
class=
"search-box-item"
>
<view
class=
"text"
>
时间:
</view>
<time-select
@
change=
"timeChange"
></time-select>
</view>
</view>
<!-- 主要内容卡片视图 -->
<view
class=
"card-main"
>
<view
class=
"card-main-custom"
>
<!-- 查询结果 -->
<view
class=
"search-result"
>
<span
class=
"search-result-text"
>
查询结果:
</span>
<span
class=
"search-result-number"
>
{{
listData
.
length
}}
条
</span>
</view>
<!-- 开始按钮 -->
<view
class=
"begin-button"
@
click=
"addRepair"
>
<span>
报修记录
</span>
<uni-icons
type=
"right"
color=
"#5474e8"
></uni-icons>
</view>
</view>
<view
class=
"card-box"
>
<view
class=
"card-item-box"
v-for=
"(v,i) in timeList"
:key=
"i"
>
<span
class=
"time-tip"
>
{{
v
.
time
}}
</span>
<view
class=
"card-flex-box"
>
<view
class=
"card"
v-for=
"(item,index) in v.listData"
:key=
"index"
>
<!-- 信息区域 -->
<view
class=
"card-top"
>
<view
class=
"card-title"
>
<span>
{{
item
.
time
.
slice
(
0
,
11
)
}}
</span>
</view>
<view
class=
"card-item"
>
<span
class=
"card-item-title"
>
记录:
</span>
<span
v-if=
"item.type == '2'"
>
报修记录
</span>
</view>
<view
class=
"card-item card-item-number"
>
<span
class=
"card-item-title"
>
编号:
</span>
{{
item
.
number
}}
</view>
</view>
<!-- 按钮区域 -->
<view
class=
"card-bottom"
>
<!--
<view
class=
"card-bottom-btn-del card-bottom-btn"
v-if=
"item.status !== '已同步'"
@
tap=
"delReport(item)"
>
删除
</view>
-->
<view
class=
"card-bottom-btn-edit card-bottom-btn"
v-if=
"item.status !== '已同步'"
@
tap=
"clickEdit(item)"
>
编辑
</view>
<view
class=
"card-bottom-btn-look card-bottom-btn"
v-if=
"item.status == '已同步'"
@
tap=
"clickShow(item)"
>
查看
</view>
</view>
<!-- 标签 -->
<view
class=
"card-label"
:class=
"item.status == '已同步' ? 'synced-label' : ''"
>
{{
item
.
status
}}
</view>
</view>
</view>
</view>
</view>
</view>
<!-- 标签页 -->
<!-- 删除弹窗 -->
<uni-popup
ref=
"inputDialog"
type=
"dialog"
>
<uni-popup-dialog
ref=
"inputClose"
mode=
"base"
title=
"删除"
@
confirm=
"dialogInputConfirm"
>
<view
class=
"content-pop"
>
编号:
{{
popupTitle
.
number
}}
的
{{
popupTitle
.
name
}}
,确认删除?
</view>
</uni-popup-dialog>
</uni-popup>
</view>
</view>
</
template
>
<
script
>
import
myTabs
from
"components/myTabs/myTabs.vue"
import
getDateTime
from
"@/common/getdateTime.js"
import
timeSelect
from
"@/components/global/timeSelect.vue"
export
default
{
components
:
{
myTabs
,
timeSelect
},
data
()
{
return
{
isDel
:
{},
allDataList
:
[],
repairData
:
[],
listData
:
[],
startTime
:
''
,
endTime
:
''
,
time
:
0
,
typeList
:
[{
text
:
'全部'
,
value
:
''
},
{
text
:
'待同步'
,
value
:
'待同步'
},
{
text
:
'已同步'
,
value
:
'已同步'
}],
savedFilePath
:
null
,
searchForm
:
{
type
:
''
,
startTime
:
''
,
endTime
:
''
,
},
backButtonPress
:
0
,
popupTitle
:
{
number
:
null
,
name
:
""
},
timeList
:
[]
}
},
onShow
()
{
this
.
getData
()
uni
.
showLoading
({
title
:
'加载中'
,
mask
:
true
});
setTimeout
(()
=>
{
uni
.
hideLoading
()
},
1000
)
},
// 定义返回退出
onBackPress
(
options
)
{
this
.
backButtonPress
++
;
if
(
this
.
backButtonPress
>
1
)
{
uni
.
setStorageSync
(
'oper_record'
,
this
.
$store
.
state
.
oper_record
)
uni
.
setStorageSync
(
'all_data'
,
this
.
$store
.
state
.
all_data
)
uni
.
setStorageSync
(
'now_user'
,
this
.
$store
.
state
.
now_user
);
uni
.
setStorageSync
(
'last_time'
,
this
.
$store
.
state
.
last_time
);
plus
.
runtime
.
quit
();
}
else
{
plus
.
nativeUI
.
toast
(
'再划一次退出应用'
);
}
setTimeout
(
function
()
{
this
.
backButtonPress
=
0
;
},
1000
);
return
true
;
},
methods
:
{
selectChange
()
{
const
{
type
,
startTime
,
endTime
}
=
this
.
searchForm
this
.
listData
=
this
.
repairData
.
filter
(
item
=>
{
let
matchType
=
true
;
// 类型筛选
let
matchTime
=
true
;
// 时间筛选
if
(
type
)
{
matchType
=
item
.
status
==
type
}
if
(
startTime
&&
endTime
)
{
matchTime
=
Date
.
parse
(
item
.
time
)
<=
Date
.
parse
(
endTime
)
&&
Date
.
parse
(
item
.
time
)
>=
Date
.
parse
(
startTime
)
}
return
matchType
&&
matchTime
})
let
arr
=
[]
this
.
listData
.
map
(
item
=>
{
let
mouth
=
item
.
time
.
split
(
'-'
)[
1
].
slice
(
0
,
1
)
==
'0'
?
item
.
time
.
split
(
'-'
)[
1
].
substring
(
1
)
:
item
.
time
.
split
(
'-'
)[
1
]
let
time
=
item
.
time
.
split
(
'-'
)[
0
]
+
'年'
+
mouth
+
'月'
let
index
=
arr
.
findIndex
(
item
=>
{
return
item
.
time
==
time
})
if
(
index
!==
-
1
)
{
arr
[
index
].
listData
.
push
(
item
)
arr
[
index
].
listData
=
arr
[
index
].
listData
.
sort
((
a
,
b
)
=>
b
.
time
.
localeCompare
(
a
.
time
))
}
else
{
arr
.
push
({
time
:
time
,
listData
:
[
item
]
})
}
})
this
.
timeList
=
arr
.
sort
((
a
,
b
)
=>
b
.
time
.
localeCompare
(
a
.
time
))
},
timeChange
(
val
)
{
this
.
searchForm
.
startTime
=
val
.
startTime
this
.
searchForm
.
endTime
=
val
.
endTime
this
.
selectChange
()
},
addRepair
()
{
this
.
$store
.
commit
(
'SET_TYPE'
,
'新增'
)
//将状态设置
this
.
$store
.
commit
(
'SET_TEMP_DATA'
,
{})
//清空
uni
.
navigateTo
({
url
:
"/pages/repair/repairDetail"
,
})
},
delReport
(
item
)
{
this
.
$refs
.
inputDialog
.
open
()
this
.
isDel
=
item
this
.
popupTitle
.
number
=
item
.
number
this
.
popupTitle
.
name
=
'报修记录'
},
dialogInputConfirm
()
{
this
.
$store
.
state
.
all_data
.
map
((
item
,
index
)
=>
{
if
(
item
.
uid
==
this
.
isDel
.
uid
)
{
console
.
log
(
'删除'
);
this
.
$store
.
commit
(
'DEL_DATA'
,
index
)
let
timeStr
=
getDateTime
.
dateTimeStr
(
'y-m-d h:i'
)
let
operData
=
{
name
:
this
.
$store
.
state
.
now_user
.
name
,
level
:
'秘密'
,
user
:
this
.
$store
.
state
.
now_user
.
user
,
module
:
'报修'
,
detail
:
'报修记录'
+
'('
+
item
.
number
+
')'
,
type
:
'删除'
,
time
:
timeStr
}
this
.
$store
.
state
.
oper_record
.
unshift
(
operData
)
uni
.
showToast
({
title
:
'删除成功'
,
icon
:
'none'
,
duration
:
2000
})
}
})
this
.
getData
()
},
getData
()
{
const
value
=
this
.
$store
.
state
.
all_data
;
let
arr
=
[]
if
(
value
)
{
if
(
this
.
$store
.
state
.
now_user
.
permission
!==
1
)
{
value
.
map
(
item
=>
{
if
(
item
.
type
==
'2'
&&
item
.
oid
==
this
.
$store
.
state
.
now_user
.
areaName
)
{
arr
.
push
(
item
)
}
})
}
else
{
value
.
map
(
item
=>
{
if
(
item
.
type
==
'2'
)
{
arr
.
push
(
item
)
}
})
}
arr
.
sort
((
a
,
b
)
=>
{
return
a
.
creatTime
<
b
.
creatTime
?
1
:
-
1
})
let
arr2
=
arr
.
filter
(
item
=>
item
.
status
==
'待同步'
)
let
arr3
=
arr
.
filter
(
item
=>
item
.
status
==
'已同步'
)
this
.
repairData
=
[...
arr2
,
...
arr3
]
}
this
.
selectChange
()
},
clickEdit
(
val
)
{
this
.
$store
.
commit
(
'SET_TYPE'
,
'编辑'
)
this
.
$store
.
commit
(
'SET_TEMP_DATA'
,
val
)
let
timeStr
=
getDateTime
.
dateTimeStr
(
'y-m-d h:i'
)
let
operData
=
{
name
:
this
.
$store
.
state
.
now_user
.
name
,
level
:
'秘密'
,
user
:
this
.
$store
.
state
.
now_user
.
user
,
module
:
'报修'
,
detail
:
'报修记录'
+
'('
+
val
.
number
+
')'
,
type
:
this
.
$store
.
state
.
oper_type
,
time
:
timeStr
,
}
this
.
$store
.
state
.
oper_record
.
unshift
(
operData
)
//保存新编辑记录
uni
.
navigateTo
({
url
:
"/pages/repair/repairDetail"
})
},
clickShow
(
val
)
{
this
.
$store
.
commit
(
'SET_TEMP_DATA'
,
val
)
uni
.
navigateTo
({
url
:
"/pages/repair/showRapair"
})
}
}
}
</
script
>
<
style
scoped
lang=
"less"
>
.content {
width: 100%;
// height: calc(100vh - 44px);
background-image: linear-gradient(0deg, #f3f6fa 0%, rgba(130, 153, 238, 0.73) 49%, #5474e8 100%);
background-size: 100% 40rpx;
background-repeat: no-repeat;
}
.search-box {
width: 715rpx;
// height: 68px;
background-color: #ffffff;
margin: 0 auto;
box-shadow: 0px 2px 4px 0px rgba(84, 116, 232, 0.16);
border-radius: 16px;
margin-top: 2.35rpx;
padding: 14.12rpx 0 16.47rpx 20rpx;
// padding-left: 34px;
.search-box-item {
// margin-bottom: 15px;
position: relative;
display: flex;
align-items: center;
.text {
font-size: 9.41rpx;
color: #778ca2;
margin-right: 5.88rpx;
}
.time-input {
position: absolute;
top: 0;
left: 244.12rpx;
}
}
}
.card-main {
width: 726.5rpx;
// height: 320rpx;
height: 270rpx;
background-color: #ffffff;
margin: 0 auto;
margin-top: 20px;
box-shadow: 0px 0px 6px 0px rgba(84, 116, 232, 0.16);
border-radius: 10px;
.card-main-custom {
width: 100%;
height: 48px;
padding: 0 40px 0 30px;
// background-color: #4061d5;
background-color: rgba(64, 97, 213, 0.06);
box-shadow: 0px 0px 4px 0px rgba(84, 116, 232, 0.16);
border-radius: 10px 10px 0px 0px;
display: flex;
justify-content: space-between;
align-items: center;
.search-result {
.search-result-text {
color: rgba(119, 140, 162, .7);
margin-right: 5px;
}
.search-result-number {
color: #32343b;
}
}
.begin-button {
color: #5474e8;
}
}
.card-box {
width: 100%;
height: calc(100% - 48px);
overflow: hidden;
overflow-y: auto;
.card-item-box {
width: 100%;
padding-top: 11.76rpx;
.time-tip {
color: #ffffff;
padding: 3px 11px 5px 10px;
background-color: #5474e8;
box-shadow: 0px 3px 6px 0px rgba(84, 116, 232, 0.16);
border-radius: 0px 16px 16px 0px;
opacity: 0.7;
}
.card-flex-box {
width: 100%;
padding: 0 17.5rpx;
padding-top: 20px;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
}
.card-flex-box::after {
content: "";
width: 219rpx;
height: 0;
visibility: hidden;
}
}
.card {
width: 219rpx;
height: 92rpx;
background-color: ;
background-color: #ffffff;
box-shadow: 0px 1px 12px 0px rgba(84, 116, 232, 0.2);
border-radius: 2px;
border: solid 1px rgba(119, 140, 162, 0.3);
margin-bottom: 17.65rpx;
position: relative;
font-size: 9.41rpx;
.card-top {
width: 100%;
height: 70rpx;
color: #3a3c4b;
padding: 11.76rpx;
.card-title {
font-size: 10.59rpx;
margin-bottom: 5.88rpx;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
width: 160rpx;
span {
font-family: AlibabaPuHuiTi-Medium;
}
}
.card-item {
margin-bottom: 5.88rpx;
}
.card-item-number {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.card-item-title {
color: #778ca2;
margin-bottom: 5.88rpx;
margin-right: 4.71rpx;
}
}
.card-label {
width: 52.94rpx;
height: 20rpx;
line-height: 20rpx;
background-color: #ffae4e;
border-radius: 16px 0px 0px 16px;
color: #ffffff;
text-align: center;
position: absolute;
right: 0;
top: 9.41rpx;
}
.synced-label {
background-color: rgba(119, 140, 162, 0.3);
}
.card-bottom {
// border-radius: 2px;
width: 100%;
height: calc(100% - 70rpx);
display: flex;
// background-color:#36d;
.card-bottom-btn {
text-align: center;
line-height: 22rpx;
}
.card-bottom-btn-del {
width: 50%;
height: 100%;
color: #e24f51;
background-color: rgba(226, 79, 81, 0.12);
}
.card-bottom-btn-look {
flex: 1;
height: 100%;
color: #5474e8;
background-color: rgba(84, 116, 232, 0.12);
}
.card-bottom-btn-edit {
flex: 1;
height: 100%;
color: #5474e8;
background-color: rgba(84, 116, 232, 0.12);
position: relative;
}
}
}
}
}
</
style
>
\ No newline at end of file
pages/repair/repairDetail - 副本.vue
deleted
100644 → 0
浏览文件 @
f61c28db
<
template
>
<view
class=
"container"
>
<uni-nav-bar
dark
left-icon=
"left"
left-text=
"返回"
:fixed=
"true"
background-color=
"#5474e8"
status-bar
title=
"杭州内网监管在线"
rightText=
"查看样表"
@
clickLeft=
"back"
@
clickRight=
"lookTable"
/>
<view
class=
"section"
>
<view
class=
"content"
>
<view
class=
"title"
>
<span>
报修信息
</span>
</view>
<view
class=
"formConetnt"
>
<uni-forms
:modelValue=
"repirForm"
labelWidth=
"110px"
:rules=
"rules"
ref=
"forms"
>
<uni-row>
<uni-col
:span=
"10"
>
<uni-forms-item
label=
"CASE NO:"
required
name=
"caseNo"
>
<uni-easyinput
:maxlength=
"50"
v-model=
"repirForm.caseNo"
placeholder=
"请输入"
></uni-easyinput>
</uni-forms-item>
</uni-col>
<uni-col
:span=
"10"
:offset=
"2"
>
<uni-forms-item
label=
"编号:"
required
name=
"number"
>
<uni-easyinput
:maxlength=
"50"
v-model=
"repirForm.number"
placeholder=
"请输入"
></uni-easyinput>
</uni-forms-item>
</uni-col>
</uni-row>
<uni-row>
<uni-col
:span=
"10"
>
<uni-forms-item
label=
"用户姓名:"
required
name=
"userName"
>
<uni-easyinput
:maxlength=
"50"
v-model=
"repirForm.userName"
placeholder=
"请输入"
></uni-easyinput>
</uni-forms-item>
</uni-col>
<uni-col
:span=
"10"
:offset=
"2"
>
<uni-forms-item
label=
"工程师姓名:"
name=
"engineerName"
required
>
<uni-easyinput
:maxlength=
"50"
v-model=
"repirForm.engineerName"
placeholder=
"请输入"
></uni-easyinput>
</uni-forms-item>
</uni-col>
</uni-row>
<uni-row>
<uni-col
:span=
"10"
>
<uni-forms-item
label=
"到场时间:"
required
name=
"arriveTime"
>
<uni-datetime-picker
type=
'date'
v-model=
"repirForm.arriveTime"
/>
</uni-forms-item>
</uni-col>
<uni-col
:span=
"10"
:offset=
"2"
>
<uni-forms-item
label=
"离场时间:"
required
name=
"leaveTime"
>
<uni-datetime-picker
type=
'date'
v-model=
"repirForm.leaveTime"
/>
</uni-forms-item>
</uni-col>
</uni-row>
<uni-row>
<uni-forms-item
label=
"服务类型:"
required
name=
"type"
>
<uni-data-checkbox
mode=
"tag"
v-model=
"repirForm.type"
:localdata=
"dateList"
multiple
@
change=
"typeChange"
>
</uni-data-checkbox>
</uni-forms-item>
</uni-row>
<uni-row>
<uni-forms-item
label=
"服务内容:"
required
name=
"content"
>
<!--
<uni-easyinput
v-show=
"!repirForm.content"
></uni-easyinput>
-->
<uni-easyinput
v-for=
"(item,index) in tempArr"
:key=
"index"
v-model=
"tempArr[index].value"
:clearable=
"false"
style=
"margin-bottom: 5px;"
></uni-easyinput>
</uni-forms-item>
</uni-row>
<uni-row>
<uni-forms-item
label=
"遗留问题及原因:"
required
name=
"problemAndReason"
>
<uni-easyinput
type=
"textarea"
v-model=
"repirForm.problemAndReason"
></uni-easyinput>
</uni-forms-item>
</uni-row>
<uni-row>
<uni-forms-item
label=
"工程师对用户建议:"
required
name=
"isOrNo"
>
<uni-data-checkbox
mode=
"tag"
v-model=
"repirForm.isOrNo"
:localdata=
"typeList1"
>
</uni-data-checkbox>
</uni-forms-item>
<uni-forms-item
v-if=
"repirForm.isOrNo == '有'"
required
name=
"proposal"
>
<uni-easyinput
type=
"textarea"
v-model=
"repirForm.proposal"
></uni-easyinput>
</uni-forms-item>
</uni-row>
<uni-row>
<uni-forms-item
label=
"用户对上述服务项及遗留问题:"
required
name=
"approvalOrPart"
>
<uni-data-checkbox
mode=
"tag"
v-model=
"repirForm.approvalOrPart"
:localdata=
"typeList2"
>
</uni-data-checkbox>
</uni-forms-item>
<uni-forms-item
v-if=
"repirForm.approvalOrPart == '部分认可'"
required
name=
"view"
>
<uni-easyinput
type=
"textarea"
v-model=
"repirForm.view"
></uni-easyinput>
</uni-forms-item>
</uni-row>
</uni-forms>
<view
class=
"saveBtn"
>
<button
class=
"mini-btn"
type=
"primary"
size=
"mini"
@
click=
"saveSubmit"
>
保存
</button>
</view>
</view>
</view>
</view>
<uni-popup
ref=
"inputDialog"
type=
"dialog"
>
<uni-popup-dialog
ref=
"inputClose"
mode=
"base"
title=
"确认保存?"
@
confirm=
"dialogInputConfirm"
>
</uni-popup-dialog>
</uni-popup>
</view>
</
template
>
<
script
>
import
getDateTime
from
"@/common/getdateTime.js"
export
default
{
data
()
{
return
{
tempArr
:
[
''
],
tempOld
:
{},
rules
:
{
caseNo
:
{
rules
:
[{
required
:
true
,
errorMessage
:
'请输入caseNo'
}]
},
number
:
{
rules
:
[{
required
:
true
,
errorMessage
:
'请输入编号'
}]
},
userName
:
{
rules
:
[{
required
:
true
,
errorMessage
:
'请输入用户姓名'
}]
},
engineerName
:
{
rules
:
[{
required
:
true
,
errorMessage
:
'请输入工程师姓名'
}]
},
arriveTime
:
{
rules
:
[{
required
:
true
,
errorMessage
:
'请选择到场时间'
,
}]
},
leaveTime
:
{
rules
:
[{
required
:
true
,
errorMessage
:
'请选择离场时间'
}]
},
content
:
{
rules
:
[{
required
:
true
,
errorMessage
:
'请输入服务内容'
}]
},
type
:
{
rules
:
[{
required
:
true
,
errorMessage
:
'请选择类型'
}]
},
problemAndReason
:
{
rules
:
[{
required
:
true
,
errorMessage
:
'请输入遗留问题'
}]
},
view
:
{
rules
:
[{
required
:
true
,
errorMessage
:
'请输入'
}]
},
proposal
:
{
rules
:
[{
required
:
true
,
errorMessage
:
'请输入'
}]
}
},
repirForm
:
{
isOrNo
:
'无'
,
approvalOrPart
:
'认可'
,
content
:
''
,
id
:
''
},
typeList1
:
[{
text
:
'无'
,
value
:
'无'
},
{
text
:
'有'
,
value
:
'有'
}],
typeList2
:
[{
text
:
'认可'
,
value
:
'认可'
},
{
text
:
'部分认可'
,
value
:
'部分认可'
}],
dateList
:
[{
text
:
'现场调研'
,
value
:
'现场调研'
},
{
text
:
'安装调试'
,
value
:
'安装调试'
},
{
text
:
'故障解决'
,
value
:
'故障解决'
},
{
text
:
'性能调整'
,
value
:
'性能调整'
},
{
text
:
'软件维护'
,
value
:
'软件维护'
},
{
text
:
'其他'
,
value
:
'其他'
}],
postData
:
{},
}
},
created
()
{
if
(
JSON
.
stringify
(
this
.
$store
.
state
.
temp_data
)
!==
'{}'
)
{
this
.
postData
=
this
.
$store
.
state
.
temp_data
this
.
repirForm
=
JSON
.
parse
(
this
.
postData
.
content
)
let
arr
=
this
.
repirForm
.
content
.
split
(
'
\
n'
).
slice
(
0
,
-
1
)
let
cc
=
arr
.
reduce
((
pre
,
next
)
=>
{
let
keys
=
next
.
split
(
':'
)[
0
]
if
(
!
pre
[
keys
])
{
pre
[
keys
]
=
{
value
:
next
}
}
return
pre
},
{})
this
.
tempArr
=
cc
}
else
{
let
timeStr
=
getDateTime
.
dateTimeStr
(
'y-m-d'
)
this
.
repirForm
.
arriveTime
=
timeStr
this
.
repirForm
.
leaveTime
=
timeStr
}
},
methods
:
{
lookTable
()
{
uni
.
navigateTo
({
url
:
"/pages/repair/sampleTable"
})
},
typeChange
(
e
)
{
let
data
=
[...
this
.
repirForm
.
type
]
// console.log(this.tempArr);
this
.
tempArr
=
data
.
reduce
((
pre
,
next
)
=>
{
if
(
!
pre
[
next
])
{
let
obj
=
{
key
:
next
,
value
:
next
+
':'
}
if
(
this
.
tempArr
[
next
]?.
value
)
{
obj
.
value
=
this
.
tempArr
[
next
].
value
}
pre
[
next
]
=
obj
}
return
pre
},
{})
},
contentChange
()
{
let
arr
=
Object
.
values
(
this
.
tempArr
)
let
val
=
''
arr
.
map
(
item
=>
{
val
+=
item
.
value
+
'
\
n'
})
this
.
repirForm
.
content
=
val
},
saveSubmit
()
{
this
.
contentChange
()
this
.
$refs
.
inputDialog
.
open
()
},
dialogInputConfirm
()
{
this
.
$refs
.
forms
.
validate
().
then
(
res
=>
{
let
timeStr
=
getDateTime
.
dateTimeStr
(
'y-m-d h:i'
)
if
(
this
.
$store
.
state
.
oper_type
==
'新增'
)
{
this
.
postData
=
{
content
:
JSON
.
stringify
(
this
.
repirForm
),
id
:
''
,
isDel
:
'0'
,
number
:
this
.
repirForm
.
number
,
oid
:
this
.
$store
.
state
.
now_user
.
areaName
,
room
:
''
,
time
:
timeStr
,
type
:
'2'
,
//报修为2
status
:
'待同步'
,
createBy
:
this
.
$store
.
state
.
now_user
.
name
,
creatTime
:
timeStr
,
uid
:
this
.
$store
.
state
.
now_user
.
oid
+
Number
(
Math
.
random
().
toString
().
substr
(
3
,
10
)
+
Date
.
now
()).
toString
(
36
)
}
// console.log('这是新增',this.postData);
this
.
$store
.
state
.
all_data
.
push
(
this
.
postData
)
let
operData
=
{
name
:
this
.
$store
.
state
.
now_user
.
name
,
level
:
'秘密'
,
user
:
this
.
$store
.
state
.
now_user
.
user
,
module
:
'报修'
,
detail
:
'报修记录'
+
'('
+
this
.
repirForm
.
number
+
')'
,
type
:
this
.
$store
.
state
.
oper_type
,
time
:
timeStr
,
}
this
.
$store
.
state
.
oper_record
.
unshift
(
operData
)
//保存新增记录
}
else
if
(
this
.
$store
.
state
.
oper_type
==
'编辑'
)
{
this
.
postData
.
content
=
JSON
.
stringify
(
this
.
repirForm
)
this
.
postData
.
number
=
this
.
repirForm
.
number
// console.log('这是编辑',this.postData);
this
.
$store
.
state
.
all_data
.
map
((
item
,
index
)
=>
{
if
(
this
.
postData
.
uid
==
item
.
uid
)
{
this
.
$store
.
state
.
all_data
.
splice
(
index
,
1
,
this
.
postData
)
}
})
}
uni
.
showToast
({
title
:
'保存成功'
,
icon
:
'none'
,
duration
:
2000
})
if
(
this
.
$store
.
state
.
oper_type
==
'新增'
)
{
uni
.
redirectTo
({
url
:
"/pages/repair/repair"
})
}
else
if
(
this
.
$store
.
state
.
oper_type
==
'编辑'
)
{
uni
.
navigateBack
()
}
// this.back()
})
},
back
()
{
uni
.
navigateBack
()
}
}
}
</
script
>
<
style
scoped
lang=
"less"
>
.container {
width: 100%;
height: 100%;
.section {
width: 100%;
background-image: linear-gradient(0deg, #f3f6fa 0%, rgba(130, 153, 238, 0.73) 49%, #5474e8 100%);
background-size: 100% 40rpx;
background-repeat: no-repeat;
.content {
width: 730rpx;
height: 400rpx;
background-color: #ffffff;
box-shadow: 0px 0px 6px 0px rgba(84, 116, 232, 0.16);
border-radius: 10px;
background-color: white;
margin: 0 auto;
padding: 20px 30px 30px 30px;
.title {
border-left: 2px solid #5474e8;
height: 18px;
display: flex;
align-items: center;
padding-left: 8px;
span {
line-height: 18px;
font-size: 18px;
}
}
.formConetnt {
height: calc(100% - 18px);
overflow: auto;
padding: 18px;
/deep/.uni-forms-item__label {
justify-content: flex-end !important;
uni-text {
text-align: right;
}
}
}
.saveBtn {
display: flex;
justify-content: center;
}
}
}
}
</
style
>
\ No newline at end of file
pages/repair/repairDetail.vue
deleted
100644 → 0
浏览文件 @
f61c28db
<
template
>
<view
class=
"content"
>
<uni-nav-bar
dark
left-icon=
"left"
left-text=
"返回"
:fixed=
"true"
background-color=
"#5474e8"
status-bar
title=
"杭州内网监管在线"
rightText=
"查看样表"
@
clickLeft=
"back"
@
clickRight=
"lookTable"
/>
<view
class=
"main"
>
<view
class=
"section"
>
<view
class=
"title"
>
<span>
报修信息
</span>
</view>
<view
class=
"formConetnt"
>
<uni-forms
:modelValue=
"repirForm"
labelWidth=
"110px"
:rules=
"rules"
ref=
"forms"
>
<uni-row>
<uni-col
:span=
"10"
>
<uni-forms-item
label=
"CASE NO:"
required
name=
"caseNo"
>
<uni-easyinput
:maxlength=
"50"
v-model=
"repirForm.caseNo"
placeholder=
"请输入"
:disabled=
"allDiasbled"
></uni-easyinput>
</uni-forms-item>
</uni-col>
<uni-col
:span=
"10"
:offset=
"2"
>
<uni-forms-item
label=
"编号:"
required
name=
"number"
>
<uni-easyinput
:maxlength=
"50"
v-model=
"repirForm.number"
placeholder=
"请输入"
:disabled=
"allDiasbled"
></uni-easyinput>
</uni-forms-item>
</uni-col>
</uni-row>
<uni-row>
<uni-col
:span=
"10"
>
<uni-forms-item
label=
"用户姓名:"
required
name=
"userName"
>
<uni-easyinput
:maxlength=
"50"
v-model=
"repirForm.userName"
placeholder=
"请输入"
:disabled=
"allDiasbled"
></uni-easyinput>
</uni-forms-item>
</uni-col>
<uni-col
:span=
"10"
:offset=
"2"
>
<uni-forms-item
label=
"工程师姓名:"
name=
"engineerName"
required
>
<uni-easyinput
:maxlength=
"50"
v-model=
"repirForm.engineerName"
placeholder=
"请输入"
:disabled=
"allDiasbled"
></uni-easyinput>
</uni-forms-item>
</uni-col>
</uni-row>
<uni-row>
<uni-col
:span=
"10"
>
<uni-forms-item
label=
"到场时间:"
required
name=
"arriveTime"
>
<uni-datetime-picker
type=
'date'
v-model=
"repirForm.arriveTime"
:disabled=
"allDiasbled"
/>
</uni-forms-item>
</uni-col>
<uni-col
:span=
"10"
:offset=
"2"
>
<uni-forms-item
label=
"离场时间:"
required
name=
"leaveTime"
>
<uni-datetime-picker
type=
'date'
v-model=
"repirForm.leaveTime"
:disabled=
"allDiasbled"
/>
</uni-forms-item>
</uni-col>
</uni-row>
<uni-row>
<uni-forms-item
label=
"服务类型:"
required
name=
"type"
>
<uni-data-checkbox
mode=
"tag"
v-model=
"repirForm.type"
:localdata=
"dateList"
multiple
@
change=
"typeChange"
:disabled=
"allDiasbled"
>
</uni-data-checkbox>
</uni-forms-item>
</uni-row>
<uni-row>
<uni-forms-item
label=
"服务内容:"
required
name=
"content"
>
<!--
<uni-easyinput
v-show=
"tempArr.length == 0"
disabled
></uni-easyinput>
-->
<uni-easyinput
v-for=
"(item,index) in tempArr"
:key=
"index"
v-model=
"tempArr[index].value"
:clearable=
"false"
style=
"margin-bottom: 5px;"
:disabled=
"allDiasbled"
></uni-easyinput>
</uni-forms-item>
</uni-row>
<uni-row>
<uni-forms-item
label=
"遗留问题及原因:"
required
name=
"problemAndReason"
>
<uni-easyinput
type=
"textarea"
v-model=
"repirForm.problemAndReason"
:disabled=
"allDiasbled"
></uni-easyinput>
</uni-forms-item>
</uni-row>
<uni-row>
<uni-forms-item
label=
"工程师对用户建议:"
required
name=
"isOrNo"
>
<uni-data-checkbox
mode=
"tag"
v-model=
"repirForm.isOrNo"
:localdata=
"typeList1"
:disabled=
"allDiasbled"
>
</uni-data-checkbox>
</uni-forms-item>
<uni-forms-item
v-if=
"repirForm.isOrNo == '有'"
required
name=
"proposal"
>
<uni-easyinput
type=
"textarea"
v-model=
"repirForm.proposal"
:disabled=
"allDiasbled"
></uni-easyinput>
</uni-forms-item>
</uni-row>
<uni-row>
<uni-forms-item
label=
"用户对上述服务项及遗留问题:"
required
name=
"approvalOrPart"
>
<uni-data-checkbox
mode=
"tag"
v-model=
"repirForm.approvalOrPart"
:localdata=
"typeList2"
:disabled=
"allDiasbled"
>
</uni-data-checkbox>
</uni-forms-item>
<uni-forms-item
v-if=
"repirForm.approvalOrPart == '部分认可'"
required
name=
"view"
>
<uni-easyinput
type=
"textarea"
v-model=
"repirForm.view"
:disabled=
"allDiasbled"
></uni-easyinput>
</uni-forms-item>
</uni-row>
</uni-forms>
</view>
<view
class=
"saveBtn"
>
<button
type=
"warn"
size=
"mini"
@
tap=
"delRepair"
v-show=
"!allDiasbled"
v-if=
"JSON.stringify(postData) !== '
{}'">删除
</button>
<button
class=
"mini-btn"
type=
"primary"
size=
"mini"
@
tap=
"saveSubmit"
v-show=
"!allDiasbled"
>
保存
</button>
</view>
</view>
</view>
<uni-popup
ref=
"inputDialog"
type=
"dialog"
>
<uni-popup-dialog
ref=
"inputClose"
mode=
"base"
title=
"确认保存?"
@
confirm=
"dialogInputConfirm"
>
</uni-popup-dialog>
</uni-popup>
<!-- 删除弹窗 -->
<uni-popup
ref=
"inputDialog2"
type=
"dialog"
>
<uni-popup-dialog
ref=
"inputClose"
mode=
"base"
title=
"删除"
@
confirm=
"dialogInputConfirm2"
>
<view
class=
"content-pop"
>
编号:
{{
popupTitle
.
number
}}
的
{{
popupTitle
.
name
}}
,确认删除?
</view>
</uni-popup-dialog>
</uni-popup>
</view>
</
template
>
<
script
>
import
getDateTime
from
"@/common/getdateTime.js"
export
default
{
data
()
{
return
{
tempArr
:
[],
tempOld
:
{},
rules
:
{
caseNo
:
{
rules
:
[{
required
:
true
,
errorMessage
:
'请输入caseNo'
}]
},
number
:
{
rules
:
[{
required
:
true
,
errorMessage
:
'请输入编号'
}]
},
userName
:
{
rules
:
[{
required
:
true
,
errorMessage
:
'请输入用户姓名'
}]
},
engineerName
:
{
rules
:
[{
required
:
true
,
errorMessage
:
'请输入工程师姓名'
}]
},
arriveTime
:
{
rules
:
[{
required
:
true
,
errorMessage
:
'请选择到场时间'
,
}]
},
leaveTime
:
{
rules
:
[{
required
:
true
,
errorMessage
:
'请选择离场时间'
}]
},
content
:
{
rules
:
[{
required
:
true
,
errorMessage
:
'请输入服务内容'
}]
},
type
:
{
rules
:
[{
required
:
true
,
errorMessage
:
'请选择类型'
}]
},
problemAndReason
:
{
rules
:
[{
required
:
true
,
errorMessage
:
'请输入遗留问题'
}]
},
view
:
{
rules
:
[{
required
:
true
,
errorMessage
:
'请输入'
}]
},
proposal
:
{
rules
:
[{
required
:
true
,
errorMessage
:
'请输入'
}]
}
},
repirForm
:
{
isOrNo
:
'无'
,
approvalOrPart
:
'都认可'
,
content
:
''
,
id
:
''
},
typeList1
:
[{
text
:
'无'
,
value
:
'无'
},
{
text
:
'有'
,
value
:
'有'
}],
typeList2
:
[{
text
:
'都认可'
,
value
:
'都认可'
},
{
text
:
'部分认可'
,
value
:
'部分认可'
}],
dateList
:
[{
text
:
'现场调研'
,
value
:
'现场调研'
},
{
text
:
'安装调试'
,
value
:
'安装调试'
},
{
text
:
'故障解决'
,
value
:
'故障解决'
},
{
text
:
'性能调整'
,
value
:
'性能调整'
},
{
text
:
'软件维护'
,
value
:
'软件维护'
},
{
text
:
'其他'
,
value
:
'其他'
}],
postData
:
{},
allDiasbled
:
false
,
popupTitle
:
{
number
:
null
,
name
:
""
},
}
},
created
()
{
if
(
JSON
.
stringify
(
this
.
$store
.
state
.
temp_data
)
!==
'{}'
)
{
this
.
postData
=
this
.
$store
.
state
.
temp_data
this
.
repirForm
=
JSON
.
parse
(
this
.
postData
.
content
)
let
arr
=
this
.
repirForm
.
content
.
split
(
'
\
n'
).
slice
(
0
,
-
1
)
let
cc
=
arr
.
reduce
((
pre
,
next
)
=>
{
let
keys
=
next
.
split
(
':'
)[
0
]
if
(
!
pre
[
keys
])
{
pre
[
keys
]
=
{
value
:
next
}
}
return
pre
},
{})
this
.
tempArr
=
cc
}
else
{
let
timeStr
=
getDateTime
.
dateTimeStr
(
'y-m-d'
)
this
.
repirForm
.
arriveTime
=
timeStr
this
.
repirForm
.
leaveTime
=
timeStr
}
if
(
this
.
$store
.
state
.
oper_type
==
'查看'
)
{
this
.
allDiasbled
=
true
}
},
methods
:
{
delRepair
(){
this
.
$refs
.
inputDialog2
.
open
()
this
.
popupTitle
.
number
=
this
.
postData
.
number
this
.
popupTitle
.
name
=
'报修记录'
},
dialogInputConfirm2
()
{
this
.
$store
.
state
.
all_data
.
map
((
item
,
index
)
=>
{
if
(
item
.
uid
==
this
.
postData
.
uid
)
{
console
.
log
(
'删除'
);
this
.
$store
.
commit
(
'DEL_DATA'
,
index
)
let
timeStr
=
getDateTime
.
dateTimeStr
(
'y-m-d h:i'
)
let
operData
=
{
name
:
this
.
$store
.
state
.
now_user
.
name
,
level
:
'秘密'
,
user
:
this
.
$store
.
state
.
now_user
.
user
,
module
:
'报修'
,
detail
:
'报修记录'
+
'('
+
item
.
number
+
')'
,
type
:
'删除'
,
time
:
timeStr
}
this
.
$store
.
state
.
oper_record
.
unshift
(
operData
)
uni
.
showToast
({
title
:
'删除成功'
,
icon
:
'none'
,
duration
:
2000
})
}
})
uni
.
navigateBack
()
},
lookTable
()
{
uni
.
navigateTo
({
url
:
"/pages/repair/sampleTable"
})
},
typeChange
(
e
)
{
let
data
=
[...
this
.
repirForm
.
type
]
// console.log(this.tempArr);
this
.
tempArr
=
data
.
reduce
((
pre
,
next
)
=>
{
if
(
!
pre
[
next
])
{
let
obj
=
{
key
:
next
,
value
:
next
+
':'
}
if
(
this
.
tempArr
[
next
]?.
value
)
{
obj
.
value
=
this
.
tempArr
[
next
].
value
}
pre
[
next
]
=
obj
}
return
pre
},
{})
},
contentChange
()
{
let
arr
=
Object
.
values
(
this
.
tempArr
)
let
val
=
''
if
(
arr
[
0
]
!==
''
){
arr
.
map
(
item
=>
{
if
(
item
.
value
){
val
+=
item
.
value
+
'
\
n'
}
})
}
this
.
repirForm
.
content
=
val
},
saveSubmit
()
{
console
.
log
(
1231
);
this
.
contentChange
()
console
.
log
(
this
.
repirForm
,
'什么值?'
);
this
.
$refs
.
inputDialog
.
open
()
},
dialogInputConfirm
()
{
this
.
$refs
.
forms
.
validate
().
then
(
res
=>
{
let
timeStr
=
getDateTime
.
dateTimeStr
(
'y-m-d h:i'
)
let
timeStr2
=
getDateTime
.
dateTimeStr
(
'y-m-d h:i:s'
)
if
(
this
.
$store
.
state
.
oper_type
==
'新增'
)
{
this
.
postData
=
{
content
:
JSON
.
stringify
(
this
.
repirForm
),
id
:
''
,
isDel
:
'0'
,
number
:
this
.
repirForm
.
number
,
oid
:
this
.
$store
.
state
.
now_user
.
areaName
,
room
:
''
,
time
:
timeStr
,
type
:
'2'
,
//报修为2
status
:
'待同步'
,
createBy
:
this
.
$store
.
state
.
now_user
.
name
,
creatTime
:
timeStr2
,
uid
:
this
.
$store
.
state
.
now_user
.
oid
+
Number
(
Math
.
random
().
toString
().
substr
(
3
,
10
)
+
Date
.
now
()).
toString
(
36
)
}
// console.log('这是新增',this.postData);
this
.
$store
.
state
.
all_data
.
push
(
this
.
postData
)
let
operData
=
{
name
:
this
.
$store
.
state
.
now_user
.
name
,
level
:
'秘密'
,
user
:
this
.
$store
.
state
.
now_user
.
user
,
module
:
'报修'
,
detail
:
'报修记录'
+
'('
+
this
.
repirForm
.
number
+
')'
,
type
:
this
.
$store
.
state
.
oper_type
,
time
:
timeStr
,
}
this
.
$store
.
state
.
oper_record
.
unshift
(
operData
)
//保存新增记录
}
else
if
(
this
.
$store
.
state
.
oper_type
==
'编辑'
)
{
this
.
postData
.
content
=
JSON
.
stringify
(
this
.
repirForm
)
this
.
postData
.
number
=
this
.
repirForm
.
number
// console.log('这是编辑',this.postData);
this
.
$store
.
state
.
all_data
.
map
((
item
,
index
)
=>
{
if
(
this
.
postData
.
uid
==
item
.
uid
)
{
this
.
$store
.
state
.
all_data
.
splice
(
index
,
1
,
this
.
postData
)
}
})
}
uni
.
showToast
({
title
:
'保存成功'
,
icon
:
'none'
,
duration
:
2000
})
if
(
this
.
$store
.
state
.
oper_type
==
'新增'
)
{
console
.
log
(
'新增'
);
uni
.
redirectTo
({
url
:
"/pages/repair/repair"
})
}
else
if
(
this
.
$store
.
state
.
oper_type
==
'编辑'
)
{
uni
.
navigateBack
()
}
// this.back()
})
},
back
()
{
uni
.
navigateBack
()
}
}
}
</
script
>
<
style
scoped
lang=
"scss"
>
.main
{
height
:
calc
(
100%
-
44px
);
background-image
:
linear-gradient
(
0deg
,
#f3f6fa
0%
,
rgba
(
130
,
153
,
238
,
0
.73
)
49%
,
#5474e8
100%
);
background-size
:
100%
39
.84375rpx
;
background-repeat
:
no-repeat
;
background-color
:
#f3f6fa
;
}
.section
{
width
:
726
.5625rpx
;
height
:
399
.60937rpx
;
background-color
:
#ffffff
;
box-shadow
:
0px
0px
6px
0px
rgba
(
84
,
116
,
232
,
0
.16
);
border-radius
:
10px
;
margin
:
0
auto
;
padding
:
11
.71875rpx
17
.57812rpx
17
.57812rpx
17
.57812rpx
;
.title
{
border-left
:
2px
solid
#5474e8
;
height
:
18px
;
display
:
flex
;
align-items
:
center
;
padding-left
:
8px
;
span
{
line-height
:
18px
;
font-size
:
18px
;
}
}
.formConetnt
{
height
:
calc
(
100%
-
17
.57812rpx
);
overflow
:
auto
;
padding-top
:
10
.54687rpx
;
// background-color: red;
position
:
relative
;
/
deep
/
.uni-forms-item__label
{
justify-content
:
flex-end
!
important
;
uni-text
{
text-align
:
right
;
}
}
}
.saveBtn
{
display
:
flex
;
position
:
absolute
;
justify-content
:
center
;
bottom
:
17
.57812rpx
;
left
:
50%
;
transform
:
translate
(
-50%
);
.mini-btn
{
margin-left
:
8px
;
background-color
:
#5474e8
!
important
;
}
}
}
</
style
>
\ No newline at end of file
pages/repair/sampleTable.vue
deleted
100644 → 0
浏览文件 @
f61c28db
<
template
>
<view
class=
"content"
>
<uni-nav-bar
dark
:fixed=
"true"
background-color=
"#5474e8"
status-bar
left-icon=
"left"
left-text=
"返回"
@
clickLeft=
"back"
title=
"杭州内网监管在线"
/>
<view
class=
"main"
>
<view
class=
"container box-shaow-box"
>
<view
class=
"image-item "
>
<image
src=
"../../static/img/repair-table/repair1.png"
mode=
"widthFix"
></image>
</view>
<view
class=
"image-item "
>
<image
src=
"../../static/img/repair-table/repair2.png"
mode=
"widthFix"
></image>
</view>
</view>
</view>
</view>
</
template
>
<
script
>
export
default
{
onNavigationBarButtonTap
(
val
)
{
// console.log(val);
uni
.
navigateBack
()
},
methods
:
{
back
()
{
uni
.
navigateBack
()
}
}
}
</
script
>
<
style
lang=
"less"
scoped
>
.content {
width: 100%;
height: 100%;
.main {
width: 100%;
// background-color: red;
background-image: linear-gradient(0deg, #f3f6fa 0%, rgba(130, 153, 238, 0.73) 49%, #5474e8 100%);
background-size: 100% 40rpx;
background-repeat: no-repeat;
.container {
margin: 0 auto;
width: 730rpx;
height: 400rpx;
padding: 17.65rpx;
padding-bottom: 0;
// width: 341.18rpx;
overflow: hidden;
overflow: auto;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
.image-item {
width: 341.18rpx;
height: 464.71rpx;
background-color: #ffffff;
box-shadow: 0px 0px 9.41rpx 0px rgba(84, 116, 232, 0.2);
border-radius: 4px;
margin-bottom: 11.76rpx;
}
.top-image {
height: 288.24rpx;
}
image {
width: 100%;
// object-fit: contain;
}
}
}
}
</
style
>
pages/repair/showRapair.vue
deleted
100644 → 0
浏览文件 @
f61c28db
<
template
>
<view
class=
"container"
>
<uni-nav-bar
left-icon=
"left"
left-text=
"返回"
dark
:fixed=
"true"
background-color=
"#5474e8"
status-bar
title=
"杭州内网监管在线"
rightText=
"查看样表"
@
clickLeft=
"back"
@
clickRight=
"lookTable"
/>
<view
class=
"section"
>
<view
class=
"content"
>
<view
class=
"title"
>
<span>
报修信息
</span>
</view>
<view
class=
"formConetnt"
>
<uni-forms
:modelValue=
"repirForm"
labelWidth=
"110px"
:rules=
"rules"
ref=
"forms"
>
<uni-row>
<uni-col
:span=
"10"
>
<uni-forms-item
label=
"CASE NO:"
required
name=
"caseNo"
>
<span>
{{
repirForm
.
caseNo
}}
</span>
<!--
<uni-easyinput
v-model=
"repirForm.caseNo"
placeholder=
"请输入"
disabled
></uni-easyinput>
-->
</uni-forms-item>
</uni-col>
<uni-col
:span=
"10"
:offset=
"2"
>
<uni-forms-item
label=
"编号:"
required
name=
"number"
>
<span>
{{
repirForm
.
number
}}
</span>
<!--
<uni-easyinput
v-model=
"repirForm.number"
placeholder=
"请输入"
disabled
></uni-easyinput>
-->
</uni-forms-item>
</uni-col>
</uni-row>
<uni-row>
<uni-col
:span=
"10"
>
<uni-forms-item
label=
"用户姓名:"
required
name=
"userName"
>
<span>
{{
repirForm
.
userName
}}
</span>
<!--
<uni-easyinput
v-model=
"repirForm.userName"
placeholder=
"请输入"
disabled
></uni-easyinput>
-->
</uni-forms-item>
</uni-col>
<uni-col
:span=
"10"
:offset=
"2"
>
<uni-forms-item
label=
"工程师姓名:"
name=
"engineerName"
required
>
<span>
{{
repirForm
.
engineerName
}}
</span>
<!--
<uni-easyinput
v-model=
"repirForm.engineerName"
placeholder=
"请输入"
disabled
></uni-easyinput>
-->
</uni-forms-item>
</uni-col>
</uni-row>
<uni-row>
<uni-col
:span=
"10"
>
<uni-forms-item
label=
"到场时间:"
required
name=
"arriveTime"
>
<span>
{{
repirForm
.
arriveTime
}}
</span>
<!--
<uni-datetime-picker
type=
'date'
v-model=
"repirForm.arriveTime"
disabled
/>
-->
</uni-forms-item>
</uni-col>
<uni-col
:span=
"10"
:offset=
"2"
>
<uni-forms-item
label=
"离场时间:"
required
name=
"leaveTime"
>
<span>
{{
repirForm
.
leaveTime
}}
</span>
<!--
<uni-datetime-picker
type=
'date'
v-model=
"repirForm.leaveTime"
disabled
/>
-->
</uni-forms-item>
</uni-col>
</uni-row>
<uni-row>
<uni-forms-item
label=
"服务类型:"
required
name=
"type"
>
<!--
<span>
{{
repirForm
.
type
}}
</span>
-->
<uni-data-checkbox
disabled
mode=
"tag"
v-model=
"repirForm.type"
:localdata=
"dateList"
multiple
@
change=
"typeChange"
>
</uni-data-checkbox>
</uni-forms-item>
</uni-row>
<uni-row>
<uni-forms-item
label=
"服务内容:"
required
name=
"content"
>
<!--
<span>
{{
repirForm
.
content
}}
</span>
-->
<uni-easyinput
disabled
type=
"textarea"
v-model=
"repirForm.content"
></uni-easyinput>
</uni-forms-item>
</uni-row>
<uni-row>
<uni-forms-item
label=
"遗留问题及原因:"
required
name=
"problemAndReason"
>
<!--
<span>
{{
repirForm
.
problemAndReason
}}
</span>
-->
<uni-easyinput
disabled
type=
"textarea"
v-model=
"repirForm.problemAndReason"
></uni-easyinput>
</uni-forms-item>
</uni-row>
<uni-row>
<uni-forms-item
label=
"工程师对用户建议:"
required
name=
"isOrNo"
>
<!--
<span
v-if=
"repirForm.isOrNo == '无'"
>
{{
repirForm
.
isOrNo
}}
</span>
<span
v-if=
"repirForm.isOrNo == '有'"
>
{{
repirForm
.
proposal
}}
</span>
-->
<uni-data-checkbox
disabled
mode=
"tag"
v-model=
"repirForm.isOrNo"
:localdata=
"typeList1"
>
</uni-data-checkbox>
<uni-easyinput
type=
"textarea"
v-model=
"repirForm.proposal"
disabled
v-if=
"repirForm.isOrNo == '有'"
></uni-easyinput>
</uni-forms-item>
</uni-row>
<uni-row>
<uni-forms-item
label=
"用户对上述服务项及遗留问题:"
required
name=
"approvalOrPart"
>
<uni-data-checkbox
disabled
mode=
"tag"
v-model=
"repirForm.approvalOrPart"
:localdata=
"typeList2"
>
</uni-data-checkbox>
<uni-easyinput
disabled
type=
"textarea"
v-model=
"repirForm.view"
v-if=
"repirForm.approvalOrPart == '部分认可'"
></uni-easyinput>
</uni-forms-item>
</uni-row>
</uni-forms>
<view
class=
"saveBtn"
>
<button
class=
"mini-btn"
type=
"primary"
size=
"mini"
@
click=
"back"
>
返回
</button>
</view>
</view>
</view>
</view>
</view>
</
template
>
<
script
>
import
getDateTime
from
"@/common/getdateTime.js"
export
default
{
data
()
{
return
{
rules
:
{
caseNo
:
{
rules
:
[{
required
:
true
,
errorMessage
:
'请输入caseNo'
}]
},
number
:
{
rules
:
[{
required
:
true
,
errorMessage
:
'请输入编号'
}]
},
userName
:
{
rules
:
[{
required
:
true
,
errorMessage
:
'请输入用户姓名'
}]
},
engineerName
:
{
rules
:
[{
required
:
true
,
errorMessage
:
'请输入工程师姓名'
}]
},
arriveTime
:
{
rules
:
[{
required
:
true
,
errorMessage
:
'请选择到场时间'
}]
},
leaveTime
:
{
rules
:
[{
required
:
true
,
errorMessage
:
'请选择离场时间'
}]
},
content
:
{
rules
:
[{
required
:
true
,
errorMessage
:
'请输入服务内容'
}]
},
type
:
{
rules
:
[{
required
:
true
,
errorMessage
:
'请选择类型'
}]
},
problemAndReason
:
{
rules
:
[{
required
:
true
,
errorMessage
:
'请输入遗留问题'
}]
},
},
repirForm
:
{
isOrNo
:
'无'
,
approvalOrPart
:
'认可'
},
typeList1
:
[{
text
:
'无'
,
value
:
'无'
},
{
text
:
'有'
,
value
:
'有'
}],
typeList2
:
[{
text
:
'认可'
,
value
:
'认可'
},
{
text
:
'部分认可'
,
value
:
'部分认可'
}],
dateList
:
[{
text
:
'现场调研'
,
value
:
'现场调研'
},
{
text
:
'安装调试'
,
value
:
'安装调试'
},
{
text
:
'故障解决'
,
value
:
'故障解决'
},
{
text
:
'性能调整'
,
value
:
'性能调整'
},
{
text
:
'软件维护'
,
value
:
'软件维护'
},
{
text
:
'其他'
,
value
:
'其他'
}],
postData
:
{},
}
},
created
()
{
if
(
JSON
.
stringify
(
this
.
$store
.
state
.
temp_data
)
!==
'{}'
)
{
this
.
postData
=
this
.
$store
.
state
.
temp_data
this
.
repirForm
=
JSON
.
parse
(
this
.
postData
.
content
)
}
},
methods
:
{
lookTable
()
{
uni
.
navigateTo
({
url
:
"/pages/repair/sampleTable"
})
},
typeChange
(
e
)
{
console
.
log
(
e
);
},
back
()
{
uni
.
navigateBack
()
}
}
}
</
script
>
<
style
scoped
lang=
"less"
>
/deep/.uni-forms-item {
align-items: center !important;
}
.container {
width: 100vw;
height: 100vh;
.section {
width: 100vw;
background-image: linear-gradient(0deg, #f3f6fa 0%, rgba(130, 153, 238, 0.73) 49%, #5474e8 100%);
background-size: 100% 40rpx;
background-repeat: no-repeat;
.content {
background-color: #ffffff;
box-shadow: 0px 0px 6px 0px rgba(84, 116, 232, 0.16);
border-radius: 10px;
background-color: white;
width: 726.5rpx;
margin: 0 auto;
padding: 20px 30px 30px 30px;
height: 405rpx;
.title {
border-left: 2px solid #5474e8;
height: 18px;
display: flex;
align-items: center;
padding-left: 8px;
span {
line-height: 18px;
font-size: 18px;
}
}
.formConetnt {
height: calc(100% - 18px);
overflow: auto;
padding: 18px;
/deep/.uni-forms-item__label {
justify-content: flex-end !important;
uni-text {
text-align: right;
}
}
}
.saveBtn {
display: flex;
justify-content: center;
}
}
}
}
</
style
>
\ No newline at end of file
pages/report/lookReport.vue
deleted
100644 → 0
浏览文件 @
f61c28db
<
template
>
<view
class=
"content"
>
<!-- 导航栏 -->
<uni-nav-bar
left-icon=
"left"
left-text=
"返回"
dark
:fixed=
"true"
background-color=
"#5474e8"
status-bar
title=
"杭州内网监管在线"
right-text=
"查看样表"
@
clickLeft=
"back"
@
clickRight=
"lookTable"
/>
<view
class=
"main"
>
<!-- 基本信息 -->
<view
class=
"collapse-box"
>
<view
class=
"from-title"
>
<span
class=
"line-class"
></span>
基本信息
</view>
<view
class=
"collapse-box-icon"
@
tap=
"collapseChange"
>
<image
src=
"../../static/img/upArrow.png"
mode=
""
v-show=
"!isShow"
></image>
<image
src=
"../../static/img/downArrow.png"
mode=
""
v-show=
"isShow"
></image>
</view>
<uni-forms
v-if=
"isShow"
ref=
"baseForm"
:modelValue=
"baseFormData"
label-width=
"100px"
label-align=
"right"
>
<uni-row
class=
"demo-uni-row"
>
<uni-col
:span=
"8"
>
<uni-forms-item
label=
"编号:"
required
>
<uni-easyinput
v-model=
"baseFormData.number"
:disabled=
"true"
/>
<!--
<span
class=
"froms-item-span"
>
{{
baseFormData
.
number
}}
</span>
<image
src=
"../../static/img/-s-编辑.png"
mode=
"widthFix"
@
click=
""
></image>
-->
</uni-forms-item>
</uni-col>
<uni-col
:span=
"8"
style=
"padding: 0 5px;"
>
<uni-forms-item
label=
"报告类型:"
required
>
<uni-easyinput
v-model=
"baseFormData.reportType"
:disabled=
"true"
/>
</uni-forms-item>
</uni-col>
<uni-col
:span=
"8"
>
<uni-forms-item
label=
"运维单位:"
required
>
<uni-easyinput
v-model=
"baseFormData.operationUnit "
:disabled=
"true"
/>
</uni-forms-item>
</uni-col>
</uni-row>
<uni-row
class=
"demo-uni-row"
>
<uni-col
:span=
"8"
>
<uni-forms-item
label=
"报告名称:"
required
>
<uni-easyinput
v-model=
"baseFormData.reportName"
:disabled=
"true"
/>
</uni-forms-item>
</uni-col>
<uni-col
:span=
"8"
style=
"padding: 0 5px;"
>
<uni-forms-item
label=
"客户单位:"
required
>
<uni-easyinput
v-model=
"baseFormData.customerUnit"
:disabled=
"true"
/>
</uni-forms-item>
</uni-col>
<uni-col
:span=
"8"
>
<uni-forms-item
label=
"运维日期:"
required
>
<uni-easyinput
v-model=
"baseFormData.operationDate"
:disabled=
"true"
/>
</uni-easyinput>
</uni-forms-item>
</uni-col>
</uni-row>
</uni-forms>
</view>
<view
class=
"bottom-box"
:style=
"!isShow ? 'height: 352rpx' : ''"
>
<view
class=
"from-title"
>
<span
class=
"line-class"
></span>
报告内容
</view>
<!-- 报告内容 -->
<view
class=
"uni-padding-wrap "
>
<segmentedControl
:tabConfig=
"tabConfig"
@
clickItem=
"onClickItem"
:currentIndex
.
sync=
"current"
>
</segmentedControl>
</view>
<view
class=
"scroll-y"
:style=
"!isShow ? 'height: 290rpx' : ''"
>
<view
class=
"content-box"
>
<view
v-show=
"current === 0"
>
<lookOverview
ref=
"lookOverview"
></lookOverview>
</view>
<view
v-show=
"current === 1"
>
<lookEquipment
ref=
"lookEquipment"
></lookEquipment>
</view>
<view
v-show=
"current === 2"
>
<lookCheckContent
ref=
"lookCheckContent"
></lookCheckContent>
</view>
<view
v-show=
"current === 3"
>
<lookDetailFrom
ref=
"lookDetailFrom"
></lookDetailFrom>
</view>
<view
v-show=
"current === 4"
>
<lookAnnex
ref=
"annex"
></lookAnnex>
</view>
</view>
</view>
</view>
</view>
</view>
</
template
>
<
script
>
import
segmentedControl
from
"@/components/global/segmentedControl.vue"
import
lookEquipment
from
"@/components/lookReportContent/lookEquipment.vue"
import
lookOverview
from
"@/components/lookReportContent/lookOverview.vue"
import
lookCheckContent
from
"@/components/lookReportContent/lookCheckContent.vue"
import
lookDetailFrom
from
"@/components/lookReportContent/lookDetailFrom.vue"
import
lookAnnex
from
"@/components/lookReportContent/lookAnnex.vue"
export
default
{
components
:
{
segmentedControl
,
lookEquipment
,
lookOverview
,
lookCheckContent
,
lookDetailFrom
,
lookAnnex
,
},
data
()
{
return
{
isShow
:
false
,
baseFormData
:
{
number
:
''
,
reportType
:
''
,
operationUnit
:
''
,
reportName
:
''
,
customerUnit
:
''
,
operationDate
:
''
},
typeRange
:
[{
value
:
'运维报告'
,
text
:
'运维报告'
},
{
value
:
'巡检报告'
,
text
:
'巡检报告'
},
],
tabConfig
:
[{
label
:
'运维概述'
,
flag
:
false
},
{
label
:
'运维机具一览表'
,
flag
:
false
},
{
label
:
'运维检查内容'
,
flag
:
false
},
{
label
:
'详细运维表单+运维结果及意见建议'
,
flag
:
false
},
{
label
:
'附件表'
,
flag
:
false
},
],
current
:
0
,
styleType
:
'text'
,
activeColor
:
'#5474e8'
,
}
},
onLoad
()
{
if
(
JSON
.
stringify
(
this
.
$store
.
state
.
temp_data
)
!==
'{}'
)
{
let
obj
=
this
.
$store
.
state
.
temp_data
Object
.
keys
(
this
.
baseFormData
).
forEach
(
key
=>
{
this
.
baseFormData
[
key
]
=
obj
[
key
]
||
this
.
baseFormData
[
key
]
})
}
},
methods
:
{
collapseChange
()
{
this
.
isShow
=
!
this
.
isShow
},
lookTable
()
{
uni
.
navigateTo
({
url
:
"/pages/report/sampleTable"
})
},
back
()
{
uni
.
navigateBack
()
},
onClickItem
(
e
)
{
this
.
current
=
e
},
}
}
</
script
>
<
style
lang=
"less"
scoped
>
.content {
width: 100%;
// height: 100%;
position: relative;
// background-color: aquamarine;
.main {
width: 100%;
height: calc(100% - 33.53rpx);
// background-color: red;
background-image: linear-gradient(0deg, #f3f6fa 0%, rgba(130, 153, 238, 0.73) 49%, #5474e8 100%);
background-size: 100% 40rpx;
background-repeat: no-repeat;
.collapse-box {
width: 726.5rpx;
margin: 0 auto;
padding: 10px 10px 0 10px;
background-color: #ffffff;
box-shadow: 0px 0px 6px 0px rgba(84, 116, 232, 0.16);
border-radius: 10px;
// margin-bottom: 20px;
margin-bottom: 11.76rpx;
position: relative;
min-height: 35rpx;
.collapse-box-icon {
position: absolute;
right: 10px;
top: 10px;
width: 14px;
height: 14px;
// background-color: red;
image {
width: 100%;
height: 100%;
}
}
}
.bottom-box {
width: 726.5rpx;
height: 275rpx;
// height: 352rpx;
margin: 0 auto;
padding: 10px 10px 0 10px;
background-color: #ffffff;
// background-color: red;
box-shadow: 0px 0px 6px 0px rgba(84, 116, 232, 0.16);
border-radius: 10px;
position: relative;
.btn-box {
width: 726.5rpx;
height: 60px;
border-radius: 0 0 10px 10px;
position: fixed;
left: 13rpx;
bottom: 15rpx;
background-color: #ffffff;
// border: 1px solid red;
display: flex;
align-items: center;
.saveBtn {
width: 76.47rpx;
height: 28.24rpx;
line-height: 28.24rpx;
color: #ffffff;
font-size: 9.41rpx;
background-color: #5474e8;
box-shadow: 0px 3px 6px 0px rgba(84, 116, 232, 0.16);
border-radius: 10px;
}
}
.scroll-y {
width: 100%;
height: 215rpx;
overflow: hidden;
overflow-y: auto;
}
.content-box {
width: 100%;
height: 100%;
padding-top: 10px;
}
}
.from-title {
display: flex;
align-items: center;
font-size: 18px !important;
.line-class {
display: inline-block;
width: 2px;
height: 18px;
background-color: #5474e8;
margin-right: 5px;
}
margin-bottom: 5px;
}
}
}
</
style
>
\ No newline at end of file
pages/report/report-detail/componets/dialog_tag.vue
deleted
100644 → 0
浏览文件 @
f61c28db
<
template
>
<view
v-if=
"visible"
:style=
"
{'width':accpetData.width,'height':accpetData.height,'left':accpetData.left,'top':accpetData.top}"
class="normal">
<view
class=
"cloack"
@
touchstart=
"handlerShow"
v-show=
"cloackFlag"
></view>
<view
v-for=
"(item,index) in accpetData.dataList"
:key=
"index"
:class=
"[item.flag?'active':'','list_item']"
@
touchstart=
"handlerSubmit(item,index)"
>
<span
v-html=
"item.label"
></span>
</view>
</view>
</
template
>
<
script
>
export
default
{
props
:
{
visible
:
{
type
:
Boolean
,
},
propsData
:
{
type
:
Object
,
default
()
{
return
{
width
:
'150px'
,
height
:
'300px'
,
left
:
'120px'
,
top
:
'35px'
,
type
:
1
,
dataList
:
[]
}
}
}
},
data
()
{
return
{
cloackFlag
:
true
,
accpetData
:
{}
}
},
mounted
()
{
this
.
accpetData
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
propsData
))
},
methods
:
{
handlerShow
()
{
this
.
cloackFlag
=
false
this
.
$emit
(
'update:visible'
,
false
)
},
handlerSubmit
(
val
,
index
)
{
val
.
flag
=
!
val
.
flag
if
(
this
.
accpetData
.
type
!=
1
)
{
this
.
accpetData
.
dataList
.
map
((
item
,
ids
)
=>
{
if
(
ids
!==
index
)
{
item
.
flag
=
false
}
})
}
if
(
val
.
flag
)
{
// console.log(val,'children');
this
.
$emit
(
'updateData'
,
val
.
label
)
}
}
}
}
</
script
>
<
style
lang=
"less"
scoped
>
.cloack {
width: 100vw;
height: 100vh;
position: fixed;
left: 0;
top: 0;
z-index: 100;
}
.normal {
background: white;
box-shadow: 0px 2px 8px 0px rgba(119, 140, 162, 0.2);
border-radius: 2px;
z-index: 200;
position: absolute;
display: flex;
flex-wrap: wrap;
align-items: center;
padding: 16px;
padding-right: 0;
.active {
background-color: #5474e8 !important;
color: white !important;
}
.list_item {
// height: 40px;
background-color: #ffffff;
box-shadow: 0px 1px 4px 0px rgba(119, 140, 162, 0.16);
border-radius: 2px;
padding: 7px 16px;
text-align: center;
margin-right: 16px;
color: #5474e8;
border: 1px solid #5474e8;
z-index: 990;
}
}
</
style
>
pages/report/report-detail/deatil_first.vue
deleted
100644 → 0
浏览文件 @
f61c28db
<
template
>
<view
class=
"report_container"
>
<view
class=
"cloack"
@
tap=
"handlerShow"
v-show=
"cloackFlag"
></view>
<uni-nav-bar
left-icon=
"left"
left-text=
"返回"
:fixed=
"true"
dark
background-color=
"#5474e8"
status-bar
title=
"杭州内网监管在线"
rightText=
"查看样表"
@
clickLeft=
"back"
@
clickRight=
"lookTable"
/>
<view
class=
"report_content_box"
>
<view
class=
"report_content"
>
<view
class=
"content_header"
>
新增报告
</view>
<view
class=
"content_section"
>
<uni-forms
:modelValue=
"formData"
label-width=
"140px"
class=
"formClass"
:rules=
"formRules"
ref=
"forms"
>
<uni-row
class=
"demo-uni-row"
>
<uni-col
:span=
"9"
>
<uni-forms-item
label=
"编号:"
name=
"number"
required
>
<uni-easyinput
v-model=
"formData.number"
maxlength=
"50"
type=
"text"
placeholder=
"请输入"
/>
</uni-forms-item>
</uni-col>
<uni-col
:span=
"9"
:offset=
"2"
>
<uni-forms-item
label=
"报告类型:"
name=
"type"
required
>
<view
class=
"type_list"
>
<view
:class=
"['normal_type',currentIndex == 1?'active_type':'']"
@
touchstart=
"currentIndex=1"
>
运维报告
</view>
<view
:class=
"['normal_type',currentIndex == 2?'active_type':'']"
@
touchstart=
"currentIndex=2"
>
巡检报告
</view>
</view>
</uni-forms-item>
</uni-col>
</uni-row>
<uni-row
class=
"demo-uni-row"
>
<uni-col
:span=
"9"
>
<uni-forms-item
label=
"报告名称:"
name=
"reportName"
required
>
<hint-input
:maxlength=
"50"
:disabled=
"!formData.reportName"
v-model=
"formData.reportName"
@
fous=
"showDialogType('type')"
:configData=
'dialogCofig'
></hint-input>
</uni-forms-item>
</uni-col>
<uni-col
:span=
"10"
:offset=
"2"
>
<uni-forms-item
label=
"客户单位:"
name=
"customerUnit"
required
>
<hint-input
:maxlength=
"50"
:disabled=
"!formData.customerUnit"
v-model=
"formData.customerUnit"
@
fous=
"showDialogType('customerUnit')"
:configData=
'dialogCofig'
></hint-input>
</uni-forms-item>
</uni-col>
</uni-row>
<uni-row
class=
"demo-uni-row"
>
<uni-col
:span=
"9"
>
<uni-forms-item
label=
"运维 | 巡检日期:"
name=
"time"
required
>
<uni-datetime-picker
type=
'date'
v-model=
"formData.time"
/>
</uni-forms-item>
</uni-col>
<uni-col
:span=
"10"
:offset=
"2"
>
<uni-forms-item
label=
"运维单位:"
name=
"operationUnit"
>
<uni-easyinput
type=
"text"
v-model=
"formData.operationUnit"
placeholder=
"浙江泰源科技有限公司"
:disabled=
"true"
/>
</uni-forms-item>
</uni-col>
</uni-row>
<uni-row>
<uni-col
:span=
"24"
>
<uni-forms-item
label=
"报告内容(包括):"
>
<view
class=
"tag_list"
>
<view
v-for=
"item in repContent"
class=
"rep_tag"
>
<span>
{{
item
}}
</span>
</view>
</view>
</uni-forms-item>
</uni-col>
</uni-row>
<uni-row>
<uni-col
:span=
"6"
:offset=
"9"
>
<button
class=
"btn_form"
@
tap=
"toNext"
>
开始填写
</button>
</uni-col>
</uni-row>
</uni-forms>
</view>
</view>
</view>
</view>
</
template
>
<
script
>
import
getDateTime
from
"@/common/getdateTime.js"
import
dialogRep
from
'./componets/dialog_tag.vue'
import
hintInput
from
"@/components/hintInput/hintInput.vue"
import
{
reportNameList
,
connectionList
}
from
'../../../static/json/commonObj.js'
export
default
{
components
:
{
dialogRep
,
hintInput
},
data
()
{
return
{
dataList
:
[],
formData
:
{
number
:
''
,
reportName
:
''
,
customerUnit
:
''
,
time
:
''
,
operationUnit
:
'浙江泰源科技有限公司'
},
dialogCofig
:
{},
typeShow
:
false
,
//弹窗显示
unitShow
:
false
,
cloackFlag
:
false
,
currentIndex
:
1
,
//类型默认值
unitList
:
[],
formRules
:
{
number
:
{
rules
:
[{
required
:
true
,
errorMessage
:
'请输入编号'
,
},
]
},
reportName
:
{
rules
:
[{
required
:
true
,
errorMessage
:
'请输入报告名称'
,
},
{
maxLength
:
50
,
errorMessage
:
'长度在 {maxLength} 个字符以内'
,
}
]
},
customerUnit
:
{
rules
:
[{
required
:
true
,
errorMessage
:
'请输入客户单位'
,
},
{
maxLength
:
50
,
errorMessage
:
'长度在 {maxLength} 个字符以内'
,
}]
},
time
:
{
rules
:
[{
required
:
true
,
errorMessage
:
'请选择巡检日期'
,
},
]
},
},
repContent
:
[
'目录(按检查项目自动生成)'
,
'运维概述(按检查项目自动生成)'
,
'运维机具一览表(固定展示)'
,
'运维检查内容(按检查项目自动生成)'
,
'各系统详细运维表单+运维结果及意见建议(选择细项)'
,
'附件表(支持多表)'
,
]
}
},
onNavigationBarButtonTap
(
val
)
{
if
(
val
.
index
==
0
)
{
uni
.
navigateBack
()
}
else
{
this
.
lookTable
()
}
},
onShow
()
{
let
timeStr
=
getDateTime
.
dateTimeStr
(
'y-m-d'
)
this
.
formData
.
time
=
timeStr
},
methods
:
{
inputFous
()
{
// console.log('');
this
.
dataList
=
reportNameList
},
back
()
{
uni
.
navigateBack
()
},
//隐藏所有弹窗
handlerShow
()
{
this
.
cloackFlag
=
false
this
.
$store
.
commit
(
'set_FLAG'
,
false
)
},
// 显示报告名称
showDialogType
(
val
)
{
this
.
cloackFlag
=
true
if
(
val
==
'type'
)
{
let
year
=
new
Date
().
getFullYear
()
this
.
dialogCofig
=
{
width
:
'480px'
,
left
:
'0'
,
top
:
'40px'
,
type
:
1
,
dataList
:
reportNameList
}
}
else
{
this
.
dialogCofig
=
{
width
:
'404px'
,
left
:
'0'
,
top
:
'40px'
,
type
:
2
,
dataList
:
connectionList
}
}
},
// 输入报告名称
handlerAccpet
(
payload
)
{
this
.
formData
.
reportName
+=
payload
},
//输入客户单位
handlerAccpetUnit
(
payload
)
{
this
.
formData
.
customerUnit
=
payload
},
//跳转
toNext
()
{
this
.
$refs
.
forms
.
validate
().
then
(
res
=>
{
uni
.
showLoading
({
title
:
'加载中'
});
this
.
currentIndex
==
1
?
this
.
formData
.
reportType
=
'运维报告'
:
this
.
formData
.
reportType
=
'巡检报告'
let
timeStr
=
getDateTime
.
dateTimeStr
(
'y-m-d h:i'
)
let
timeStr2
=
getDateTime
.
dateTimeStr
(
'y-m-d h:i:s'
)
this
.
formData
.
type
=
'3'
//报告为3
this
.
formData
.
oid
=
this
.
$store
.
state
.
now_user
.
areaName
//区域名
this
.
formData
.
status
=
'编辑中'
//pad端添加状态
this
.
formData
.
isDel
=
'0'
this
.
formData
.
id
=
''
this
.
formData
.
resultAndProposes
=
[]
this
.
formData
.
createBy
=
this
.
$store
.
state
.
now_user
.
name
this
.
formData
.
creatTime
=
timeStr2
this
.
formData
.
uid
=
this
.
$store
.
state
.
now_user
.
oid
+
Number
(
Math
.
random
().
toString
().
substr
(
3
,
10
)
+
Date
.
now
()).
toString
(
36
);
this
.
formData
.
checkContentList
=
[
"3.1 空调系统"
,
"3.2 消防报警及气体灭火系统"
,
"3.4 屏蔽室"
,
"3.5 综合布线系统"
,
"3.6 配电及照明"
,
"3.7 动力环境监控系统"
,
"3.8 安全防范系统"
,
"3.9 防雷接地系统"
]
this
.
$store
.
state
.
all_data
.
push
(
this
.
formData
)
let
operData
=
{
name
:
this
.
$store
.
state
.
now_user
.
name
,
level
:
'秘密'
,
user
:
this
.
$store
.
state
.
now_user
.
user
,
module
:
'报告'
,
detail
:
this
.
formData
.
reportName
+
'('
+
this
.
formData
.
number
+
')'
,
type
:
this
.
$store
.
state
.
oper_type
,
time
:
timeStr
}
this
.
$store
.
state
.
oper_record
.
unshift
(
operData
)
//保存该操作记录
this
.
$store
.
commit
(
'SET_TEMP_DATA'
,
this
.
formData
)
uni
.
redirectTo
({
url
:
"/pages/report/reportInfo"
,
success
()
{
uni
.
hideLoading
()
}
})
})
},
lookTable
()
{
uni
.
navigateTo
({
url
:
"/pages/report/sampleTable"
})
},
}
}
</
script
>
<
style
lang=
"less"
scoped
>
.report_container {
width: 100vw;
height: calc(100vh - 57px);
// padding:0 20px 20px 20px;
// position: relative;
.cloack {
width: 100vw;
height: 100vh;
position: absolute;
left: 0;
top: 0;
z-index: 1;
}
.header_content {
display: flex;
justify-content: space-between;
align-items: center;
color: white;
height: 30px;
.header_left {
display: flex;
align-items: center;
}
.header_center {
font-size: 25px;
}
}
.report_content_box {
width: 100%;
// height: calc(100vh - 90px);
background-image: linear-gradient(0deg, #f3f6fa 0%, rgba(130, 153, 238, 0.73) 49%, #5474e8 100%);
background-size: 100% 40rpx;
background-repeat: no-repeat;
}
.report_content {
width: 730rpx;
height: 400rpx;
margin: 0 auto;
background-color: white;
padding: 20px 30px 30px 20px;
// padding: 0 30px;
box-shadow: 0px 0px 6px 0px rgba(84, 116, 232, 0.16);
border-radius: 10px;
.content_header {
border-left: 2px solid #5474e8;
padding-left: 5px;
height: 18px;
line-height: 18px;
}
.content_section {
padding-top: 20px;
.formClass {
/deep/.uni-forms-item__label {
justify-content: flex-end !important;
color: #778ca2;
}
/deep/.uni-col {
position: relative;
}
.btn_form {
width: 200px;
height: 48px;
background-color: #5474e8;
border-radius: 10px;
color: white;
}
.type_list {
display: flex;
justify-content: space-between;
width: 270px;
.normal_type {
width: 120px;
height: 40px;
background-color: #ffffff;
box-shadow: 0px 1px 4px 0px rgba(119, 140, 162, 0.16);
border-radius: 2px;
padding: 9px 28px;
color: #5474e8;
font-size: 16px;
}
.active_type {
background-color: #5474e8;
box-shadow: 0px 1px 4px 0px rgba(119, 140, 162, 0.16);
border-radius: 2px;
color: #ffffff;
}
}
.tag_list {
display: flex;
flex-wrap: wrap;
// justify-content: sp;
.rep_tag {
padding: 9px;
height: 40px;
font-size: 16px;
margin-right: 20px;
color: #32343b;
margin-bottom: 20px;
background-color: rgba(119, 140, 162, 0.1);
box-shadow: 0px 1px 4px 0px rgba(119, 140, 162, 0.16);
border-radius: 2px;
}
}
}
}
}
}
</
style
>
\ No newline at end of file
pages/report/report.vue
deleted
100644 → 0
浏览文件 @
f61c28db
<
template
>
<view
class=
"container"
>
<uni-nav-bar
dark
:fixed=
"true"
background-color=
"#5474e8"
status-bar
title=
"杭州内网监管在线"
/>
<view
class=
"content"
>
<!-- 导航栏 -->
<!-- 标签页 -->
<myTabs></myTabs>
<!-- 搜索区域 -->
<view
class=
"search-box"
>
<view
class=
"search-box-item"
>
<view
class=
"text"
>
同步:
</view>
<uni-data-checkbox
mode=
"tag"
v-model=
"searchForm.type"
:localdata=
"typeList"
@
change=
"selectChange"
>
</uni-data-checkbox>
</view>
<view
class=
"search-box-item"
>
<view
class=
"text"
>
时间:
</view>
<time-select
@
change=
"timeChange"
></time-select>
</view>
</view>
<!-- 主要内容卡片视图 -->
<view
class=
"card-main"
>
<view
class=
"card-main-custom"
>
<!-- 查询结果 -->
<view
class=
"search-result"
>
<span
class=
"search-result-text"
>
查询结果:
</span>
<span
class=
"search-result-number"
>
{{
listData
.
length
}}
条
</span>
</view>
<!-- 开始按钮 -->
<view
class=
"begin-button"
@
tap=
"addReport"
>
<span>
新增报告
</span>
<uni-icons
type=
"right"
color=
"#5474e8"
></uni-icons>
</view>
</view>
<view
class=
"card-box"
>
<view
class=
"card-item-box"
v-for=
"(v,i) in timeList"
:key=
"i"
>
<span
class=
"time-tip"
>
{{
v
.
time
}}
</span>
<view
class=
"card-flex-box"
>
<view
class=
"card"
v-for=
"(item,index) in v.listData"
:key=
"index"
>
<!-- 信息区域 -->
<view
class=
"card-top"
>
<view
class=
"card-title"
>
{{
item
.
time
?
item
.
time
.
slice
(
0
,
11
)
:
item
.
time
}}
</view>
<view
class=
"card-item"
>
<span
class=
"card-item-title"
>
记录:
</span>
<span>
{{
item
.
reportName
}}
</span>
</view>
<view
class=
"card-item card-item-number"
>
<span
class=
"card-item-title"
>
编号:
</span>
{{
item
.
number
}}
</view>
</view>
<!-- 按钮区域 -->
<view
class=
"card-bottom"
>
<!--
<view
class=
"card-bottom-btn-del card-bottom-btn"
v-if=
"item.status !== '已同步'"
@
tap=
"delReport(item)"
>
删除
</view>
-->
<view
class=
"card-bottom-btn-edit card-bottom-btn"
v-if=
"item.status !== '已同步'"
@
tap=
"clickEdit(item)"
>
编辑
</view>
<view
class=
"card-bottom-btn-look card-bottom-btn"
v-if=
"item.status == '已同步'"
@
tap=
"clickLook(item)"
>
查看
</view>
</view>
<!-- 标签 -->
<view
class=
"card-label"
:class=
"item.status == '已同步' ? 'synced-label' : item.status == '编辑中' ? 'edit-label' : ''"
>
{{
item
.
status
}}
</view>
</view>
</view>
</view>
</view>
</view>
<!-- 删除提示框 -->
<!--
<uni-popup
ref=
"inputDialog"
type=
"dialog"
>
<uni-popup-dialog
ref=
"inputClose"
mode=
"base"
title=
"删除"
@
confirm=
"dialogInputConfirm"
>
<view
class=
"content-pop"
>
编号:
{{
popupTitle
.
number
}}
的
{{
popupTitle
.
name
}}
,确认删除?
</view>
</uni-popup-dialog>
</uni-popup>
-->
</view>
</view>
</
template
>
<
script
>
import
myTabs
from
"components/myTabs/myTabs.vue"
import
getDateTime
from
"@/common/getdateTime.js"
import
timeSelect
from
"@/components/global/timeSelect.vue"
export
default
{
components
:
{
myTabs
,
timeSelect
},
data
()
{
return
{
isDel
:
{},
allDataList
:
[],
reportData
:
[],
listData
:
[],
startTime
:
''
,
endTime
:
''
,
time
:
0
,
typeList
:
[{
text
:
'全部'
,
value
:
''
},
{
text
:
'编辑中'
,
value
:
'编辑中'
},
{
text
:
'待同步'
,
value
:
'待同步'
},
{
text
:
'已同步'
,
value
:
'已同步'
}],
savedFilePath
:
null
,
searchForm
:
{
type
:
''
,
startTime
:
''
,
endTime
:
''
,
},
backButtonPress
:
0
,
popupTitle
:
{
number
:
null
,
name
:
""
},
timeList
:
[
]
}
},
onShow
()
{
this
.
getData
()
uni
.
showLoading
({
title
:
'加载中'
,
mask
:
true
});
setTimeout
(()
=>
{
uni
.
hideLoading
()
},
1000
)
},
// 定义返回退出
onBackPress
(
options
)
{
this
.
backButtonPress
++
;
if
(
this
.
backButtonPress
>
1
)
{
uni
.
setStorageSync
(
'oper_record'
,
this
.
$store
.
state
.
oper_record
)
uni
.
setStorageSync
(
'all_data'
,
this
.
$store
.
state
.
all_data
)
uni
.
setStorageSync
(
'now_user'
,
this
.
$store
.
state
.
now_user
);
uni
.
setStorageSync
(
'last_time'
,
this
.
$store
.
state
.
last_time
);
plus
.
runtime
.
quit
();
}
else
{
plus
.
nativeUI
.
toast
(
'再划一次退出应用'
);
}
setTimeout
(
function
()
{
this
.
backButtonPress
=
0
;
},
1000
);
return
true
;
},
methods
:
{
clickLook
(
item
)
{
uni
.
showLoading
({
title
:
'加载中'
,
mask
:
true
});
this
.
$store
.
commit
(
'SET_TEMP_DATA'
,
item
)
uni
.
navigateTo
({
url
:
"/pages/report/lookReport"
,
success
()
{
uni
.
hideLoading
()
}
})
},
selectChange
()
{
const
{
type
,
startTime
,
endTime
}
=
this
.
searchForm
this
.
listData
=
this
.
reportData
.
filter
(
item
=>
{
let
matchType
=
true
;
// 类型筛选
let
matchTime
=
true
;
// 时间筛选
if
(
type
)
{
matchType
=
item
.
status
==
type
}
if
(
startTime
&&
endTime
)
{
matchTime
=
Date
.
parse
(
item
.
time
)
<=
Date
.
parse
(
endTime
)
&&
Date
.
parse
(
item
.
time
)
>=
Date
.
parse
(
startTime
)
}
return
matchType
&&
matchTime
})
let
arr
=
[]
this
.
listData
.
map
(
item
=>
{
let
mouth
=
item
.
time
.
split
(
'-'
)[
1
].
slice
(
0
,
1
)
==
'0'
?
item
.
time
.
split
(
'-'
)[
1
].
substring
(
1
)
:
item
.
time
.
split
(
'-'
)[
1
]
let
time
=
item
.
time
.
split
(
'-'
)[
0
]
+
'年'
+
mouth
+
'月'
let
index
=
arr
.
findIndex
(
item
=>
{
return
item
.
time
==
time
})
if
(
index
!==
-
1
){
arr
[
index
].
listData
.
push
(
item
)
arr
[
index
].
listData
=
arr
[
index
].
listData
.
sort
((
a
,
b
)
=>
b
.
time
.
localeCompare
(
a
.
time
))
}
else
{
arr
.
push
({
time
:
time
,
listData
:[
item
]})
}
})
this
.
timeList
=
arr
.
sort
((
a
,
b
)
=>
b
.
time
.
localeCompare
(
a
.
time
))
// console.log(this.timeList,'奥术大师多');
},
timeChange
(
val
)
{
this
.
searchForm
.
startTime
=
val
.
startTime
this
.
searchForm
.
endTime
=
val
.
endTime
this
.
selectChange
()
},
addReport
()
{
this
.
$store
.
commit
(
'SET_TYPE'
,
'新增'
)
//将状态设置
this
.
$store
.
commit
(
'SET_TEMP_DATA'
,
{})
//清空
uni
.
navigateTo
({
url
:
"/pages/report/report-detail/deatil_first"
,
})
},
getData
()
{
const
value
=
this
.
$store
.
state
.
all_data
;
let
arr
=
[]
if
(
value
)
{
if
(
this
.
$store
.
state
.
now_user
.
permission
!==
1
)
{
value
.
map
(
item
=>
{
if
(
item
.
type
==
'3'
&&
item
.
oid
==
this
.
$store
.
state
.
now_user
.
areaName
)
{
arr
.
push
(
item
)
}
})
}
else
{
value
.
map
(
item
=>
{
if
(
item
.
type
==
'3'
)
{
arr
.
push
(
item
)
}
})
}
arr
.
sort
((
a
,
b
)
=>
{
return
a
.
creatTime
<
b
.
creatTime
?
1
:
-
1
})
let
arr1
=
arr
.
filter
(
item
=>
item
.
status
==
'编辑中'
)
let
arr2
=
arr
.
filter
(
item
=>
item
.
status
==
'待同步'
)
let
arr3
=
arr
.
filter
(
item
=>
item
.
status
==
'已同步'
)
this
.
reportData
=
[...
arr1
,
...
arr2
,
...
arr3
]
}
this
.
selectChange
()
},
clickEdit
(
val
)
{
uni
.
showLoading
({
title
:
'加载中'
,
mask
:
true
});
this
.
$store
.
commit
(
'SET_TYPE'
,
'编辑'
)
this
.
$store
.
commit
(
'SET_TEMP_DATA'
,
val
)
let
timeStr
=
getDateTime
.
dateTimeStr
(
'y-m-d h:i'
)
let
operData
=
{
name
:
this
.
$store
.
state
.
now_user
.
name
,
level
:
'秘密'
,
user
:
this
.
$store
.
state
.
now_user
.
user
,
module
:
'报告'
,
detail
:
val
.
reportName
+
'('
+
val
.
number
+
')'
,
type
:
this
.
$store
.
state
.
oper_type
,
time
:
timeStr
}
this
.
$store
.
state
.
oper_record
.
unshift
(
operData
)
//保存新编辑记录
uni
.
navigateTo
({
url
:
"/pages/report/reportInfo"
,
success
()
{
uni
.
hideLoading
()
}
})
}
}
}
</
script
>
<
style
scoped
lang=
"less"
>
.container {
width: 100%;
height: 100%;
}
.content {
width: 100%;
background-image: linear-gradient(0deg, #f3f6fa 0%, rgba(130, 153, 238, 0.73) 49%, #5474e8 100%);
background-size: 100% 40rpx;
background-repeat: no-repeat;
}
.search-box {
width: 715rpx;
// height: 68px;
background-color: #ffffff;
margin: 0 auto;
box-shadow: 0px 2px 4px 0px rgba(84, 116, 232, 0.16);
border-radius: 16px;
margin-top: 2.35rpx;
padding: 14.12rpx 0 16.47rpx 20rpx;
// padding-left: 34px;
.search-box-item {
// margin-bottom: 15px;
position: relative;
display: flex;
align-items: center;
.text {
font-size: 9.41rpx;
color: #778ca2;
margin-right: 5.88rpx;
}
.time-input {
position: absolute;
top: 0;
left: 244.12rpx;
}
}
}
.card-main {
width: 726.5rpx;
height: 270rpx;
// height: calc(100% - 160px);
background-color: #ffffff;
margin: 0 auto;
margin-top: 20px;
box-shadow: 0px 0px 6px 0px rgba(84, 116, 232, 0.16);
border-radius: 10px;
// background: #000;
.card-main-custom {
width: 100%;
height: 48px;
padding: 0 40px 0 30px;
// background-color: #4061d5;
background-color: rgba(64, 97, 213, 0.06);
box-shadow: 0px 0px 4px 0px rgba(84, 116, 232, 0.16);
border-radius: 10px 10px 0px 0px;
display: flex;
justify-content: space-between;
align-items: center;
.search-result {
.search-result-text {
color: rgba(119, 140, 162, .7);
margin-right: 5px;
}
.search-result-number {
color: #32343b;
}
}
.begin-button {
color: #5474e8;
}
}
.card-box {
width: 100%;
height: calc(100% - 48px);
// display: flex;
// flex-wrap: wrap;
// justify-content: space-between;
// padding-top: 11.76rpx;
overflow: hidden;
overflow-y: auto;
.card-item-box {
width: 100%;
padding-top: 11.76rpx;
.time-tip {
color: #ffffff;
padding: 3px 11px 5px 10px;
background-color: #5474e8;
box-shadow: 0px 3px 6px 0px rgba(84, 116, 232, 0.16);
border-radius: 0px 16px 16px 0px;
opacity: 0.7;
}
.card-flex-box {
width: 100%;
padding: 0 17.5rpx;
padding-top: 20px;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
}
.card-flex-box::after {
content: "";
width: 219rpx;
height: 0;
visibility: hidden;
}
}
.card {
width: 219rpx;
height: 92rpx;
background-color: ;
background-color: #ffffff;
box-shadow: 0px 1px 12px 0px rgba(84, 116, 232, 0.2);
border-radius: 2px;
border: solid 1px rgba(119, 140, 162, 0.3);
margin-bottom: 17.65rpx;
position: relative;
font-size: 9.41rpx;
.card-top {
width: 100%;
height: 70rpx;
color: #3a3c4b;
padding: 11.76rpx;
.card-title {
font-size: 10.59rpx;
font-family: AlibabaPuHuiTi-Medium;
margin-bottom: 5.88rpx;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
width: 160rpx;
}
.card-item {
margin-bottom: 5.88rpx;
}
.card-item-number {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.card-item-title {
color: #778ca2;
margin-bottom: 5.88rpx;
margin-right: 4.71rpx;
}
}
.card-label {
width: 52.94rpx;
height: 20rpx;
line-height: 20rpx;
background-color: #ffae4e;
border-radius: 16px 0px 0px 16px;
color: #ffffff;
text-align: center;
position: absolute;
right: 0;
top: 9.41rpx;
}
.synced-label {
background-color: rgba(119, 140, 162, 0.3);
}
.edit-label {
background-color: #5474e8;
}
.card-bottom {
// border-radius: 2px;
width: 100%;
height: calc(100% - 70rpx);
display: flex;
// background-color:#36d;
.card-bottom-btn {
text-align: center;
line-height: 22rpx;
}
.card-bottom-btn-del {
width: 50%;
height: 100%;
color: #e24f51;
background-color: rgba(226, 79, 81, 0.12);
}
.card-bottom-btn-look {
flex: 1;
height: 100%;
color: #5474e8;
background-color: rgba(84, 116, 232, 0.12);
}
.card-bottom-btn-edit {
flex: 1;
height: 100%;
color: #5474e8;
background-color: rgba(84, 116, 232, 0.12);
position: relative;
}
}
}
}
}
</
style
>
\ No newline at end of file
pages/report/reportInfo - 副本.vue
deleted
100644 → 0
浏览文件 @
f61c28db
<
template
>
<view
class=
"content"
>
<!-- 导航栏 -->
<uni-nav-bar
left-icon=
"left"
left-text=
"返回"
:fixed=
"true"
background-color=
"#5474e8"
status-bar
dark
title=
"杭州内网监管在线"
rightText=
"查看样表"
@
clickLeft=
"back"
@
clickRight=
"lookTable"
/>
<view
class=
"main"
>
<view
class=
"test-mask"
v-if=
"dialogShow"
@
tap=
"closeDialog"
></view>
<!-- 基本信息 -->
<view
class=
"collapse-box"
>
<view
class=
"from-title"
>
<view
class=
"from-title-item"
>
<span
class=
"line-class"
></span>
基本信息
</view>
</view>
<view
class=
"collapse-box-icon"
@
tap=
"collapseChange"
>
<image
src=
"../../static/img/upArrow.png"
mode=
""
v-show=
"!isShow"
></image>
<image
src=
"../../static/img/downArrow.png"
mode=
""
v-show=
"isShow"
></image>
</view>
<uni-forms
v-if=
"isShow"
ref=
"baseForm"
:modelValue=
"baseFormData"
label-width=
"100px"
label-align=
"right"
>
<uni-row
class=
"demo-uni-row"
>
<uni-col
:span=
"8"
>
<uni-forms-item
label=
"编号:"
required
>
<uni-easyinput
:maxlength=
"50"
v-model=
"baseFormData.number"
/>
</uni-forms-item>
</uni-col>
<uni-col
:span=
"8"
style=
"padding: 0 5px;"
>
<uni-forms-item
label=
"报告类型:"
required
>
<uni-data-select
v-model=
"baseFormData.reportType"
:localdata=
"typeRange"
>
</uni-data-select>
</uni-forms-item>
</uni-col>
<uni-col
:span=
"8"
>
<uni-forms-item
label=
"运维单位:"
required
>
<uni-easyinput
v-model=
"baseFormData.operationUnit "
:disabled=
"true"
/>
</uni-forms-item>
</uni-col>
</uni-row>
<uni-row
class=
"demo-uni-row"
>
<uni-col
:span=
"8"
>
<uni-forms-item
label=
"报告名称:"
required
>
<hintInput
:disabled=
"!baseFormData.reportName"
v-model=
"baseFormData.reportName"
@
fous=
"showDialogType('type')"
:configData=
'dialogCofig'
:isShow=
"dialogShow"
>
</hintInput>
</uni-forms-item>
</uni-col>
<uni-col
:span=
"8"
style=
"padding: 0 5px;"
>
<uni-forms-item
label=
"客户单位:"
required
>
<hintInput
:maxlength=
"50"
:disabled=
"!baseFormData.customerUnit"
v-model=
"baseFormData.customerUnit"
@
fous=
"showDialogType('unit')"
:configData=
'dialogCofig'
:isShow=
"dialogShow"
>
</hintInput>
</uni-forms-item>
</uni-col>
<uni-col
:span=
"8"
>
<uni-forms-item
label=
"运维日期:"
required
>
<uni-datetime-picker
type=
"date"
:clear-icon=
"false"
v-model=
"baseFormData.time"
@
maskClick=
"maskClick"
/>
</uni-forms-item>
</uni-col>
</uni-row>
</uni-forms>
</view>
<view
class=
"bottom-box"
:style=
"!isShow ? 'height: 352rpx' : ''"
>
<view
class=
"from-title"
>
<view
class=
"from-title-item"
>
<span
class=
"line-class"
></span>
报告内容
</view>
<view
class=
"submit-class"
>
<button
size=
"mini"
type=
"primary"
class=
"submit-button"
:disabled=
"!isCom"
@
tap=
"saveReport"
>
提交
</button>
</view>
</view>
<!-- 报告内容 -->
<view
class=
"uni-padding-wrap "
>
<segmentedControl
:tabConfig=
"tabConfig"
@
clickItem=
"onClickItem"
:currentIndex
.
sync=
"current"
>
</segmentedControl>
</view>
<view
class=
"scroll-y"
:style=
"!isShow ? 'height: 254rpx' : ''"
>
<view
class=
"content-box"
>
<view
v-show=
"current === 0"
>
<overview
@
add=
'addPerson'
@
save=
'saveData'
ref=
"overview"
></overview>
</view>
<view
v-show=
"current === 1"
>
<equipment
ref=
"equipment"
></equipment>
</view>
<view
v-show=
"current === 2"
>
<checkContent
ref=
"checkContent"
@
save=
'saveData'
></checkContent>
</view>
<view
v-show=
"current === 3"
>
<detailFrom
ref=
"detailFrom"
@
save=
'saveData'
></detailFrom>
</view>
<view
v-show=
"current === 4"
>
<annex
ref=
"annex"
@
save=
'saveData'
></annex>
</view>
</view>
</view>
<view
class=
"btn-box"
>
<button
type=
"primary"
class=
"saveBtn"
size=
"mini"
@
tap=
"clickSave(current)"
>
保存
</button>
</view>
</view>
</view>
<view
class=
"add-person-dialog"
v-if=
"addDialog"
>
<view
class=
"dialog-mask"
>
</view>
<view
class=
"dialog-from"
>
<view
class=
"from-title"
>
<view
class=
"from-title-item"
>
<span
class=
"line-class"
></span>
编辑
</view>
</view>
<uni-icons
class=
"close-icon"
type=
"closeempty"
size=
"20"
@
tap=
"closeAddDialog"
></uni-icons>
<uni-forms
ref=
"personDialogDataForm"
:rules=
"personRules"
:modelValue=
"personDialogData"
label-align=
"right"
label-width=
"140px"
>
<uni-forms-item
label=
"姓名:"
name=
"name"
required
>
<uni-easyinput
:maxlength=
"20"
v-model=
"personDialogData.name"
style=
"width: 300px;"
/>
</uni-forms-item>
<uni-forms-item
label=
"本项目中的职责:"
name=
"itemDuty"
required
>
<uni-easyinput
:maxlength=
"100"
v-model=
"personDialogData.itemDuty"
style=
"width: 300px;"
/>
</uni-forms-item>
<view
class=
"checkbox-list box-shaow-box"
>
<uni-data-checkbox
mode=
"tag"
multiple
@
change=
"checkBoxChange"
:localdata=
"Responsibilities"
>
</uni-data-checkbox>
</view>
<uni-forms-item
label=
"联系方式:"
name=
"phone"
required
>
<uni-easyinput
:maxlength=
"20"
type=
"number"
v-model=
"personDialogData.phone"
style=
"width: 300px;"
/>
</uni-forms-item>
<button
class=
"add-person-btn"
type=
"primary"
style=
" border-radius: 0%;"
@
tap=
"savePerson"
>
保存
</button>
</uni-forms>
</view>
</view>
<!--
<uni-popup
ref=
"inputDialog"
type=
"dialog"
>
<uni-popup-dialog
ref=
"inputClose"
mode=
"base"
title=
"还有未保存内容,确认返回?"
@
confirm=
"dialogInputConfirm"
>
</uni-popup-dialog>
</uni-popup>
-->
<uni-popup
ref=
"inputDialog"
type=
"dialog"
>
<uni-popup-dialog
ref=
"inputClose"
mode=
"base"
title=
"还有未保存内容,确认返回?"
content=
"注:返回后未保存内容需重新填写"
@
confirm=
"dialogInputConfirm"
>
</uni-popup-dialog>
</uni-popup>
</view>
</
template
>
<
script
>
import
segmentedControl
from
"@/components/global/segmentedControl.vue"
import
equipment
from
"@/components/reportContent/equipment.vue"
import
overview
from
"@/components/reportContent/overview.vue"
import
checkContent
from
"@/components/reportContent/checkContent.vue"
import
resAndOps
from
"@/components/reportContent/resultsAndOpinions.vue"
import
detailFrom
from
"@/components/reportContent/detailFrom.vue"
import
annex
from
"@/components/reportContent/annex.vue"
import
{
reportNameList
,
connectionList
,
responsibilityList
}
from
'../../static/json/commonObj.js'
import
hintInput
from
"@/components/hintInput/hintInput.vue"
import
getDateTime
from
"@/common/getdateTime.js"
export
default
{
components
:
{
equipment
,
overview
,
checkContent
,
resAndOps
,
detailFrom
,
annex
,
segmentedControl
,
hintInput
},
// 定义返回退出
onBackPress
(
options
)
{
// 触发返回就会调用此方法,这里实现的是禁用物理返回,顶部导航栏的自定义返回 uni.navigateBack 仍可使用
if
(
options
.
from
==
'backbutton'
)
{
console
.
log
(
123
);
if
(
!
this
.
isCom
)
{
this
.
$refs
.
inputDialog
.
open
()
}
else
{
uni
.
redirectTo
({
url
:
"/pages/report/report"
})
}
return
true
;
}
else
if
(
options
.
from
==
'navigateBack'
)
{
console
.
log
(
456
);
return
false
;
}
},
onLoad
(
option
)
{
if
(
option
.
queryData
)
{
this
.
baseFormData
=
JSON
.
parse
(
decodeURIComponent
(
option
.
queryData
))
}
else
{
//点击编辑进入将数据重新赋值
if
(
JSON
.
stringify
(
this
.
$store
.
state
.
temp_data
)
!==
'{}'
)
{
let
obj
=
this
.
$store
.
state
.
temp_data
// console.log('当前数据',obj);
Object
.
keys
(
this
.
baseFormData
).
forEach
(
key
=>
{
this
.
baseFormData
[
key
]
=
obj
[
key
]
||
this
.
baseFormData
[
key
]
})
}
}
responsibilityList
.
forEach
(
item
=>
{
this
.
Responsibilities
.
push
({
text
:
item
.
label
,
value
:
item
.
label
})
})
},
provide
()
{
return
{
add
:
this
.
add
,
flagObj
:
this
.
flagObj
}
},
data
()
{
return
{
dialogShow
:
false
,
scrollTop
:
0
,
dialogCofig
:
{},
isShow
:
false
,
tabConfig
:
[{
label
:
'运维概述'
,
flag
:
false
},
{
label
:
'运维机具一览表'
,
flag
:
false
},
{
label
:
'运维检查内容'
,
flag
:
false
},
{
label
:
'详细运维表单+运维结果及意见建议'
,
flag
:
false
},
{
label
:
'附件表'
,
flag
:
false
},
],
typeRange
:
[{
value
:
'运维报告'
,
text
:
'运维报告'
},
{
value
:
'巡检报告'
,
text
:
'巡检报告'
},
],
typeShow
:
false
,
//弹窗显示
unitShow
:
false
,
personRules
:
{
name
:
{
rules
:
[{
required
:
true
,
errorMessage
:
'请输入姓名'
,
}]
},
itemDuty
:
{
rules
:
[{
required
:
true
,
errorMessage
:
'请输入'
,
}]
},
phone
:
{
rules
:
[{
required
:
true
,
errorMessage
:
'请输入联系方式'
,
}]
},
},
//路由参数
queryData
:
{},
baseFormData
:
{
number
:
''
,
reportType
:
''
,
operationUnit
:
''
,
reportName
:
''
,
customerUnit
:
''
,
time
:
''
,
uid
:
''
,
type
:
''
,
oid
:
''
,
status
:
''
,
isDel
:
''
,
id
:
''
,
resultAndProposes
:
[],
createBy
:
''
,
creatTime
:
''
},
personDialogData
:
{
name
:
''
,
itemDuty
:
''
,
phone
:
''
},
current
:
0
,
styleType
:
'text'
,
activeColor
:
'#5474e8'
,
tabs
:
[
'运维概述'
,
'运维机具一览表'
,
'运维检查内容'
,
'详细运维表单+运维结果及意见建议'
,
'附件表'
],
value
:
[
'0'
],
addDialog
:
false
,
Responsibilities
:
[],
typeFrom
:
[
'巡检报告'
,
'运维报告'
],
cloackFlag
:
true
,
reportDto
:
{},
saveNum
:
0
,
isCom
:
false
,
}
},
watch
:
{
tabConfig
:
{
handler
(
newV
,
oldV
)
{
let
v
=
newV
.
every
(
item
=>
{
return
item
.
flag
})
if
(
v
)
{
//全部都保存成功
this
.
isCom
=
true
// this.saveReport()
}
else
{
this
.
isCom
=
false
// console.log('还有未保存');
}
},
deep
:
true
},
},
methods
:
{
closeDialog
()
{
this
.
dialogShow
=
false
this
.
$store
.
commit
(
'set_FLAG'
,
false
)
},
handlerShow
()
{},
scrollChange
(
e
)
{
this
.
scrollTop
=
e
.
target
.
scrollTop
},
add
(
e
)
{
let
top
=
this
.
$store
.
state
.
scroll_top
console
.
log
(
top
,
'距离顶部距离'
);
if
(
top
)
{
// if(top >= 510){
// uni.pageScrollTo({
// scrollTop:this.scrollTop += 100
// })
// }
}
},
lookTable
()
{
uni
.
navigateTo
({
url
:
"/pages/report/sampleTable"
})
},
clickSave
(
val
)
{
// console.log('现在保存的是', val);
let
refName
=
''
switch
(
val
)
{
case
0
:
refName
=
'overview'
;
break
;
case
1
:
refName
=
'equipment'
;
break
;
case
2
:
refName
=
'checkContent'
;
break
;
case
3
:
refName
=
'detailFrom'
;
break
;
case
4
:
refName
=
'annex'
;
break
;
}
// console.log(this.$refs[refName].saveFromData());
this
.
$refs
[
refName
].
saveFromData
().
then
(
res
=>
{
this
.
tabConfig
[
val
].
flag
=
true
uni
.
showToast
({
title
:
'保存成功'
,
icon
:
'none'
,
duration
:
1000
})
}).
catch
(
err
=>
{
this
.
tabConfig
[
val
].
flag
=
false
})
},
// 新增人员选择项目职责
checkBoxChange
(
e
)
{
this
.
personDialogData
.
itemDuty
=
e
.
detail
.
value
.
join
(
'、'
)
},
showDialogType
(
val
)
{
this
.
dialogShow
=
true
if
(
val
==
'type'
)
{
let
year
=
new
Date
().
getFullYear
()
this
.
dialogCofig
=
{
width
:
'480px'
,
left
:
'0'
,
top
:
'40px'
,
type
:
1
,
dataList
:
reportNameList
}
}
else
{
this
.
dialogCofig
=
{
width
:
'404px'
,
left
:
'0'
,
top
:
'40px'
,
type
:
2
,
dataList
:
connectionList
}
}
},
// 点击返回
back
()
{
// console.log('点击了返回',this.isCom);`
if
(
!
this
.
isCom
)
{
this
.
$refs
.
inputDialog
.
open
()
}
else
{
uni
.
redirectTo
({
url
:
"/pages/report/report"
})
}
// uni.navigateBack()
},
dialogInputConfirm
()
{
uni
.
navigateBack
()
},
onClickItem
(
e
)
{
this
.
current
=
e
},
maskClick
(
e
)
{
console
.
log
(
e
);
},
collapseChange
()
{
this
.
isShow
=
!
this
.
isShow
},
addPerson
()
{
this
.
addDialog
=
true
},
closeAddDialog
()
{
this
.
addDialog
=
false
},
savePerson
()
{
this
.
$refs
.
personDialogDataForm
.
validate
().
then
(
res
=>
{
this
.
$refs
.
overview
.
addData
(
this
.
personDialogData
)
this
.
addDialog
=
false
this
.
personDialogData
=
{
name
:
''
,
itemDuty
:
''
,
phone
:
''
}
})
},
saveData
(
data
,
status
)
{
//每个项的内容
console
.
log
(
data
,
'保存数据'
);
this
.
baseFormData
=
{
...
this
.
baseFormData
,
...
data
}
if
(
this
.
baseFormData
.
uid
)
{
console
.
log
(
'已存在该报告'
,
this
.
baseFormData
);
this
.
$store
.
state
.
all_data
.
map
((
item
,
index
)
=>
{
if
(
this
.
baseFormData
.
uid
==
item
.
uid
)
{
this
.
$store
.
state
.
all_data
.
splice
(
index
,
1
,
this
.
baseFormData
)
}
})
}
else
{
console
.
log
(
'第一次保存该报告'
);
let
timeStr
=
getDateTime
.
dateTimeStr
(
'y-m-d h:i'
)
this
.
baseFormData
.
type
=
'3'
//报告为3
this
.
baseFormData
.
oid
=
this
.
$store
.
state
.
now_user
.
areaName
//区域名
this
.
baseFormData
.
status
=
'编辑中'
//pad端添加状态
this
.
baseFormData
.
isDel
=
'0'
this
.
baseFormData
.
id
=
''
this
.
baseFormData
.
resultAndProposes
=
[]
this
.
baseFormData
.
createBy
=
this
.
$store
.
state
.
now_user
.
name
,
this
.
baseFormData
.
creatTime
=
timeStr
this
.
baseFormData
.
uid
=
this
.
$store
.
state
.
now_user
.
oid
+
Number
(
Math
.
random
().
toString
().
substr
(
3
,
10
)
+
Date
.
now
()).
toString
(
36
);
this
.
$store
.
state
.
all_data
.
push
(
this
.
baseFormData
)
let
operData
=
{
name
:
this
.
$store
.
state
.
now_user
.
name
,
level
:
'秘密'
,
user
:
this
.
$store
.
state
.
now_user
.
user
,
module
:
'报告'
,
detail
:
this
.
baseFormData
.
reportName
+
'('
+
this
.
baseFormData
.
number
+
')'
,
type
:
this
.
$store
.
state
.
oper_type
,
time
:
timeStr
}
this
.
$store
.
state
.
oper_record
.
unshift
(
operData
)
//保存该操作记录
}
},
saveReport
()
{
// console.log('保存了', this.baseFormData);
// return
if
(
this
.
$store
.
state
.
oper_type
==
'新增'
)
{
this
.
baseFormData
.
status
=
'待同步'
//pad端添加状态
this
.
$store
.
state
.
all_data
.
map
((
item
,
index
)
=>
{
if
(
this
.
baseFormData
.
uid
==
item
.
uid
)
{
this
.
$store
.
state
.
all_data
.
splice
(
index
,
1
,
this
.
baseFormData
)
}
})
}
else
if
(
this
.
$store
.
state
.
oper_type
==
'编辑'
)
{
this
.
baseFormData
.
status
=
'待同步'
//pad端添加状态
this
.
$store
.
state
.
all_data
.
map
((
item
,
index
)
=>
{
if
(
this
.
baseFormData
.
uid
==
item
.
uid
)
{
this
.
$store
.
state
.
all_data
.
splice
(
index
,
1
,
this
.
baseFormData
)
}
})
let
timeStr
=
getDateTime
.
dateTimeStr
(
'y-m-d h:i'
)
let
operData
=
{
name
:
this
.
$store
.
state
.
now_user
.
name
,
level
:
'秘密'
,
user
:
this
.
$store
.
state
.
now_user
.
user
,
module
:
'报告'
,
detail
:
this
.
baseFormData
.
reportName
+
'('
+
this
.
baseFormData
.
number
+
')'
,
type
:
this
.
$store
.
state
.
oper_type
,
time
:
timeStr
}
this
.
$store
.
state
.
oper_record
.
unshift
(
operData
)
//保存该操作记录
}
uni
.
showToast
({
title
:
'保存成功'
,
icon
:
'none'
,
duration
:
2000
})
if
(
this
.
$store
.
state
.
oper_type
==
'新增'
)
{
uni
.
redirectTo
({
url
:
"/pages/report/report"
})
}
else
if
(
this
.
$store
.
state
.
oper_type
==
'编辑'
)
{
uni
.
navigateBack
()
}
},
}
}
</
script
>
<
style
scoped
lang=
"less"
>
.submit-class {
.submit-button {
background-color: #5474e8;
box-shadow: 0px 3px 6px 0px rgba(84, 116, 232, 0.16);
}
}
.test-mask {
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0);
transition-duration: 0.3s;
position: absolute;
top: 0;
left: 0;
z-index: 1;
// border: 1px solid red;
}
.content {
width: 100%;
height: 100%;
position: relative;
.cloack {
position: fixed;
bottom: 0px;
top: 0px;
left: 0px;
right: 0px;
background-color: rgba(0, 0, 0, 0);
transition-duration: 0.3s;
z-index: 996;
// background-color: red;
// border: 1px solid red;
// overflow-y: auto;
}
// background-color: aquamarine;
}
.demo-uni-row {
span {
color: #32343b;
margin-right: 10px;
}
image {
width: 17px;
}
}
.segmented-control[data-v-064e9cd1] {
border-bottom: 2px solid rgba(119, 140, 162, .1) !important;
}
.add-person-dialog {
position: absolute;
top: 0;
// top: 50%;
// left: 50%;
// transform: translate(-50%,-50%);
width: 100%;
height: 100vh;
.dialog-mask {
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, .3);
}
.dialog-from {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 500px;
// height: 300px;
background-color: #ffffff;
padding: 10px;
.close-icon {
position: absolute;
right: 5px;
top: 5px;
}
.add-person-btn {
width: 76.47rpx;
height: 28.24rpx;
line-height: 28.24rpx;
font-size: 16px;
background-color: #5474e8;
box-shadow: 0px 3px 6px 0px rgba(84, 116, 232, 0.16);
border-radius: 10px !important;
}
}
}
.main {
width: 100%;
// height: calc(100% - 57px);
// background-color: red;
background-image: linear-gradient(0deg, #f3f6fa 0%, rgba(130, 153, 238, 0.73) 49%, #5474e8 100%);
background-size: 100% 40rpx;
background-repeat: no-repeat;
}
.checkbox-list {
width: 300px;
margin-left: 140px;
margin-top: -10px;
margin-bottom: 10px;
padding-left: 10px;
}
.collapse-box {
width: 730rpx;
margin: 0 auto;
padding: 10px 10px 0 10px;
background-color: #ffffff;
box-shadow: 0px 0px 6px 0px rgba(84, 116, 232, 0.16);
border-radius: 10px;
margin-bottom: 12rpx;
position: relative;
min-height: 35rpx;
.collapse-box-icon {
position: absolute;
right: 10px;
top: 10px;
width: 14px;
height: 14px;
// background-color: red;
image {
width: 100%;
height: 100%;
}
}
}
.from-title {
display: flex;
align-items: center;
justify-content: space-between;
font-size: 18px !important;
.line-class {
display: inline-block;
width: 2px;
height: 18px;
background-color: #5474e8;
margin-right: 5px;
}
margin-bottom: 5px;
.from-title-item {
display: flex;
align-items: center;
}
}
.bottom-box {
width: 726.5rpx;
height: 275rpx;
margin: 0 auto;
padding: 10px 10px 0 10px;
background-color: #ffffff;
box-shadow: 0px 0px 6px 0px rgba(84, 116, 232, 0.16);
border-radius: 10px;
position: relative;
.btn-box {
width: 726.5rpx;
height: 60px;
border-radius: 0 0 10px 10px;
position: fixed;
left: 13rpx;
bottom: 15rpx;
background-color: #ffffff;
// border: 1px solid red;
display: flex;
align-items: center;
.saveBtn {
background-color: #5474e8;
box-shadow: 0px 3px 6px 0px rgba(84, 116, 232, 0.16);
// border-radius: 10px;
}
}
}
.scroll-y {
width: 100%;
height: 175.76rpx;
overflow: hidden;
overflow-y: auto;
}
.content-box {
width: 100%;
height: 100%;
padding-top: 10px;
}
</
style
>
\ No newline at end of file
pages/report/reportInfo.vue
deleted
100644 → 0
浏览文件 @
f61c28db
<
template
>
<view
class=
"content"
>
<!-- 导航栏 -->
<uni-nav-bar
left-icon=
"left"
left-text=
"返回"
:fixed=
"true"
background-color=
"#5474e8"
status-bar
dark
title=
"杭州内网监管在线"
rightText=
"查看样表"
@
clickLeft=
"back(baseFormData)"
@
clickRight=
"lookTable"
/>
<view
class=
"main"
>
<view
class=
"test-mask"
v-if=
"dialogShow"
@
tap=
"closeDialog"
></view>
<!-- 基本信息 -->
<view
class=
"collapse-box"
>
<view
class=
"from-title"
>
<view
class=
"from-title-item"
>
<span
class=
"line-class"
></span>
基本信息
</view>
</view>
<view
class=
"collapse-box-icon"
@
tap=
"collapseChange"
>
<image
src=
"../../static/img/upArrow.png"
mode=
""
v-show=
"!isShow"
></image>
<image
src=
"../../static/img/downArrow.png"
mode=
""
v-show=
"isShow"
></image>
</view>
<uni-forms
v-if=
"isShow"
ref=
"baseForm"
:modelValue=
"baseFormData"
label-width=
"100px"
label-align=
"right"
>
<uni-row
class=
"demo-uni-row"
>
<uni-col
:span=
"8"
>
<uni-forms-item
label=
"编号:"
required
>
<uni-easyinput
:maxlength=
"50"
v-model=
"baseFormData.number"
/>
</uni-forms-item>
</uni-col>
<uni-col
:span=
"8"
style=
"padding: 0 5px;"
>
<uni-forms-item
label=
"报告类型:"
required
>
<uni-data-select
v-model=
"baseFormData.reportType"
:localdata=
"typeRange"
>
</uni-data-select>
</uni-forms-item>
</uni-col>
<uni-col
:span=
"8"
>
<uni-forms-item
label=
"运维单位:"
required
>
<uni-easyinput
v-model=
"baseFormData.operationUnit "
:disabled=
"true"
/>
</uni-forms-item>
</uni-col>
</uni-row>
<uni-row
class=
"demo-uni-row"
>
<uni-col
:span=
"8"
>
<uni-forms-item
label=
"报告名称:"
required
>
<hintInput
:disabled=
"!baseFormData.reportName"
v-model=
"baseFormData.reportName"
@
fous=
"showDialogType('type')"
:configData=
'dialogCofig'
:isShow=
"dialogShow"
>
</hintInput>
</uni-forms-item>
</uni-col>
<uni-col
:span=
"8"
style=
"padding: 0 5px;"
>
<uni-forms-item
label=
"客户单位:"
required
>
<hintInput
:maxlength=
"50"
:disabled=
"!baseFormData.customerUnit"
v-model=
"baseFormData.customerUnit"
@
fous=
"showDialogType('unit')"
:configData=
'dialogCofig'
:isShow=
hintInput"dialogShow"
>
</hintInput>
</uni-forms-item>
</uni-col>
<uni-col
:span=
"8"
>
<uni-forms-item
label=
"运维日期:"
required
>
<uni-datetime-picker
type=
"date"
:clear-icon=
"false"
v-model=
"baseFormData.time"
@
maskClick=
"maskClick"
/>
</uni-forms-item>
</uni-col>
</uni-row>
</uni-forms>
</view>
<view
class=
"bottom-box"
:style=
"!isShow ? 'height: 352rpx' : ''"
>
<view
class=
"from-title"
>
<view
class=
"from-title-item"
>
<span
class=
"line-class"
></span>
报告内容
</view>
<view
class=
"submit-class"
v-if=
"baseFormData.status !== '待同步'"
>
<button
size=
"mini"
type=
"primary"
class=
"submit-button"
:disabled=
"!isCom"
@
tap=
"saveReport"
>
提交
</button>
</view>
</view>
<!-- 报告内容 -->
<view
class=
"uni-padding-wrap "
>
<segmentedControl
:tabConfig=
"tabConfig"
@
clickItem=
"onClickItem"
:currentIndex
.
sync=
"current"
>
</segmentedControl>
</view>
<view
class=
"scroll-y"
:style=
"!isShow ? 'height: 254rpx' : ''"
>
<view
class=
"content-box"
>
<view
v-show=
"current === 0"
>
<overview
@
add=
'addPerson'
@
save=
'saveData'
ref=
"overview"
></overview>
</view>
<view
v-show=
"current === 1"
>
<equipment
ref=
"equipment"
></equipment>
</view>
<view
v-show=
"current === 2"
>
<checkContent
ref=
"checkContent"
@
save=
'saveData'
></checkContent>
</view>
<view
v-show=
"current === 3"
>
<detailFrom
ref=
"detailFrom"
@
save=
'saveData'
@
nowFill=
'nowFill'
></detailFrom>
</view>
<view
v-show=
"current === 4"
>
<annex
ref=
"annex"
@
save=
'saveData'
></annex>
</view>
</view>
</view>
<view
class=
"btn-box box-shaow-box"
>
<view
v-show=
"current === 3"
class=
"btn-title"
>
当前填写:
<span
style=
"color: #5474e8;"
>
{{
nowFillTitle
}}
</span>
</view>
<button
type=
"warn"
class=
"delBtn"
size=
"mini"
@
tap=
"delReport"
>
删除
</button>
<button
type=
"primary"
class=
"saveBtn"
size=
"mini"
@
tap=
"clickSave(current)"
>
保存草稿
</button>
</view>
</view>
</view>
<view
class=
"add-person-dialog"
v-if=
"addDialog"
>
<view
class=
"dialog-mask"
>
</view>
<view
class=
"dialog-from"
>
<view
class=
"from-title"
>
<view
class=
"from-title-item"
>
<span
class=
"line-class"
></span>
编辑
</view>
</view>
<uni-icons
class=
"close-icon"
type=
"closeempty"
size=
"20"
@
tap=
"closeAddDialog"
></uni-icons>
<uni-forms
ref=
"personDialogDataForm"
:rules=
"personRules"
:modelValue=
"personDialogData"
label-align=
"right"
label-width=
"140px"
>
<uni-forms-item
label=
"姓名:"
name=
"name"
required
>
<uni-easyinput
:maxlength=
"20"
v-model=
"personDialogData.name"
style=
"width: 300px;"
/>
</uni-forms-item>
<uni-forms-item
label=
"本项目中的职责:"
name=
"itemDuty"
required
>
<uni-easyinput
:maxlength=
"100"
v-model=
"personDialogData.itemDuty"
style=
"width: 300px;"
/>
</uni-forms-item>
<view
class=
"checkbox-list box-shaow-box"
>
<uni-data-checkbox
mode=
"tag"
multiple
@
change=
"checkBoxChange"
:localdata=
"Responsibilities"
>
</uni-data-checkbox>
</view>
<uni-forms-item
label=
"联系方式:"
name=
"phone"
required
>
<uni-easyinput
:maxlength=
"20"
type=
"number"
v-model=
"personDialogData.phone"
style=
"width: 300px;"
/>
</uni-forms-item>
<button
class=
"add-person-btn"
type=
"primary"
style=
" border-radius: 0%;"
@
tap=
"savePerson"
>
保存
</button>
</uni-forms>
</view>
</view>
<uni-popup
ref=
"inputDialog"
background-color=
"#fff"
v-if=
"$store.state.oper_type == '新增'"
>
<!--
<uni-popup-dialog
ref=
"inputClose"
mode=
"base"
title=
"
返回后,系统自动生成报告记录"
@
confirm=
"dialogInputConfirm"
confirmText=
"知道了"
>
</uni-popup-dialog>
-->
<view
class=
"popup-content"
>
<text
class=
"text"
>
返回后,系统自动生成报告记录
</text>
</view>
<view
class=
"popup-content"
>
<button
class=
"dialog-btn"
type=
"primary"
size=
"mini"
@
click=
"dialogInputConfirm"
>
知道了
</button>
</view>
</uni-popup>
<uni-popup
ref=
"inputDialog"
type=
"dialog"
v-else
>
<uni-popup-dialog
ref=
"inputClose"
mode=
"base"
title=
"未确认保存的数据,返回后自动清空."
@
confirm=
"dialogInputConfirm"
confirmText=
"确认"
>
</uni-popup-dialog>
</uni-popup>
<!-- 删除提示框 -->
<uni-popup
ref=
"inputDialog2"
type=
"dialog"
>
<uni-popup-dialog
ref=
"inputClose"
mode=
"base"
title=
"删除"
@
confirm=
"dialogInputConfirm2"
>
<view
class=
"content-pop"
>
编号:
{{
popupTitle
.
number
}}
的
{{
popupTitle
.
name
}}
,确认删除?
</view>
</uni-popup-dialog>
</uni-popup>
</view>
</
template
>
<
script
>
import
segmentedControl
from
"@/components/global/segmentedControl.vue"
import
equipment
from
"@/components/reportContent/equipment.vue"
import
overview
from
"@/components/reportContent/overview.vue"
import
checkContent
from
"@/components/reportContent/checkContent.vue"
import
resAndOps
from
"@/components/reportContent/resultsAndOpinions.vue"
import
detailFrom
from
"@/components/reportContent/detailFrom.vue"
import
annex
from
"@/components/reportContent/annex.vue"
import
{
reportNameList
,
connectionList
,
responsibilityList
}
from
'../../static/json/commonObj.js'
import
hintInput
from
"@/components/hintInput/hintInput.vue"
import
getDateTime
from
"@/common/getdateTime.js"
export
default
{
components
:
{
equipment
,
overview
,
checkContent
,
resAndOps
,
detailFrom
,
annex
,
segmentedControl
,
hintInput
},
// 定义返回退出
onBackPress
(
options
)
{
// 触发返回就会调用此方法,这里实现的是禁用物理返回,顶部导航栏的自定义返回 uni.navigateBack 仍可使用
if
(
options
.
from
==
'backbutton'
)
{
if
(
this
.
baseFormData
.
status
==
'已同步'
)
{
uni
.
navigateBack
()
}
else
{
if
(
!
this
.
isCom
)
{
this
.
$refs
.
inputDialog
.
open
()
}
else
{
uni
.
navigateBack
()
}
}
return
true
;
}
else
if
(
options
.
from
==
'navigateBack'
)
{
return
false
;
}
},
onLoad
(
option
)
{
if
(
option
.
queryData
)
{
this
.
baseFormData
=
JSON
.
parse
(
decodeURIComponent
(
option
.
queryData
))
}
else
{
//点击编辑进入将数据重新赋值
if
(
JSON
.
stringify
(
this
.
$store
.
state
.
temp_data
)
!==
'{}'
)
{
let
obj
=
this
.
$store
.
state
.
temp_data
// console.log('当前数据',obj);
// Object.keys(this.baseFormData).forEach(key => {
// this.baseFormData[key] = obj[key] || this.baseFormData[key]
// })
this
.
baseFormData
=
obj
}
}
responsibilityList
.
forEach
(
item
=>
{
this
.
Responsibilities
.
push
({
text
:
item
.
label
,
value
:
item
.
label
})
})
},
provide
()
{
return
{
add
:
this
.
add
,
flagObj
:
this
.
flagObj
}
},
data
()
{
return
{
dialogShow
:
false
,
scrollTop
:
0
,
dialogCofig
:
{},
isShow
:
false
,
tabConfig
:
[{
label
:
'运维概述'
,
flag
:
false
},
{
label
:
'运维机具一览表'
,
flag
:
false
},
{
label
:
'运维检查内容'
,
flag
:
false
},
{
label
:
'详细运维表单+运维结果及意见建议'
,
flag
:
false
},
{
label
:
'附件表'
,
flag
:
false
},
],
typeRange
:
[{
value
:
'运维报告'
,
text
:
'运维报告'
},
{
value
:
'巡检报告'
,
text
:
'巡检报告'
},
],
typeShow
:
false
,
//弹窗显示
unitShow
:
false
,
personRules
:
{
name
:
{
rules
:
[{
required
:
true
,
errorMessage
:
'请输入姓名'
,
}]
},
itemDuty
:
{
rules
:
[{
required
:
true
,
errorMessage
:
'请输入'
,
}]
},
phone
:
{
rules
:
[{
required
:
true
,
errorMessage
:
'请输入联系方式'
,
}]
},
},
//路由参数
queryData
:
{},
baseFormData
:
{
number
:
''
,
reportType
:
''
,
operationUnit
:
''
,
reportName
:
''
,
customerUnit
:
''
,
time
:
''
,
uid
:
''
,
type
:
''
,
oid
:
''
,
status
:
''
,
isDel
:
''
,
id
:
''
,
resultAndProposes
:
[],
createBy
:
''
,
creatTime
:
''
},
personDialogData
:
{
name
:
''
,
itemDuty
:
''
,
phone
:
''
},
current
:
0
,
styleType
:
'text'
,
activeColor
:
'#5474e8'
,
tabs
:
[
'运维概述'
,
'运维机具一览表'
,
'运维检查内容'
,
'详细运维表单+运维结果及意见建议'
,
'附件表'
],
value
:
[
'0'
],
addDialog
:
false
,
Responsibilities
:
[],
typeFrom
:
[
'巡检报告'
,
'运维报告'
],
cloackFlag
:
true
,
reportDto
:
{},
saveNum
:
0
,
isCom
:
false
,
nowFillTitle
:
''
,
popupTitle
:
{
number
:
null
,
name
:
""
},
}
},
watch
:
{
tabConfig
:
{
handler
(
newV
,
oldV
)
{
let
v
=
newV
.
every
(
item
=>
{
return
item
.
flag
})
if
(
v
)
{
//全部都保存成功
this
.
isCom
=
true
// this.saveReport()
}
else
{
this
.
isCom
=
false
// console.log('还有未保存');
}
},
deep
:
true
},
},
methods
:
{
delReport
()
{
this
.
$refs
.
inputDialog2
.
open
()
this
.
popupTitle
.
number
=
this
.
baseFormData
.
number
this
.
popupTitle
.
name
=
this
.
baseFormData
.
reportName
},
dialogInputConfirm2
()
{
this
.
$store
.
state
.
all_data
.
map
((
item
,
index
)
=>
{
if
(
item
.
uid
==
this
.
baseFormData
.
uid
)
{
console
.
log
(
'删除'
);
this
.
$store
.
commit
(
'DEL_DATA'
,
index
)
// this.$store.state.all_data.splice(index, 1)
let
timeStr
=
getDateTime
.
dateTimeStr
(
'y-m-d h:i'
)
let
operData
=
{
name
:
this
.
$store
.
state
.
now_user
.
name
,
level
:
'秘密'
,
user
:
this
.
$store
.
state
.
now_user
.
user
,
module
:
'报告'
,
detail
:
item
.
reportName
+
'('
+
item
.
number
+
')'
,
type
:
'删除'
,
time
:
timeStr
}
this
.
$store
.
state
.
oper_record
.
unshift
(
operData
)
uni
.
showToast
({
title
:
'删除成功'
,
icon
:
'none'
,
duration
:
2000
})
}
})
uni
.
navigateBack
()
},
nowFill
(
val
){
this
.
nowFillTitle
=
val
},
closeDialog
()
{
this
.
dialogShow
=
false
this
.
$store
.
commit
(
'set_FLAG'
,
false
)
},
handlerShow
()
{},
scrollChange
(
e
)
{
this
.
scrollTop
=
e
.
target
.
scrollTop
},
add
(
e
)
{
let
top
=
this
.
$store
.
state
.
scroll_top
// console.log(top, '距离顶部距离');
if
(
top
)
{
// if(top >= 510){
// uni.pageScrollTo({
// scrollTop:this.scrollTop += 100
// })
// }
}
},
lookTable
()
{
uni
.
navigateTo
({
url
:
"/pages/report/sampleTable"
})
},
clickSave
(
val
)
{
// console.log('现在保存的是', val);
let
refName
=
''
switch
(
val
)
{
case
0
:
refName
=
'overview'
;
break
;
case
1
:
refName
=
'equipment'
;
break
;
case
2
:
refName
=
'checkContent'
;
break
;
case
3
:
refName
=
'detailFrom'
;
break
;
case
4
:
refName
=
'annex'
;
break
;
}
// console.log(this.$refs[refName].saveFromData());
this
.
$refs
[
refName
].
saveFromData
().
then
(
res
=>
{
this
.
tabConfig
[
val
].
flag
=
true
uni
.
showToast
({
title
:
'保存成功'
,
icon
:
'none'
,
duration
:
1000
})
}).
catch
(
err
=>
{
this
.
tabConfig
[
val
].
flag
=
false
})
},
// 新增人员选择项目职责
checkBoxChange
(
e
)
{
this
.
personDialogData
.
itemDuty
=
e
.
detail
.
value
.
join
(
'、'
)
},
showDialogType
(
val
)
{
this
.
dialogShow
=
true
if
(
val
==
'type'
)
{
let
year
=
new
Date
().
getFullYear
()
this
.
dialogCofig
=
{
width
:
'480px'
,
left
:
'0'
,
top
:
'40px'
,
type
:
1
,
dataList
:
reportNameList
}
}
else
{
this
.
dialogCofig
=
{
width
:
'404px'
,
left
:
'0'
,
top
:
'40px'
,
type
:
2
,
dataList
:
connectionList
}
}
},
// 点击返回
back
(
val
)
{
if
(
val
.
status
==
'已同步'
)
{
uni
.
navigateBack
()
}
else
{
if
(
!
this
.
isCom
)
{
this
.
$refs
.
inputDialog
.
open
()
}
else
{
uni
.
navigateBack
()
}
}
},
dialogInputConfirm
()
{
// uni.redirectTo({
// url: "/pages/report/report"
// })
uni
.
navigateBack
()
},
onClickItem
(
e
)
{
this
.
current
=
e
},
maskClick
(
e
)
{
console
.
log
(
e
);
},
collapseChange
()
{
this
.
isShow
=
!
this
.
isShow
},
addPerson
()
{
this
.
addDialog
=
true
},
closeAddDialog
()
{
this
.
addDialog
=
false
},
savePerson
()
{
this
.
$refs
.
personDialogDataForm
.
validate
().
then
(
res
=>
{
this
.
$refs
.
overview
.
addData
(
this
.
personDialogData
)
this
.
addDialog
=
false
this
.
personDialogData
=
{
name
:
''
,
itemDuty
:
''
,
phone
:
''
}
})
},
saveData
(
data
,
status
)
{
//每个项的内容
this
.
baseFormData
=
{
...
this
.
baseFormData
,
...
data
}
// console.log(this.baseFormData, '保存数据');
if
(
this
.
baseFormData
.
uid
)
{
// console.log('已存在该报告',this.baseFormData);
this
.
$store
.
state
.
all_data
.
map
((
item
,
index
)
=>
{
if
(
this
.
baseFormData
.
uid
==
item
.
uid
)
{
this
.
$store
.
state
.
all_data
.
splice
(
index
,
1
,
this
.
baseFormData
)
//每保存一项内容就保存到缓存
}
})
uni
.
showToast
({
title
:
'保存成功'
,
icon
:
'none'
,
duration
:
2000
})
}
},
saveReport
()
{
// console.log('保存了', this.baseFormData);
// return
this
.
baseFormData
.
status
=
'待同步'
//pad端添加状态
this
.
$store
.
state
.
all_data
.
map
((
item
,
index
)
=>
{
if
(
this
.
baseFormData
.
uid
==
item
.
uid
)
{
this
.
$store
.
state
.
all_data
.
splice
(
index
,
1
,
this
.
baseFormData
)
}
})
// if (this.$store.state.oper_type == '编辑') {
// let timeStr = getDateTime.dateTimeStr('y-m-d h:i')
// let operData = {
// name: this.$store.state.now_user.name,
// level: '秘密',
// user: this.$store.state.now_user.user,
// module: '报告',
// detail: this.baseFormData.reportName + '(' + this.baseFormData.number + ')',
// type: this.$store.state.oper_type,
// time: timeStr
// }
// this.$store.state.oper_record.unshift(operData) //保存该操作记录
// }
uni
.
showToast
({
title
:
'保存成功'
,
icon
:
'none'
,
duration
:
2000
})
if
(
this
.
$store
.
state
.
oper_type
==
'新增'
)
{
uni
.
redirectTo
({
url
:
"/pages/report/report"
})
}
else
if
(
this
.
$store
.
state
.
oper_type
==
'编辑'
)
{
uni
.
navigateBack
()
}
},
}
}
</
script
>
<
style
scoped
lang=
"less"
>
.popup-content {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: center;
padding: 15px;
height: 50px;
background-color: #fff;
}
.dialog-btn{
background-color: #5474e8;
}
.submit-class {
.submit-button {
background-color: #5474e8;
box-shadow: 0px 3px 6px 0px rgba(84, 116, 232, 0.16);
}
}
.test-mask {
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0);
transition-duration: 0.3s;
position: absolute;
top: 0;
left: 0;
z-index: 1;
// border: 1px solid red;
}
.content {
width: 100%;
height: 100%;
position: relative;
.cloack {
position: fixed;
bottom: 0px;
top: 0px;
left: 0px;
right: 0px;
background-color: rgba(0, 0, 0, 0);
transition-duration: 0.3s;
z-index: 996;
// background-color: red;
// border: 1px solid red;
// overflow-y: auto;
}
// background-color: aquamarine;
}
.demo-uni-row {
span {
color: #32343b;
margin-right: 10px;
}
image {
width: 17px;
}
}
.segmented-control[data-v-064e9cd1] {
border-bottom: 2px solid rgba(119, 140, 162, .1) !important;
}
.add-person-dialog {
position: absolute;
top: 0;
// top: 50%;
// left: 50%;
// transform: translate(-50%,-50%);
width: 100%;
height: 100vh;
.dialog-mask {
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, .3);
}
.dialog-from {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 500px;
// height: 300px;
background-color: #ffffff;
padding: 10px;
.close-icon {
position: absolute;
right: 5px;
top: 5px;
}
.add-person-btn {
width: 76.47rpx;
height: 28.24rpx;
line-height: 28.24rpx;
font-size: 16px;
background-color: #5474e8;
box-shadow: 0px 3px 6px 0px rgba(84, 116, 232, 0.16);
border-radius: 10px !important;
}
}
}
.main {
width: 100%;
// height: calc(100% - 57px);
// background-color: red;
background-image: linear-gradient(0deg, #f3f6fa 0%, rgba(130, 153, 238, 0.73) 49%, #5474e8 100%);
background-size: 100% 40rpx;
background-repeat: no-repeat;
}
.checkbox-list {
width: 300px;
margin-left: 140px;
margin-top: -10px;
margin-bottom: 10px;
padding-left: 10px;
}
.collapse-box {
width: 730rpx;
margin: 0 auto;
padding: 10px 10px 0 10px;
background-color: #ffffff;
box-shadow: 0px 0px 6px 0px rgba(84, 116, 232, 0.16);
border-radius: 10px;
margin-bottom: 12rpx;
position: relative;
min-height: 35rpx;
.collapse-box-icon {
position: absolute;
right: 10px;
top: 10px;
width: 14px;
height: 14px;
// background-color: red;
image {
width: 100%;
height: 100%;
}
}
}
.from-title {
display: flex;
align-items: center;
justify-content: space-between;
font-size: 18px !important;
.line-class {
display: inline-block;
width: 2px;
height: 18px;
background-color: #5474e8;
margin-right: 5px;
}
margin-bottom: 5px;
.from-title-item {
display: flex;
align-items: center;
}
}
.bottom-box {
width: 726.5rpx;
height: 275rpx;
margin: 0 auto;
padding: 10px 10px 0 10px;
background-color: #ffffff;
box-shadow: 0px 0px 6px 0px rgba(84, 116, 232, 0.16);
border-radius: 10px;
position: relative;
.btn-box {
width: 726.5rpx;
height: 60px;
border-radius: 0 0 10px 10px;
position: fixed;
left: 13rpx;
bottom: 15rpx;
background-color: #ffffff;
// border: 1px solid red;
// display: flex;
// align-items: center;
.btn-title{
margin-top: 20px;
margin-left: 20px;
}
.saveBtn {
background-color: #5474e8;
box-shadow: 0px 3px 6px 0px rgba(84, 116, 232, 0.16);
position: absolute;
top: 50%;
left: 55%;
transform: translate(-50%,-50%);
// border-radius: 10px;
}
.delBtn{
box-shadow: 0px 3px 6px 0px rgba(84, 116, 232, 0.16);
position: absolute;
top: 50%;
left: 45%;
transform: translate(-50%,-50%);
}
}
}
.scroll-y {
width: 100%;
height: 175.76rpx;
overflow: hidden;
overflow-y: auto;
}
.content-box {
width: 100%;
height: 100%;
padding-top: 10px;
}
</
style
>
\ No newline at end of file
pages/report/sampleTable.vue
浏览文件 @
e0881957
...
@@ -90,7 +90,7 @@ export default {
...
@@ -90,7 +90,7 @@ export default {
justify-sampletable: space-between;
justify-sampletable: space-between;
.image-item {
.image-item {
width:
7
0%;
width:
6
0%;
// height: 100%;
// height: 100%;
background-color: #ffffff;
background-color: #ffffff;
box-shadow: 0px 0px 9.41rpx 0px rgba(84, 116, 232, 0.2);
box-shadow: 0px 0px 9.41rpx 0px rgba(84, 116, 232, 0.2);
...
...
pages/synchronization/synchronization.vue
浏览文件 @
e0881957
...
@@ -289,7 +289,7 @@
...
@@ -289,7 +289,7 @@
}
}
let
timeStr
=
getDateTime
.
dateTimeStr
(
'y-m-d h:i'
)
let
timeStr
=
getDateTime
.
dateTimeStr
(
'y-m-d h:i'
)
let
operData
=
{
let
operData
=
{
name
:
this
.
$store
.
state
.
now_use
r
.
name
,
name
:
this
.
$store
.
state
.
now_use
.
user
,
level
:
'秘密'
,
level
:
'秘密'
,
user
:
this
.
$store
.
state
.
now_user
.
user
,
user
:
this
.
$store
.
state
.
now_user
.
user
,
module
:
moduleName
,
module
:
moduleName
,
...
@@ -336,7 +336,7 @@
...
@@ -336,7 +336,7 @@
}
}
let
timeStr
=
getDateTime
.
dateTimeStr
(
'y-m-d h:i'
)
let
timeStr
=
getDateTime
.
dateTimeStr
(
'y-m-d h:i'
)
let
operData
=
{
let
operData
=
{
name
:
this
.
$store
.
state
.
now_use
r
.
name
,
name
:
this
.
$store
.
state
.
now_use
.
user
,
level
:
'秘密'
,
level
:
'秘密'
,
user
:
this
.
$store
.
state
.
now_user
.
user
,
user
:
this
.
$store
.
state
.
now_user
.
user
,
module
:
moduleName
,
module
:
moduleName
,
...
@@ -371,7 +371,7 @@
...
@@ -371,7 +371,7 @@
// }
// }
// let timeStr = getDateTime.dateTimeStr('y-m-d h:i')
// let timeStr = getDateTime.dateTimeStr('y-m-d h:i')
// let operData = {
// let operData = {
// name: this.$store.state.now_use
r.name
,
// name: this.$store.state.now_use
.user
,
// level: '秘密',
// level: '秘密',
// user: this.$store.state.now_user.user,
// user: this.$store.state.now_user.user,
// module: moduleName,
// module: moduleName,
...
...
pages/synchronousManagement/dialog.vue
浏览文件 @
e0881957
...
@@ -128,7 +128,7 @@ export default {
...
@@ -128,7 +128,7 @@ export default {
},
},
// 处理数据
// 处理数据
coverData
()
{
coverData
()
{
const
userName
=
this
.
$store
.
state
.
now_use
r
.
name
;
const
userName
=
this
.
$store
.
state
.
now_use
.
user
;
const
notSynchronizationList
=
this
.
notSynchronizationList
;
const
notSynchronizationList
=
this
.
notSynchronizationList
;
const
allList
=
this
.
allList
;
const
allList
=
this
.
allList
;
...
@@ -149,7 +149,16 @@ export default {
...
@@ -149,7 +149,16 @@ export default {
const
JDXJ_DATA
=
notSynchronizationList
.
filter
(
const
JDXJ_DATA
=
notSynchronizationList
.
filter
(
(
item
)
=>
item
.
inspectionType
==
2
(
item
)
=>
item
.
inspectionType
==
2
);
// 井道数据类型是 2
).
map
(
item
=>
{
return
item
[
item
.
inspectionCode
]
})
// 井道数据类型是 2
// console.log("---源数据", [...JDXJ_DATA,...JFXJ_DATA] )
// const fileContent = setSm2([...JDXJ_DATA,...JFXJ_DATA]);
// return console.log("--- [...JDXJ_DATA,...JFXJ_DATA]", fileContent )
this
.
loading
=
true
;
this
.
loading
=
true
;
Promise
.
all
([
Promise
.
all
([
...
...
request/index.js
浏览文件 @
e0881957
...
@@ -18,7 +18,7 @@ export const getAllInspections = () => {
...
@@ -18,7 +18,7 @@ export const getAllInspections = () => {
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
const
tempRes
=
lodash
.
orderBy
(
res
,
"creatTime"
,
[
'desc'
]);
const
tempRes
=
lodash
.
orderBy
(
res
,
"creatTime"
,
[
'desc'
]);
const
result
=
lodash
.
orderBy
(
tempRes
,
"synchronization"
,
[
'asc'
]);
const
result
=
lodash
.
orderBy
(
tempRes
,
"synchronization"
,
[
'asc'
]);
console
.
log
(
"---获取所有巡检数据-"
,
result
)
store
.
commit
(
"SET_ALL_DATA"
,
result
);
store
.
commit
(
"SET_ALL_DATA"
,
result
);
resolve
(
result
)
resolve
(
result
)
})
})
...
...
utils/systemCofig.js
浏览文件 @
e0881957
...
@@ -71,7 +71,7 @@ export const USER_LiST = [
...
@@ -71,7 +71,7 @@ export const USER_LiST = [
userId
:
2
,
// 有用
userId
:
2
,
// 有用
user
:
"test1"
,
// 有用 谁创建,谁有权限编辑和删除
user
:
"test1"
,
// 有用 谁创建,谁有权限编辑和删除
passWord
:
"JF123456"
,
// 有用
passWord
:
"JF123456"
,
// 有用
roleName
:
"巡检员
1
"
,
// 有用
roleName
:
"巡检员"
,
// 有用
unitName
:
"巡检员1所属单位"
,
// 所属单位
unitName
:
"巡检员1所属单位"
,
// 所属单位
isAdmin
:
false
,
// 标识超管权限
isAdmin
:
false
,
// 标识超管权限
LastSynchronizationTime
:
""
,
// 上次同步时间
LastSynchronizationTime
:
""
,
// 上次同步时间
...
@@ -80,7 +80,7 @@ export const USER_LiST = [
...
@@ -80,7 +80,7 @@ export const USER_LiST = [
userId
:
3
,
// 有用
userId
:
3
,
// 有用
user
:
"test2"
,
// 有用 谁创建,谁有权限编辑和删除
user
:
"test2"
,
// 有用 谁创建,谁有权限编辑和删除
passWord
:
"JF123456"
,
// 有用
passWord
:
"JF123456"
,
// 有用
roleName
:
"巡检员
2
"
,
// 有用
roleName
:
"巡检员"
,
// 有用
unitName
:
"巡检员1所属单位"
,
// 所属单位
unitName
:
"巡检员1所属单位"
,
// 所属单位
isAdmin
:
false
,
// 标识超管权限
isAdmin
:
false
,
// 标识超管权限
LastSynchronizationTime
:
""
,
// 上次同步时间
LastSynchronizationTime
:
""
,
// 上次同步时间
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论