Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
computedRoomPad
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
邓文彬
computedRoomPad
Commits
6a65e0f4
提交
6a65e0f4
authored
9月 14, 2024
作者:
邓文彬
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(pad): 巡检功能回归完成,功能走查优化待完成
上级
b27cc90d
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
143 行增加
和
117 行删除
+143
-117
package-lock.json
package-lock.json
+25
-10
inspectionContent.vue
pages/inspectionContent/inspectionContent.vue
+30
-26
batteryRoom.vue
pages/inspectionContent/model/batteryRoom.vue
+1
-0
gatherDataCenter.vue
pages/inspectionContent/model/gatherDataCenter.vue
+2
-0
shieldedComputerRoom.vue
pages/inspectionContent/model/shieldedComputerRoom.vue
+1
-0
tabContentItem.vue
pages/shaftInspection/model/tabContentItem.vue
+18
-16
shaftInspection.vue
pages/shaftInspection/shaftInspection.vue
+53
-56
dialog.vue
pages/synchronousManagement/dialog.vue
+13
-9
没有找到文件。
package-lock.json
浏览文件 @
6a65e0f4
{
"name"
:
"computedRoomPad"
,
"lockfileVersion"
:
3
,
"requires"
:
true
,
"lockfileVersion"
:
1
,
"dependencies"
:
{
"js-base64"
:
{
"packages"
:
{
""
:
{
"dependencies"
:
{
"js-base64"
:
"^3.7.5"
,
"lodash"
:
"^4.17.21"
,
"moment"
:
"^2.30.1"
,
"sm-crypto"
:
"^0.3.12"
},
"devDependencies"
:
{
"js-md5"
:
"^0.7.3"
}
},
"node_modules/js-base64"
:
{
"version"
:
"3.7.5"
,
"resolved"
:
"https://registry.npmmirror.com/js-base64/-/js-base64-3.7.5.tgz"
,
"integrity"
:
"sha512-3MEt5DTINKqfScXKfJFrRbxkrnk2AxPWGBL/ycjz4dK8iqiSJ06UxD8jh8xuh6p10TX4t2+7FsBYVxxQbMg+qA=="
},
"js-md5"
:
{
"
node_modules/
js-md5"
:
{
"version"
:
"0.7.3"
,
"resolved"
:
"https://registry.npmmirror.com/js-md5/-/js-md5-0.7.3.tgz"
,
"integrity"
:
"sha512-ZC41vPSTLKGwIRjqDh8DfXoCrdQIyBgspJVPXHBGu4nZlAEvG3nf+jO9avM9RmLiGakg7vz974ms99nEV0tmTQ=="
,
"dev"
:
true
},
"jsbn"
:
{
"
node_modules/
jsbn"
:
{
"version"
:
"1.1.0"
,
"resolved"
:
"https://registry.npmmirror.com/jsbn/-/jsbn-1.1.0.tgz"
,
"integrity"
:
"sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A=="
},
"lodash"
:
{
"
node_modules/
lodash"
:
{
"version"
:
"4.17.21"
,
"resolved"
:
"https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz"
,
"integrity"
:
"sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
},
"moment"
:
{
"
node_modules/
moment"
:
{
"version"
:
"2.30.1"
,
"resolved"
:
"https://registry.npmjs.org/moment/-/moment-2.30.1.tgz"
,
"integrity"
:
"sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how=="
"integrity"
:
"sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how=="
,
"engines"
:
{
"node"
:
"*"
}
},
"sm-crypto"
:
{
"
node_modules/
sm-crypto"
:
{
"version"
:
"0.3.12"
,
"resolved"
:
"https://registry.npmmirror.com/sm-crypto/-/sm-crypto-0.3.12.tgz"
,
"integrity"
:
"sha512-272PBzB4PYaBdeGa41TH9ZlMGLPVRmS36Gs4FjmHwXIdihQypAbhhFWZTaa/3de69q2KfMme1M5O2W5+spAdrg=="
,
"
requir
es"
:
{
"
dependenci
es"
:
{
"jsbn"
:
"^1.1.0"
}
}
...
...
pages/inspectionContent/inspectionContent.vue
浏览文件 @
6a65e0f4
...
...
@@ -54,35 +54,39 @@
<!-- tabls -->
<Tabs
class=
"tabs"
ref=
"tabs"
:options=
"tabList"
@
change=
"changeTab"
/>
<GatherDataCenter
v-show=
"activeTabIndex == 0"
:isDisable=
"isDisable"
ref=
"GatherDataCenter"
/>
<GatherDataCenter
v-show=
"activeTabIndex == 0"
:isDisable=
"isDisable"
ref=
"GatherDataCenter"
/>
<ShieldedComputerRoom
ref=
"ShieldedComputerRoom"
v-show=
"activeTabIndex == 1"
/>
<BatteryRoom
ref=
"BatteryRoom"
:isDisable=
"isDisable"
v-show=
"activeTabIndex == 2"
/>
<BatteryRoom
ref=
"BatteryRoom"
:isDisable=
"isDisable"
v-show=
"activeTabIndex == 2"
/>
<ComputerRoomDuty
ref=
"ComputerRoomDuty"
:isDisable=
"isDisable"
:isDisable=
"isDisable"
v-show=
"activeTabIndex == 3"
></ComputerRoomDuty>
<DutyHandover
ref=
"DutyHandover"
:isDisable=
"isDisable"
:isDisable=
"isDisable"
v-show=
"activeTabIndex == 4"
></DutyHandover>
</view>
<view
v-if=
"!isDisable"
class=
"fixed-btns"
>
<view
class=
"button-group"
>
<!-- isSubmit 标识: 0 是草稿态; 1 是正式提交 -->
<view
v-if=
"!detailsInfo.isSubmit || detailsInfo.isSubmit == 0"
class=
"btn-draft btn-class"
@
tap=
"draft(activeTabIndex)"
>
...
...
@@ -193,7 +197,6 @@ export default {
this
.
tempForm
=
darf_data
.
originData
.
tempForm
;
console
.
log
(
"获取草稿数据---"
,
darf_data
);
this
.
detailsInfo
=
darf_data
;
}
},
mounted
()
{
...
...
@@ -205,13 +208,9 @@ export default {
this
.
tempForm
[
index
]
&&
this
.
setComponentData
(
index
,
this
.
tempForm
[
index
]);
});
}
else
{
this
.
baseInfo
=
this
.
$store
.
state
.
temp_data
;
}
},
methods
:
{
...
...
@@ -229,7 +228,7 @@ export default {
this
.
tempForm
=
detailsInfo
.
originData
.
tempForm
;
this
.
detailsInfo
=
detailsInfo
;
this
.
isDisable
=
(
detailsInfo
.
synchronization
==
1
)
this
.
isDisable
=
detailsInfo
.
synchronization
==
1
;
},
// 回显组件数据
setComponentData
(
activeTabIndex
,
componentData
)
{
...
...
@@ -269,6 +268,12 @@ export default {
this
.
$store
.
commit
(
"SET_ALL_DATA"
,
tempAllData
);
writeInspectionData
(
tempAllData
);
// 清空草稿数据
this
.
$store
.
commit
(
"SET_DARF_DATA"
,
{});
// 缓存[巡检信息]
writeDarf
(
""
).
then
((
res
)
=>
{
console
.
log
(
"写入草稿文件成功"
);
});
// 更新日志
const
log_list
=
this
.
$store
.
state
.
log_list
;
const
logContent
=
getLogContent
(
...
...
@@ -328,7 +333,7 @@ export default {
.
join
(
","
);
let
temp
=
{
...
baseInfo
,
isSubmit
:
1
,
isSubmit
:
0
,
fillCheck
,
isException
:
""
,
roomWatch
:
""
,
...
...
@@ -340,7 +345,6 @@ export default {
tabList
.
forEach
((
element
,
index
)
=>
{
if
(
Array
.
isArray
(
tempForm
[
index
]))
{
console
.
log
(
"---ARRAY"
,
tempForm
[
index
]);
tempItems
.
push
(...
tempForm
[
index
]);
}
else
{
temp
=
{
...
...
@@ -383,6 +387,7 @@ export default {
submit
()
{
this
.
draft
(
this
.
activeTabIndex
,
false
,
false
).
then
(()
=>
{
const
vaild
=
this
.
$refs
.
tabs
.
isAllVails
();
const
uid
=
this
.
detailsInfo
.
uid
;
if
(
vaild
)
{
/**
...
...
@@ -394,13 +399,14 @@ export default {
const
params
=
this
.
getParams
();
const
all_data
=
this
.
$store
.
state
.
all_data
;
params
.
isSubmit
=
1
;
let
logContent
=
""
;
// 新增 or 编辑
if
(
params
.
uid
)
{
const
index
=
all_data
.
findIndex
(
(
element
)
=>
element
.
uid
==
params
.
uid
);
if
(
uid
)
{
const
index
=
all_data
.
findIndex
((
element
)
=>
element
.
uid
==
uid
);
params
.
uid
=
uid
;
all_data
[
index
]
=
params
;
logContent
=
getLogContent
(
LOG_TYPE_ENUM
.
edit
,
...
...
@@ -417,9 +423,6 @@ export default {
);
}
// console.log("--params--",all_data, params)
// return
// 更新巡检list
this
.
$store
.
commit
(
"SET_ALL_DATA"
,
all_data
);
writeInspectionData
(
all_data
);
...
...
@@ -498,6 +501,7 @@ export default {
// 写入草稿文件 更新 store 草稿内容
const
params
=
this
.
getParams
();
params
.
isSubmit
=
0
;
this
.
$store
.
commit
(
"SET_DARF_DATA"
,
params
);
console
.
log
(
"--写入草稿文件-"
,
params
);
// 缓存草稿
...
...
@@ -592,7 +596,7 @@ export default {
margin-bottom: 16px;
padding-top: 80px;
position: relative;
.bg-img{
.bg-img
{
right: 0;
bottom: 0;
position: absolute;
...
...
pages/inspectionContent/model/batteryRoom.vue
浏览文件 @
6a65e0f4
...
...
@@ -17,6 +17,7 @@
<view
v-for=
"(ele, eleIndex) in item.resultArr"
class=
"tag"
:key=
"eleIndex"
@
click=
"tagClick(parentIndex, eleIndex, ele.isActive)"
:class=
"ele.isActive ? 'active-tag' : ''"
>
{{
ele
.
label
}}
...
...
pages/inspectionContent/model/gatherDataCenter.vue
浏览文件 @
6a65e0f4
...
...
@@ -17,6 +17,7 @@
<view
v-for=
"(ele, eleIndex) in item.resultArr"
class=
"tag"
:key=
"eleIndex"
@
click=
"tagClick(parentIndex, eleIndex, ele.isActive)"
:class=
"ele.isActive ? 'active-tag' : ''"
>
{{
ele
.
label
}}
...
...
@@ -36,6 +37,7 @@
<view
v-for=
"(ele, eleIndex) in item.postionList"
class=
"tag"
:key=
"eleIndex"
@
click=
"postionChange(parentIndex, eleIndex, ele.isActive)"
:class=
"
item.measuredDataArr.includes(ele.dictValue) ? 'active-tag' : ''
...
...
pages/inspectionContent/model/shieldedComputerRoom.vue
浏览文件 @
6a65e0f4
...
...
@@ -17,6 +17,7 @@
<view
v-for=
"(ele, eleIndex) in item.resultArr"
class=
"tag"
:key=
"eleIndex"
@
click=
"tagClick(parentIndex, eleIndex, ele.isActive)"
:class=
"ele.isActive ? 'active-tag' : ''"
>
{{
ele
.
label
}}
...
...
pages/shaftInspection/model/tabContentItem.vue
浏览文件 @
6a65e0f4
...
...
@@ -23,6 +23,7 @@
<view
v-for=
"(ele, eleIndex) in item.resultArr"
class=
"tag"
:key=
"eleIndex"
@
click=
"tagClick(parentIndex, eleIndex, ele.isActive)"
:class=
"ele.isActive ? 'active-tag' : ''"
>
{{
ele
.
label
}}
...
...
@@ -42,6 +43,7 @@
<view
v-for=
"(ele, eleIndex) in item.postionList"
class=
"tag"
:key=
"eleIndex"
@
click=
"postionChange(parentIndex, eleIndex, ele.isActive)"
:class=
"
item.measuredDataArr.includes(ele.dictValue) ? 'active-tag' : ''
...
...
@@ -62,6 +64,7 @@
<textarea
class=
"textarea"
v-model=
"form.conclusion"
:disabled=
"isDisable"
placeholder-style=
"color:#C7C7C7"
placeholder=
"请输入"
/>
...
...
@@ -80,7 +83,11 @@ import {
* 汇集机房
*/
export
default
{
props
:
{},
props
:
{
isDisable
:
{
type
:
Boolean
,
},
},
data
()
{
return
{
list
:
[],
...
...
@@ -113,7 +120,7 @@ export default {
},
},
roomTypeLabel
:
"汇聚机房巡检"
,
// 用于获取类型值
//
roomTypeLabel: "汇聚机房巡检", // 用于获取类型值
};
},
mounted
()
{
...
...
@@ -122,7 +129,7 @@ export default {
methods
:
{
// tag 点击事件
tagClick
(
parentIndex
,
eleIndex
,
isActive
)
{
if
(
isActive
)
{
if
(
isActive
||
this
.
isDisable
)
{
return
;
}
this
.
list
[
parentIndex
].
resultArr
.
forEach
((
element
)
=>
{
...
...
@@ -143,6 +150,9 @@ export default {
},
// tag 点击事件
postionChange
(
parentIndex
,
eleIndex
,
isActive
)
{
if
(
this
.
isDisable
)
{
return
;
}
const
postionList
=
this
.
list
[
parentIndex
].
postionList
;
const
item
=
postionList
[
eleIndex
];
item
.
isActive
=
!
isActive
;
...
...
@@ -156,10 +166,10 @@ export default {
// 数据结构重组
coverlist
()
{
const
roomTypeLabel
=
this
.
roomTypeLabel
;
const
roomType
=
pad_room_type
.
rows
.
filter
(
(
item
)
=>
item
.
dictLabel
==
roomTypeLabel
)[
0
].
dictValue
;
//
const roomTypeLabel = this.roomTypeLabel;
//
const roomType = pad_room_type.rows.filter(
//
(item) => item.dictLabel == roomTypeLabel
//
)[0].dictValue;
const
temp
=
pad_2_1_inspection_items
.
rows
.
map
((
item
)
=>
{
return
{
...
...
@@ -167,9 +177,9 @@ export default {
dictLabel
:
item
.
dictLabel
,
dictValue
:
item
.
dictValue
,
notes
:
""
,
// 情况摘要
// roomType,
inspectionResult
:
0
,
// 异常结论
itemCode
:
item
.
dictValue
,
// 检查项 如:门禁
roomType
,
// 机房类型
resultArr
:
[
{
value
:
0
,
...
...
@@ -224,7 +234,6 @@ export default {
async
vaildForm
()
{
return
new
Promise
(
async
(
resolve
,
reject
)
=>
{
let
result
=
""
;
console
.
log
(
"--vaildForm--"
,
this
.
form
);
this
.
$refs
.
forms
.
validate
()
.
then
((
res
)
=>
{
...
...
@@ -254,13 +263,6 @@ export default {
Promise
.
all
(
temp
).
then
((
res
)
=>
{
const
allVaildList
=
res
.
filter
((
item
)
=>
item
.
result
);
const
formData
=
this
.
getForm
();
// return {
// vaild: this.list.length == allVaildList.length,
// formData,
// };
console
.
log
(
"--result-"
,
result
);
console
.
log
(
"--allVaildList-"
,
allVaildList
);
resolve
({
vaild
:
result
&&
this
.
list
.
length
==
allVaildList
.
length
,
formData
,
...
...
pages/shaftInspection/shaftInspection.vue
浏览文件 @
6a65e0f4
...
...
@@ -59,12 +59,18 @@
:key=
"index"
:ref=
"item.refName"
v-show=
"activeTabIndex == index"
:isDisable=
"isDisable"
></TabContentItem>
</view>
<view
class=
"fixed-btns"
>
<view
v-if=
"!isDisable"
class=
"fixed-btns"
>
<view
class=
"button-group"
>
<view
class=
"btn-draft btn-class"
@
tap=
"draft(activeTabIndex)"
>
<!-- 保存草稿 0:草稿 1:提交 -->
<view
v-if=
"!detailsInfo.isSubmit || detailsInfo.isSubmit == 0"
class=
"btn-draft btn-class"
@
tap=
"draft(activeTabIndex)"
>
保存草稿
</view>
<view
class=
"btn-class"
@
tap=
"submit"
>
提交
</view>
...
...
@@ -114,6 +120,7 @@ export default {
// 对应每个tab下的数据 [示例 0: 数据]
},
detailsInfo
:
{},
// 详情
isDisable
:
false
,
// 禁用
};
},
onLoad
(
options
)
{
...
...
@@ -143,7 +150,6 @@ export default {
}
else
{
this
.
baseInfo
=
this
.
$store
.
state
.
temp_data
;
}
});
},
...
...
@@ -171,6 +177,8 @@ export default {
this
.
baseInfo
=
detailsInfo
.
originData
.
baseInfo
;
this
.
tempForm
=
detailsInfo
.
originData
.
tempForm
;
this
.
detailsInfo
=
detailsInfo
;
this
.
isDisable
=
detailsInfo
.
synchronization
==
1
;
},
// 回显组件数据
setComponentData
(
refName
,
componentData
)
{
...
...
@@ -217,18 +225,22 @@ export default {
getParams
()
{
const
baseInfo
=
this
.
baseInfo
;
const
tempForm
=
this
.
tempForm
;
const
fillCheck
=
this
.
tabList
.
filter
(
item
=>
item
.
isVaild
).
map
((
item
)
=>
item
.
value
).
join
(
","
);
const
fillCheck
=
this
.
tabList
.
filter
((
item
)
=>
item
.
isVaild
)
.
map
((
item
)
=>
item
.
value
)
.
join
(
","
);
const
temp
=
this
.
tabList
.
map
((
item
,
index
)
=>
{
const
items
=
tempForm
[
index
].
temp
.
map
((
ele
)
=>
{
const
items
=
((
tempForm
[
index
]
||
{}).
temp
||
[])
.
map
((
ele
)
=>
{
return
{
itemCode
:
ele
.
itemCode
,
measuredData
:
ele
.
measuredData
,
inspectionResult
:
ele
.
inspectionResult
,
};
});
// 一个tab栏下的数据,是否有异常
const
isException
=
tempForm
[
index
].
temp
.
filter
(
const
isException
=
((
tempForm
[
index
]
||
{}).
temp
||
[])
.
filter
(
(
item
)
=>
item
.
inspectionResult
>
0
).
length
?
1
...
...
@@ -237,7 +249,7 @@ export default {
return
{
...
baseInfo
,
isSubmit
:
1
,
conclusion
:
tempForm
[
index
].
conclusion
,
conclusion
:
(
tempForm
[
index
]
||
{}).
conclusion
||
""
,
fillCheck
,
position
:
item
.
value
,
isException
,
...
...
@@ -247,6 +259,8 @@ export default {
const
item
=
{
...
temp
[
0
],
isSubmit
:
0
,
isException
:
temp
.
filter
((
item
)
=>
item
.
isException
>
0
).
length
?
1
:
0
,
// 总的数据
items
:
[],
synchronization
:
0
,
// 是否导出过
...
...
@@ -257,7 +271,6 @@ export default {
},
};
item
[
baseInfo
.
inspectionCode
]
=
temp
;
console
.
log
(
"----item--"
,
item
);
return
item
;
},
...
...
@@ -276,42 +289,29 @@ export default {
const
params
=
this
.
getParams
();
const
all_data
=
this
.
$store
.
state
.
all_data
;
// const temp = {
// ...params[0],
// items: [],
// synchronization: 0, // 是否导出过
// submitTime: moment().format("yyyy-MM-DD"), // 记录提交时间
// originData: {
// baseInfo: this.baseInfo,
// tempForm: this.tempForm,
// },
// };
// temp[this.baseInfo.inspectionCode] = params;
// const tempItem = all_data[time] || [];
// tempItem.push(temp);
// all_data[time] = tempItem;
// params.uid = new Date().getTime(); // 唯一标识 pad 端使用
// all_data.push(temp);
const
uid
=
this
.
detailsInfo
.
uid
;
params
.
isSubmit
=
1
;
let
logContent
=
""
;
// 新增 or 编辑
if
(
params
.
uid
)
{
const
index
=
all_data
.
findIndex
(
(
element
)
=>
element
.
uid
==
params
.
uid
);
if
(
uid
)
{
const
index
=
all_data
.
findIndex
(
(
element
)
=>
element
.
uid
==
uid
);
params
.
uid
=
uid
;
all_data
[
index
]
=
params
;
logContent
=
getLogContent
(
LOG_TYPE_ENUM
.
edit
);
logContent
=
getLogContent
(
LOG_TYPE_ENUM
.
edit
,
`
${
params
.
recordName
}
(
${
params
.
inspectionCode
}
)`
,
"巡检模块"
);
}
else
{
params
.
uid
=
new
Date
().
getTime
();
// 唯一标识 pad 端使用
all_data
.
push
(
params
);
logContent
=
getLogContent
(
LOG_TYPE_ENUM
.
add
);
logContent
=
getLogContent
(
LOG_TYPE_ENUM
.
add
,
`
${
params
.
recordName
}
(
${
params
.
inspectionCode
}
)`
,
"巡检模块"
);
}
// 更新巡检list
...
...
@@ -319,7 +319,6 @@ export default {
writeInspectionData
(
all_data
);
// 更新日志
// const logContent = getLogContent(LOG_TYPE_ENUM.add);
const
log_list
=
this
.
$store
.
state
.
log_list
;
log_list
.
push
(
logContent
);
this
.
$store
.
commit
(
"SET_LOG_LIST"
,
log_list
);
...
...
@@ -362,31 +361,15 @@ export default {
let
refName
=
this
.
tabList
[
activeTabIndex
].
refName
;
return
new
Promise
((
resolve
,
reject
)
=>
{
this
.
$refs
[
refName
][
0
].
vaildForm
().
then
(({
vaild
,
formData
})
=>
{
console
.
log
(
"---校验---"
,
vaild
);
this
.
$refs
.
tabs
.
setTabVaild
(
activeTabIndex
,
vaild
,
iSwtich
)
.
then
(()
=>
{
this
.
tempForm
[
activeTabIndex
]
=
formData
;
console
.
log
(
"---isSave---"
,
isSave
);
const
params
=
this
.
getParams
();
console
.
log
(
"--保存草稿--"
,
params
);
if
(
isSave
)
{
// 更新store 和 [草稿文件] 日志数据
// // 新增日志信息
const
logContent
=
getLogContent
(
LOG_TYPE_ENUM
.
darf
);
const
log_list
=
this
.
$store
.
state
.
log_list
;
log_list
.
push
(
logContent
);
this
.
$store
.
commit
(
"SET_LOG_LIST"
,
log_list
);
addLog
(
log_list
).
then
((
res
)
=>
{
console
.
log
(
"日志文件写入成功"
);
});
// 写入草稿文件 更新 store 草稿内容
const
params
=
this
.
getParams
();
console
.
log
(
"--保存草稿--"
,
params
)
;
params
.
isSubmit
=
0
;
this
.
$store
.
commit
(
"SET_DARF_DATA"
,
params
);
// 缓存[巡检信息]
writeDarf
(
params
).
then
((
res
)
=>
{
...
...
@@ -396,6 +379,20 @@ export default {
title
:
"保存草稿成功"
,
});
});
// 新增日志信息
const
logContent
=
getLogContent
(
LOG_TYPE_ENUM
.
darf
,
`
${
params
.
recordName
}
(
${
params
.
inspectionCode
}
)`
,
"巡检模块"
);
const
log_list
=
this
.
$store
.
state
.
log_list
;
log_list
.
push
(
logContent
);
this
.
$store
.
commit
(
"SET_LOG_LIST"
,
log_list
);
addLog
(
log_list
).
then
((
res
)
=>
{
console
.
log
(
"日志文件写入成功"
);
});
}
resolve
();
});
...
...
@@ -467,7 +464,7 @@ export default {
margin-bottom: 16px;
padding-top: 80px;
position: relative;
.bg-img{
.bg-img
{
right: 0;
bottom: 0;
position: absolute;
...
...
pages/synchronousManagement/dialog.vue
浏览文件 @
6a65e0f4
...
...
@@ -133,27 +133,31 @@ export default {
this
.
packedData
(
JDXJ_DATA
,
JDXJ_DATA_FILE_NAME
),
])
.
then
(()
=>
{
// 更新巡检数据状态
const
newAllData
=
all_data
.
map
((
item
)
=>
{
item
.
synchronization
=
1
;
return
item
;
});
writeInspectionData
(
all_data
)
.
then
(()
=>
{
this
.
$store
.
commit
(
"SET_ALL_DATA"
,
newAllData
);
setTimeout
(()
=>
{
uni
.
showToast
({
title
:
"打包成功"
,
icon
:
"none"
,
duration
:
2000
,
});
this
.
close
();
this
.
loading
=
false
;
// 更新巡检数据状态
const
newAllData
=
all_data
.
map
((
item
)
=>
{
item
.
synchronization
=
1
;
return
item
;
});
this
.
$store
.
commit
(
"SET_ALL_DATA"
,
newAllData
);
// 生成日志
const
logContent
=
getLogContent
(
LOG_TYPE_ENUM
.
sys
,
""
,
"同步模块"
);
const
logContent
=
getLogContent
(
LOG_TYPE_ENUM
.
sys
,
""
,
"同步模块"
);
const
log_list
=
this
.
$store
.
state
.
log_list
;
log_list
.
push
(
logContent
);
this
.
$store
.
commit
(
"SET_LOG_LIST"
,
log_list
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论