Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
I
inspection-pad-web
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
专网
inspection-pad-web
Commits
09d732e8
提交
09d732e8
authored
4月 07, 2025
作者:
JaxBBLL
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: change upload comp
上级
c528b6d4
隐藏空白字符变更
内嵌
并排
正在显示
12 个修改的文件
包含
343 行增加
和
257 行删除
+343
-257
init.js
api/sqllite/init.js
+159
-152
index.vue
components/CommonUpload/index.vue
+36
-23
afxt.vue
pages/inspectionContent/components/afxt.vue
+14
-7
dczt.vue
pages/inspectionContent/components/dczt.vue
+14
-7
dlxt.vue
pages/inspectionContent/components/dlxt.vue
+14
-7
jfwsd.vue
pages/inspectionContent/components/jfwsd.vue
+14
-7
qt.vue
pages/inspectionContent/components/qt.vue
+14
-7
sbgj.vue
pages/inspectionContent/components/sbgj.vue
+22
-15
wlhj.vue
pages/inspectionContent/components/wlhj.vue
+14
-7
xfxt.vue
pages/inspectionContent/components/xfxt.vue
+14
-7
xlqk.vue
pages/inspectionContent/components/xlqk.vue
+14
-7
inspectionContentList.vue
pages/inspectionContent/inspectionContentList.vue
+14
-11
没有找到文件。
api/sqllite/init.js
浏览文件 @
09d732e8
import
table
from
'../sqllite/table'
import
_Path
from
'@/constant/ioPath'
import
ioUtil
from
'@/utils/ioUtil'
import
SqlliteDbUtil
from
'@/utils/sqllitedb'
import
userApi
from
'@/api/user'
import
hoistwayApi
from
'@/api/hoistway'
import
assRoomApi
from
'@/api/assRoom.js'
import
hoistwayjson
from
'../../baseData/hoistway.json'
import
userjson
from
'../../baseData/user.json'
import
assroomjson
from
'../../baseData/assroom.json'
import
fileImport
from
'@/utils/fileImport.js'
import
table
from
"../sqllite/table"
;
import
_Path
from
"@/constant/ioPath"
;
import
ioUtil
from
"@/utils/ioUtil"
;
import
SqlliteDbUtil
from
"@/utils/sqllitedb"
;
import
userApi
from
"@/api/user"
;
import
hoistwayApi
from
"@/api/hoistway"
;
import
assRoomApi
from
"@/api/assRoom.js"
;
import
hoistwayjson
from
"../../baseData/hoistway.json"
;
import
userjson
from
"../../baseData/user.json"
;
import
assroomjson
from
"../../baseData/assroom.json"
;
import
fileImport
from
"@/utils/fileImport.js"
;
export
default
{
// app初始化
async
init
()
{
uni
.
showLoading
({
title
:
"正在初始化..."
,
});
// 初始化目录
await
this
.
initDir
();
// 初始化数据库
// cookie.set('initDB', true)
await
this
.
initSqlLite
();
// app初始化
async
init
()
{
// 导入用戶文件文件
// await this.importFileData();
await
userApi
.
saveBatch
(
userjson
);
await
hoistwayApi
.
saveBatch
(
hoistwayjson
);
await
assRoomApi
.
saveBatch
(
assroomjson
);
// 初始化完成通知首页
uni
.
$emit
(
"initDone"
,
"ok"
);
uni
.
hideLoading
();
},
uni
.
showLoading
({
title
:
'正在初始化...'
,
})
// 初始化目录
await
this
.
initDir
()
// 初始化数据库
// cookie.set('initDB', true)
await
this
.
initSqlLite
()
// 检查文件导入
async
importFileData
()
{
// 解压缩需要导入的zip,导入后删除
try
{
console
.
log
(
"解压导入开始...."
);
console
.
log
(
"导入基础数据开始"
);
await
fileImport
.
importBaseFile
();
console
.
log
(
"导入基础数据结束!"
);
console
.
log
(
"解压导入完成...."
);
}
catch
(
e
)
{
console
.
log
(
e
.
message
);
uni
.
showToast
({
icon
:
"none"
,
title
:
e
.
message
,
});
uni
.
hideLoading
();
}
},
// 导入用戶文件文件
// await this.importFileData();
await
userApi
.
saveBatch
(
userjson
)
// await hoistwayApi.saveBatch(hoistwayjson)
// await assRoomApi.saveBatch(assroomjson)
// 初始化完成通知首页
uni
.
$emit
(
"initDone"
,
"ok"
)
uni
.
hideLoading
()
},
////////// 初始化数据库////////////
async
initSqlLite
()
{
console
.
log
(
"初始化数据库开始..."
);
let
sqllitedb
=
null
;
try
{
// 创建打开数据库,已经存在表则跳过
sqllitedb
=
await
SqlliteDbUtil
.
initSqlliteDB
();
console
.
log
(
sqllitedb
,
"是否存在"
);
// console.log('创建用户表...')
await
sqllitedb
.
createTable
(
table
.
userName
,
table
.
user
);
await
sqllitedb
.
createTable
(
table
.
inspectionRecordName
,
table
.
inspectionRecord
);
// 巡检记录表
await
sqllitedb
.
createTable
(
table
.
assRoomName
,
table
.
assRoom
);
// 机房、井道信息表
await
sqllitedb
.
createTable
(
table
.
assBuildingName
,
table
.
assBuilding
);
// 楼宇信息
}
catch
(
e
)
{
console
.
log
(
e
.
message
);
}
finally
{
return
;
// 关闭数据库
if
(
sqllitedb
)
{
await
sqllitedb
.
closeDB
();
}
// 初始化完成后重启APP/退出APP
uni
.
showToast
({
icon
:
"none"
,
title
:
"初始化完毕即将重新加载..."
,
duration
:
3000
,
});
let
that
=
this
;
setTimeout
(
function
()
{
that
.
restartApp
();
},
3000
);
}
},
// 检查文件导入
async
importFileData
()
{
// 解压缩需要导入的zip,导入后删除
try
{
console
.
log
(
'解压导入开始....'
)
console
.
log
(
'导入基础数据开始'
)
await
fileImport
.
importBaseFile
()
console
.
log
(
'导入基础数据结束!'
)
console
.
log
(
'解压导入完成....'
)
}
catch
(
e
)
{
console
.
log
(
e
.
message
)
uni
.
showToast
({
icon
:
'none'
,
title
:
e
.
message
})
uni
.
hideLoading
()
}
},
// 初始化目录
async
initDir
()
{
try
{
const
_www
=
_Path
.
getPrivateWWW
();
const
_doc
=
_Path
.
getPrivateDOC
();
const
_download
=
_Path
.
getDownloads
();
const
_temp
=
_Path
.
getTempPath
();
const
wwwEntry
=
await
ioUtil
.
getFileEntry
(
_www
);
const
docEntry
=
await
ioUtil
.
getFileEntry
(
_doc
);
const
downloadEntry
=
await
ioUtil
.
getFileEntry
(
_download
);
////////// 初始化数据库////////////
async
initSqlLite
()
{
console
.
log
(
'初始化数据库开始...'
)
let
sqllitedb
=
null
try
{
// 创建打开数据库,已经存在表则跳过
sqllitedb
=
await
SqlliteDbUtil
.
initSqlliteDB
()
console
.
log
(
sqllitedb
,
'是否存在'
)
// console.log('创建用户表...')
await
sqllitedb
.
createTable
(
table
.
userName
,
table
.
user
)
await
sqllitedb
.
createTable
(
table
.
inspectionRecordName
,
table
.
inspectionRecord
)
// 巡检记录表
await
sqllitedb
.
createTable
(
table
.
assRoomName
,
table
.
assRoom
)
// 机房、井道信息表
await
sqllitedb
.
createTable
(
table
.
assBuildingName
,
table
.
assBuilding
)
// 楼宇信息
}
catch
(
e
)
{
console
.
log
(
e
.
message
)
}
finally
{
return
// 关闭数据库
if
(
sqllitedb
)
{
await
sqllitedb
.
closeDB
()
}
// 初始化完成后重启APP/退出APP
uni
.
showToast
({
icon
:
'none'
,
title
:
'初始化完毕即将重新加载...'
,
duration
:
3000
})
let
that
=
this
setTimeout
(
function
()
{
that
.
restartApp
()
},
3000
)
}
},
if
(
downloadEntry
)
{
await
ioUtil
.
createDir
(
downloadEntry
.
fullPath
,
"base"
);
await
ioUtil
.
createDir
(
downloadEntry
.
fullPath
,
"export"
);
await
ioUtil
.
createDir
(
downloadEntry
.
fullPath
,
"import"
);
await
ioUtil
.
createDir
(
downloadEntry
.
fullPath
,
"doc"
);
await
ioUtil
.
createDir
(
downloadEntry
.
fullPath
,
"error"
);
}
// 初始化目录
async
initDir
()
{
try
{
const
_www
=
_Path
.
getPrivateWWW
()
const
_doc
=
_Path
.
getPrivateDOC
()
const
_download
=
_Path
.
getDownloads
()
const
_temp
=
_Path
.
getTempPath
()
const
wwwEntry
=
await
ioUtil
.
getFileEntry
(
_www
)
const
docEntry
=
await
ioUtil
.
getFileEntry
(
_doc
)
const
downloadEntry
=
await
ioUtil
.
getFileEntry
(
_download
)
// 获取设备名称
uni
.
getSystemInfo
({
success
:
async
function
(
e
)
{
const
deviceData
=
{
deviceId
:
e
.
deviceId
,
brand
:
e
.
deviceBrand
,
deviceModel
:
e
.
deviceModel
,
};
const
deviceFilePath
=
downloadEntry
.
fullPath
+
"name.txt"
;
await
ioUtil
.
removeExistFile
(
deviceFilePath
);
await
ioUtil
.
writeFile
(
"name.txt"
,
downloadEntry
,
JSON
.
stringify
(
deviceData
)
);
},
});
if
(
downloadEntry
)
{
await
ioUtil
.
createDir
(
downloadEntry
.
fullPath
,
'base'
)
await
ioUtil
.
createDir
(
downloadEntry
.
fullPath
,
'export'
)
await
ioUtil
.
createDir
(
downloadEntry
.
fullPath
,
'import'
)
await
ioUtil
.
createDir
(
downloadEntry
.
fullPath
,
'doc'
)
await
ioUtil
.
createDir
(
downloadEntry
.
fullPath
,
'error'
)
}
// 获取设备名称
uni
.
getSystemInfo
({
success
:
async
function
(
e
)
{
const
deviceData
=
{
deviceId
:
e
.
deviceId
,
brand
:
e
.
deviceBrand
,
deviceModel
:
e
.
deviceModel
,
}
const
deviceFilePath
=
downloadEntry
.
fullPath
+
'name.txt'
await
ioUtil
.
removeExistFile
(
deviceFilePath
)
await
ioUtil
.
writeFile
(
'name.txt'
,
downloadEntry
,
JSON
.
stringify
(
deviceData
))
},
});
// 文件目录
if
(
docEntry
)
{
await
ioUtil
.
createDir
(
docEntry
.
fullPath
,
'file'
)
}
// 文件目录
if
(
docEntry
)
{
await
ioUtil
.
createDir
(
docEntry
.
fullPath
,
"file"
);
}
// 临时目录
let
tempEntry
=
await
ioUtil
.
getFileEntry
(
_temp
)
if
(
!
tempEntry
)
{
await
ioUtil
.
createDir
(
_temp
)
tempEntry
=
await
ioUtil
.
createDir
(
_Path
.
getTempParent
(),
'inspectTemp'
)
}
await
ioUtil
.
createDir
(
tempEntry
.
fullPath
,
'db'
)
}
catch
(
e
)
{
console
.
log
(
e
.
message
)
}
},
// 临时目录
let
tempEntry
=
await
ioUtil
.
getFileEntry
(
_temp
);
if
(
!
tempEntry
)
{
await
ioUtil
.
createDir
(
_temp
);
tempEntry
=
await
ioUtil
.
createDir
(
_Path
.
getTempParent
(),
"inspectTemp"
);
}
await
ioUtil
.
createDir
(
tempEntry
.
fullPath
,
"db"
);
}
catch
(
e
)
{
console
.
log
(
e
.
message
);
}
},
// 重启app
restartApp
()
{
// #ifdef APP-PLUS
if
(
plus
.
os
.
name
.
toLowerCase
()
===
'android'
)
{
plus
.
runtime
.
restart
();
}
// #endif
},
// 重启app
restartApp
()
{
// #ifdef APP-PLUS
if
(
plus
.
os
.
name
.
toLowerCase
()
===
"android"
)
{
plus
.
runtime
.
restart
();
}
// #endif
},
// 退出app
exitApp
()
{
// #ifdef APP-PLUS
if
(
plus
.
os
.
name
.
toLowerCase
()
===
'android'
)
{
plus
.
runtime
.
quit
();
}
else
{
const
threadClass
=
plus
.
ios
.
importClass
(
"NSThread"
);
const
mainThread
=
plus
.
ios
.
invoke
(
threadClass
,
"mainThread"
);
plus
.
ios
.
invoke
(
mainThread
,
"exit"
);
// 或者如下
// plus.ios.import('UIApplication').sharedApplication().performSelector('exit');
}
// #endif
}
}
// 退出app
exitApp
()
{
// #ifdef APP-PLUS
if
(
plus
.
os
.
name
.
toLowerCase
()
===
"android"
)
{
plus
.
runtime
.
quit
();
}
else
{
const
threadClass
=
plus
.
ios
.
importClass
(
"NSThread"
);
const
mainThread
=
plus
.
ios
.
invoke
(
threadClass
,
"mainThread"
);
plus
.
ios
.
invoke
(
mainThread
,
"exit"
);
// 或者如下
// plus.ios.import('UIApplication').sharedApplication().performSelector('exit');
}
// #endif
},
}
;
components/CommonUpload/index.vue
浏览文件 @
09d732e8
...
...
@@ -8,7 +8,6 @@
class=
"add-btn"
@
click=
"chooseImage"
>
+
</view>
<view
v-for=
"(item, index) in images"
...
...
@@ -117,9 +116,8 @@ export default {
};
</
script
>
<
style
scoped
>
<
style
scoped
lang=
"scss"
>
.upload-container
{
padding
:
10px
;
}
.image-list
{
display
:
flex
;
...
...
@@ -127,41 +125,56 @@ export default {
}
.image-item
{
position
:
relative
;
width
:
80
px
;
height
:
80
px
;
width
:
72
px
;
height
:
72
px
;
margin-right
:
10px
;
margin-bottom
:
10px
;
}
.image
{
width
:
100%
;
height
:
100%
;
bo
rder-radius
:
5p
x
;
bo
x-sizing
:
border-bo
x
;
}
.delete-icon
{
position
:
absolute
;
top
:
-10px
;
right
:
-10px
;
font-size
:
20px
;
color
:
red
;
background-color
:
white
;
top
:
-6
.4px
;
right
:
-6
.4px
;
background-color
:
#ff4d4f
;
color
:
#fff
;
width
:
12
.8px
;
height
:
12
.8px
;
border-radius
:
50%
;
width
:
24px
;
height
:
24px
;
text-align
:
center
;
line-height
:
24px
;
line-height
:
12
.8px
;
font-size
:
9
.6px
;
}
.add-btn
{
width
:
80px
;
height
:
80px
;
position
:
relative
;
width
:
72px
;
height
:
72px
;
border
:
1px
dashed
#ccc
;
border-radius
:
5px
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
font-size
:
30px
;
color
:
#ccc
;
cursor
:
pointer
;
margin-right
:
10px
;
box-sizing
:
border-box
;
&
:
:
before
{
position
:
absolute
;
content
:
""
;
width
:
30px
;
height
:
2px
;
background-color
:
#ccc
;
left
:
50%
;
top
:
50%
;
transform
:
translateX
(
-50%
)
translateY
(
-50%
);
}
&
:
:
after
{
position
:
absolute
;
content
:
""
;
width
:
2px
;
height
:
30px
;
background-color
:
#ccc
;
left
:
50%
;
top
:
50%
;
transform
:
translateX
(
-50%
)
translateY
(
-50%
);
}
}
.tip
{
font-size
:
12px
;
...
...
pages/inspectionContent/components/afxt.vue
浏览文件 @
09d732e8
...
...
@@ -29,15 +29,19 @@
<text
class=
"form-label"
><text
class=
"required"
>
*
</text>
情况摘要
</text
>
<text
class=
"conclusion"
@
click=
"showPopup(index)"
>
{{
item
.
conclusion
||
"请输入情况摘要"
}}
</text>
<text
:class=
"['conclusion',
{ 'no-text': !item.conclusion }]"
@click="showPopup(index)"
>
{{
item
.
conclusion
||
"请输入情况摘要"
}}
</text
>
</view>
<view
class=
"form-item"
v-if=
"'photos' in item"
>
<text
class=
"form-label"
><text
class=
"required"
>
*
</text>
现场照片
</text
>
<view
class=
"photo-box"
>
<CommonUpload
v-model=
"item.photos"
:max-count=
"5"
>
</CommonUpload>
<!--
<view
class=
"photo-box"
>
<view
class=
"photo-container"
>
<view
v-for=
"(photo, itemIndex) in item && item.photos"
...
...
@@ -56,7 +60,7 @@
<view
class=
"photo-limit"
>
请对检查项进行拍照留存(限5张)。发现“异常、告警”时,需拍照留存。
</view
>
</view>
</view>
-->
</view></
template
></template
>
</view
...
...
@@ -69,12 +73,14 @@
</template>
<
script
>
import
CommonUpload
from
"@/components/CommonUpload/index.vue"
;
import
customPopup
from
"./customPopup.vue"
;
import
_
from
"lodash"
;
import
mixin
from
"./mixin"
;
export
default
{
mixins
:
[
mixin
],
components
:
{
CommonUpload
,
customPopup
,
},
props
:
{
...
...
@@ -329,8 +335,9 @@ export default {
}
}
.conclusion {
color: #c7c7c7;
font-size: 11.2px;
&.no-text {
color: #c7c7c7;
}
.have {
color: #000;
}
...
...
pages/inspectionContent/components/dczt.vue
浏览文件 @
09d732e8
...
...
@@ -38,15 +38,19 @@
<text
class=
"form-label"
><text
class=
"required"
>
*
</text>
情况摘要
</text
>
<text
class=
"conclusion"
@
click=
"showPopup(index)"
>
{{
item
.
conclusion
||
"请输入情况摘要"
}}
</text>
<text
:class=
"['conclusion',
{ 'no-text': !item.conclusion }]"
@click="showPopup(index)"
>
{{
item
.
conclusion
||
"请输入情况摘要"
}}
</text
>
</view>
<view
class=
"form-item"
v-if=
"'photos' in item"
>
<text
class=
"form-label"
><text
class=
"required"
>
*
</text>
现场照片
</text
>
<view
class=
"photo-box"
>
<CommonUpload
v-model=
"item.photos"
:max-count=
"5"
>
</CommonUpload>
<!--
<view
class=
"photo-box"
>
<view
class=
"photo-container"
>
<view
v-for=
"(photo, itemIndex) in item && item.photos"
...
...
@@ -65,7 +69,7 @@
<view
class=
"photo-limit"
>
请对检查项进行拍照留存(限5张)。发现“异常、告警”时,需拍照留存。
</view
>
</view>
</view>
-->
</view>
</
template
></view
><custom-popup
...
...
@@ -77,12 +81,14 @@
</template>
<
script
>
import
CommonUpload
from
"@/components/CommonUpload/index.vue"
;
import
customPopup
from
"./customPopup.vue"
;
import
_
from
"lodash"
;
import
mixin
from
"./mixin"
;
export
default
{
mixins
:
[
mixin
],
components
:
{
CommonUpload
,
customPopup
,
},
props
:
{
...
...
@@ -348,8 +354,9 @@ export default {
margin: 0 12px;
}
.conclusion {
color: #c7c7c7;
font-size: 11.2px;
&.no-text {
color: #c7c7c7;
}
.have {
color: #000;
}
...
...
pages/inspectionContent/components/dlxt.vue
浏览文件 @
09d732e8
...
...
@@ -27,15 +27,19 @@
<text
class=
"form-label"
><text
class=
"required"
>
*
</text>
情况摘要
</text
>
<text
class=
"conclusion"
@
click=
"showPopup(index)"
>
{{
item
.
conclusion
||
"请输入情况摘要"
}}
</text>
<text
:class=
"['conclusion',
{ 'no-text': !item.conclusion }]"
@click="showPopup(index)"
>
{{
item
.
conclusion
||
"请输入情况摘要"
}}
</text
>
</view>
<view
class=
"form-item"
>
<text
class=
"form-label"
><text
class=
"required"
>
*
</text>
现场照片
</text
>
<view
class=
"photo-box"
>
<CommonUpload
v-model=
"item.photos"
:max-count=
"5"
>
</CommonUpload>
<!--
<view
class=
"photo-box"
>
<view
class=
"photo-container"
>
<view
v-for=
"(photo, itemIndex) in item && item.photos"
...
...
@@ -54,7 +58,7 @@
<view
class=
"photo-limit"
>
请对检查项进行拍照留存(限5张)。发现“异常、告警”时,需拍照留存。
</view
>
</view>
</view>
-->
</view>
</
template
></view
><custom-popup
...
...
@@ -66,6 +70,7 @@
</template>
<
script
>
import
CommonUpload
from
"@/components/CommonUpload/index.vue"
;
import
customPopup
from
"./customPopup.vue"
;
import
_
from
"lodash"
;
...
...
@@ -73,6 +78,7 @@ import mixin from "./mixin";
export
default
{
mixins
:
[
mixin
],
components
:
{
CommonUpload
,
customPopup
,
},
props
:
{
...
...
@@ -303,8 +309,9 @@ export default {
}
}
.conclusion {
color: #c7c7c7;
font-size: 11.2px;
&.no-text {
color: #c7c7c7;
}
.have {
color: #000;
}
...
...
pages/inspectionContent/components/jfwsd.vue
浏览文件 @
09d732e8
...
...
@@ -37,15 +37,19 @@
<text
class=
"form-label"
><text
class=
"required"
>
*
</text>
情况摘要
</text
>
<text
class=
"conclusion"
@
click=
"showPopup(index)"
>
{{
item
.
conclusion
||
"请输入情况摘要"
}}
</text>
<text
:class=
"['conclusion',
{ 'no-text': !item.conclusion }]"
@click="showPopup(index)"
>
{{
item
.
conclusion
||
"请输入情况摘要"
}}
</text
>
</view>
<view
class=
"form-item"
v-if=
"'photos' in item"
>
<text
class=
"form-label"
><text
class=
"required"
>
*
</text>
现场照片
</text
>
<view
class=
"photo-box"
>
<CommonUpload
v-model=
"item.photos"
:max-count=
"5"
>
</CommonUpload>
<!--
<view
class=
"photo-box"
>
<view
class=
"photo-container"
>
<view
v-for=
"(photo, itemIndex) in item && item.photos"
...
...
@@ -64,7 +68,7 @@
<view
class=
"photo-limit"
>
请对检查项进行拍照留存(限5张)。发现“异常、告警”时,需拍照留存。
</view
>
</view>
</view>
-->
</view></
template
></view
><custom-popup
...
...
@@ -76,12 +80,14 @@
</template>
<
script
>
import
CommonUpload
from
"@/components/CommonUpload/index.vue"
;
import
customPopup
from
"./customPopup.vue"
;
import
_
from
"lodash"
;
import
mixin
from
"./mixin"
;
export
default
{
mixins
:
[
mixin
],
components
:
{
CommonUpload
,
customPopup
,
},
props
:
{
...
...
@@ -324,8 +330,9 @@ export default {
margin: 0 12px;
}
.conclusion {
color: #c7c7c7;
font-size: 11.2px;
&.no-text {
color: #c7c7c7;
}
.have {
color: #000;
}
...
...
pages/inspectionContent/components/qt.vue
浏览文件 @
09d732e8
...
...
@@ -6,13 +6,17 @@
<text
class=
"form-label"
><text
class=
"required"
></text>
{{
item
.
label
}}
</text
>
<text
class=
"conclusion"
@
click=
"showPopup(index)"
>
{{
item
.
conclusion
||
"请输入情况摘要"
}}
</text>
<text
:class=
"['conclusion',
{ 'no-text': !item.conclusion }]"
@click="showPopup(index)"
>
{{
item
.
conclusion
||
"请输入情况摘要"
}}
</text
>
</view>
<view
class=
"form-item"
>
<text
class=
"form-label"
><text
class=
"required"
></text>
现场照片
</text>
<view
class=
"photo-box"
>
<CommonUpload
v-model=
"item.photos"
:max-count=
"5"
>
</CommonUpload>
<!--
<view
class=
"photo-box"
>
<view
class=
"photo-container"
>
<view
v-for=
"(photo, itemIndex) in item && item.photos"
...
...
@@ -29,7 +33,7 @@
<view
class=
"photo-limit"
>
请对检查项进行拍照留存(限5张)。发现“异常、告警”时,需拍照留存。
</view
>
</view>
</view>
-->
</view>
</view
><custom-popup
ref=
"customPopup"
...
...
@@ -40,6 +44,7 @@
</
template
>
<
script
>
import
CommonUpload
from
"@/components/CommonUpload/index.vue"
;
import
customPopup
from
"./customPopup.vue"
;
import
_
from
"lodash"
;
...
...
@@ -47,6 +52,7 @@ import mixin from "./mixin";
export
default
{
mixins
:
[
mixin
],
components
:
{
CommonUpload
,
customPopup
,
},
props
:
{
...
...
@@ -235,8 +241,9 @@ export default {
}
}
.conclusion {
color: #c7c7c7;
font-size: 11.2px;
&.no-text {
color: #c7c7c7;
}
.have {
color: #000;
}
...
...
pages/inspectionContent/components/sbgj.vue
浏览文件 @
09d732e8
...
...
@@ -83,6 +83,7 @@
<view
class=
"flex items-center ml-30"
>
<button
class=
"v-btn"
@
click=
"onAddCabinet"
>
+
</button>
<button
v-show=
"item.cabinets.length > 1"
class=
"v-btn v-btn-danger ml-10"
@
click=
"onRemoveCabinet(idx)"
>
...
...
@@ -97,15 +98,19 @@
<text
class=
"form-label"
><text
class=
"required"
>
*
</text>
情况摘要
</text
>
<text
class=
"conclusion"
@
click=
"showPopup(index)"
>
{{
item
.
conclusion
||
"请输入情况摘要"
}}
</text>
<text
:class=
"['conclusion',
{ 'no-text': !item.conclusion }]"
@click="showPopup(index)"
>
{{
item
.
conclusion
||
"请输入情况摘要"
}}
</text
>
</view>
<view
class=
"form-item"
v-if=
"'photos' in item"
>
<text
class=
"form-label"
><text
class=
"required"
>
*
</text>
现场照片
</text
>
<view
class=
"photo-box"
>
<CommonUpload
v-model=
"item.photos"
:max-count=
"5"
>
</CommonUpload>
<!--
<view
class=
"photo-box"
>
<view
class=
"photo-container"
>
<view
v-for=
"(photo, itemIndex) in item && item.photos"
...
...
@@ -124,7 +129,7 @@
<view
class=
"photo-limit"
>
请对检查项进行拍照留存(限5张)。发现“异常、告警”时,需拍照留存。
</view
>
</view>
</view>
-->
</view></
template
>
</template>
</view
...
...
@@ -138,6 +143,7 @@
<
script
>
import
NumberInput
from
"@/components/NumberInput/index.vue"
;
import
CommonUpload
from
"@/components/CommonUpload/index.vue"
;
import
customPopup
from
"./customPopup.vue"
;
import
_
from
"lodash"
;
import
mixin
from
"./mixin"
;
...
...
@@ -145,6 +151,7 @@ export default {
mixins
:
[
mixin
],
components
:
{
NumberInput
,
CommonUpload
,
customPopup
,
},
props
:
{
...
...
@@ -306,13 +313,10 @@ export default {
continue
;
}
else
if
(
item
.
inspectionResult
===
1
)
{
// 如果 inspectionResult 为 1,检查 conclusion 和 photos
if
(
!
item
.
conclusion
||
item
.
photos
.
length
===
0
||
!
item
.
deviceId
||
!
item
.
UpositonS
||
!
item
.
UpositonE
)
{
const
isAllFull
=
item
.
cabinets
.
every
((
cabinet
)
=>
{
return
cabinet
.
deviceId
&&
cabinet
.
UpositonS
&&
cabinet
.
UpositonE
;
});
if
(
!
item
.
conclusion
||
!
isAllFull
||
cabinet
.
photos
.
length
>
0
)
{
return
false
;
}
}
else
{
...
...
@@ -363,7 +367,9 @@ export default {
};
this
.
itemData
.
detail
[
this
.
currentIndex
].
cabinets
.
push
(
newCabinet
);
},
onRemoveCabinet
()
{},
onRemoveCabinet
(
idx
)
{
this
.
itemData
.
detail
[
this
.
currentIndex
].
cabinets
.
splice
(
idx
,
1
);
},
},
};
</
script
>
...
...
@@ -394,8 +400,9 @@ export default {
margin: 0 12px;
}
.conclusion {
// color: #c7c7c7;
// font-size: 11.2px;
&.no-text {
color: #c7c7c7;
}
.have {
color: #000;
}
...
...
pages/inspectionContent/components/wlhj.vue
浏览文件 @
09d732e8
...
...
@@ -26,15 +26,19 @@
<text
class=
"form-label"
><text
class=
"required"
>
*
</text>
情况摘要
</text
>
<text
class=
"conclusion"
@
click=
"showPopup(index)"
>
{{
item
.
conclusion
||
"请输入情况摘要"
}}
</text>
<text
:class=
"['conclusion',
{ 'no-text': !item.conclusion }]"
@click="showPopup(index)"
>
{{
item
.
conclusion
||
"请输入情况摘要"
}}
</text
>
</view>
<view
class=
"form-item"
>
<text
class=
"form-label"
><text
class=
"required"
>
*
</text>
现场照片
</text
>
<view
class=
"photo-box"
>
<CommonUpload
v-model=
"item.photos"
:max-count=
"5"
>
</CommonUpload>
<!--
<view
class=
"photo-box"
>
<view
class=
"photo-container"
>
<view
v-for=
"(photo, itemIndex) in item && item.photos"
...
...
@@ -53,7 +57,7 @@
<view
class=
"photo-limit"
>
请对检查项进行拍照留存(限5张)。发现“异常、告警”时,需拍照留存。
</view
>
</view>
</view>
-->
</view></
template
>
</view
><custom-popup
...
...
@@ -65,12 +69,14 @@
</template>
<
script
>
import
CommonUpload
from
"@/components/CommonUpload/index.vue"
;
import
customPopup
from
"./customPopup.vue"
;
import
_
from
"lodash"
;
import
mixin
from
"./mixin"
;
export
default
{
components
:
{
CommonUpload
,
customPopup
,
},
mixins
:
[
mixin
],
...
...
@@ -333,8 +339,9 @@ export default {
}
}
.conclusion {
color: #c7c7c7;
font-size: 11.2px;
&.no-text {
color: #c7c7c7;
}
.have {
color: #000;
}
...
...
pages/inspectionContent/components/xfxt.vue
浏览文件 @
09d732e8
...
...
@@ -38,15 +38,19 @@
<text
class=
"form-label"
><text
class=
"required"
>
*
</text>
情况摘要
</text
>
<text
class=
"conclusion"
@
click=
"showPopup(index)"
>
{{
item
.
conclusion
||
"请输入情况摘要"
}}
</text>
<text
:class=
"['conclusion',
{ 'no-text': !item.conclusion }]"
@click="showPopup(index)"
>
{{
item
.
conclusion
||
"请输入情况摘要"
}}
</text
>
</view>
<view
class=
"form-item"
v-if=
"'photos' in item"
>
<text
class=
"form-label"
><text
class=
"required"
>
*
</text>
现场照片
</text
>
<view
class=
"photo-box"
>
<CommonUpload
v-model=
"item.photos"
:max-count=
"5"
>
</CommonUpload>
<!--
<view
class=
"photo-box"
>
<view
class=
"photo-container"
>
<view
v-for=
"(photo, itemIndex) in item && item.photos"
...
...
@@ -65,7 +69,7 @@
<view
class=
"photo-limit"
>
请对检查项进行拍照留存(限5张)。发现“异常、告警”时,需拍照留存。
</view
>
</view>
</view>
-->
</view></
template
></view
><custom-popup
...
...
@@ -77,12 +81,14 @@
</template>
<
script
>
import
CommonUpload
from
"@/components/CommonUpload/index.vue"
;
import
customPopup
from
"./customPopup.vue"
;
import
_
from
"lodash"
;
import
mixin
from
"./mixin"
;
export
default
{
mixins
:
[
mixin
],
components
:
{
CommonUpload
,
customPopup
,
},
props
:
{
...
...
@@ -332,8 +338,9 @@ export default {
margin: 0 12px;
}
.conclusion {
color: #c7c7c7;
font-size: 11.2px;
&.no-text {
color: #c7c7c7;
}
.have {
color: #000;
}
...
...
pages/inspectionContent/components/xlqk.vue
浏览文件 @
09d732e8
...
...
@@ -27,15 +27,19 @@
<text
class=
"form-label"
><text
class=
"required"
>
*
</text>
情况摘要
</text
>
<text
class=
"conclusion"
@
click=
"showPopup(index)"
>
{{
item
.
conclusion
||
"请输入情况摘要"
}}
</text>
<text
:class=
"['conclusion',
{ 'no-text': !item.conclusion }]"
@click="showPopup(index)"
>
{{
item
.
conclusion
||
"请输入情况摘要"
}}
</text
>
</view>
<view
class=
"form-item"
>
<text
class=
"form-label"
><text
class=
"required"
>
*
</text>
现场照片
</text
>
<view
class=
"photo-box"
>
<CommonUpload
v-model=
"item.photos"
:max-count=
"5"
>
</CommonUpload>
<!--
<view
class=
"photo-box"
>
<view
class=
"photo-container"
>
<view
v-for=
"(photo, itemIndex) in item && item.photos"
...
...
@@ -54,7 +58,7 @@
<view
class=
"photo-limit"
>
请对检查项进行拍照留存(限5张)。发现“异常、告警”时,需拍照留存。
</view
>
</view>
</view>
-->
</view></
template
>
</view
><custom-popup
...
...
@@ -66,12 +70,14 @@
</template>
<
script
>
import
CommonUpload
from
"@/components/CommonUpload/index.vue"
;
import
customPopup
from
"./customPopup.vue"
;
import
_
from
"lodash"
;
import
mixin
from
"./mixin"
;
export
default
{
mixins
:
[
mixin
],
components
:
{
CommonUpload
,
customPopup
,
},
props
:
{
...
...
@@ -303,8 +309,9 @@ export default {
}
}
.conclusion {
color: #c7c7c7;
font-size: 11.2px;
&.no-text {
color: #c7c7c7;
}
.have {
color: #000;
}
...
...
pages/inspectionContent/inspectionContentList.vue
浏览文件 @
09d732e8
...
...
@@ -52,7 +52,8 @@
<view
class=
"bar"
>
<view
class=
"title"
>
巡检进度
</view>
<view
class=
"dai"
>
待巡检
<text
class=
"num"
>
{{
11
-
inspectionNumber
}}
</text
待巡检
<text
class=
"num"
>
{{
listData
.
length
-
inspectionNumber
}}
</text
>
个机房
</view
>
<view
class=
"yi"
>
...
...
@@ -251,12 +252,12 @@ export default {
this
.
value
=
this
.
options
.
value
||
"1"
;
},
onShow
()
{
this
.
getRoomList
();
if
(
this
.
uid
)
{
this
.
getDetails
(
this
.
uid
);
}
else
{
this
.
init
();
this
.
getRoomList
().
then
((
res
)
=>
{
this
.
init
(
res
);
});
}
// this.startDialogData.text = [
// `请到“${this.name}”后;`,
...
...
@@ -268,20 +269,22 @@ export default {
},
methods
:
{
getRoomList
()
{
assRoomApi
.
selectRoomList
(
1
).
then
((
res
)
=>
{
return
assRoomApi
.
selectRoomList
(
1
).
then
((
res
)
=>
{
console
.
log
(
"机房列表"
,
res
);
return
res
;
});
},
init
()
{
init
(
baseList
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
let
list
=
pad_all_inspection_position
.
rows
.
map
((
item
,
index
)
=>
{
let
list
=
baseList
.
map
((
item
,
index
)
=>
{
return
{
name
:
item
.
dictLabel
,
id
:
item
.
id
,
name
:
item
.
roomName
,
value
:
item
.
dictValue
,
jfType
:
item
.
jfType
,
jfType
:
item
.
roomFeature
,
// 机房类型枚举:1.汇聚机房,2.屏蔽机房,3.UPS机房,4.数据机房
isVaild
:
false
,
// 校验通过
status
:
item
.
status
,
statusLable
:
item
.
statusLable
,
status
:
0
,
statusLable
:
"未巡检"
,
};
});
this
.
listData
=
this
.
deepClone
(
list
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论