新增sqlit数据表

dev2
Panzihang 2023-08-04 17:06:33 +08:00
parent 96f8e07a89
commit 63c0c44643
11 changed files with 568 additions and 419 deletions

View File

@ -4,20 +4,50 @@ module.exports = {
dbPath: '_doc/dianji_chat.db',
// 创建所有表
createAllTable() {
// 创建船舶基本信息
this.createShipInfoTable()
// 创建人员信息
this.createMessageRespList()
// this.createWorkMessageRespList()
// 创建工班信息
this.createWorkMessageRespList()
// 创建工班信息详细
this.createWorkMessageRespInfoList()
// // 创建工班信息翻仓
// this.createRetallyMessageRespList()
// // 创建工班信息翻仓详情
// this.createRetallyMessageRespInfoList()
// // 创建工班信息其他
// this.createInfoRespList()
// 创建系解缆
this.creatAttachUnmoorRespList()
// 创建供给
this.createShipmentShipSupplyRespList()
// 创建指导员作业布置
this.createShipmentAdviserLayoutRespList()
// 创建船舶装卸通知书
this.createShipmentLoadUnloadNoticeRespList()
// 创建质量意见征询
this.createShipmentQualityConsultationRespList()
// 创建异常情况
this.createAbnormalConditionRespList()
// 创建mafi
this.createMafiListRespList()
// 创建安全巡检
this.createSafetyInspectionRespList()
// 创建作业查询
this.createShipmentShipLoadPlansRespList()
// 创建船舶资料
this.createShipmentShipManage()
// 创建下拉数据
this.createShipOption()
},
// 创建船舶基本信息 shipInfoTable
createShipInfoTable() {
console.log("创建船舶基本信息表")
let sql =
'CREATE TABLE if not exists shipInfoTable ("webId" text NOT NULL,"vslCd" text,"vslCnname" text,"vvyId" text,"vvyName" text,"importExportFlag" text,"importExportFlagName" text,"tradeType" text,"tradeTypeName" text,"webStatus" text,"webDate" text, PRIMARY KEY("webId"));'
this.executeSql(sql)
},
// 创建人员信息 messageRespList
createMessageRespList() {
let sql =
@ -25,12 +55,38 @@ module.exports = {
this.executeSql(sql)
},
// 创建工班信息 workMessageRespList
// createWorkMessageRespList() {
// console.log('创建表');
// let sql =
// 'CREATE TABLE if not exists workMessageRespList ("webId" text NOT NULL,"bthId" text,"bthIdName" text,"jobStartTime" text,"jobEndTime" text,"shipPerson" text,"vvyId" text,"vvyName" text,"weatherId" text,"weatherType" text,"workSuite" text,"tradeTypeName" text,"importExportFlagName" text,"spmName" text,"webStatus" text,"webDate" text, PRIMARY KEY("webId"));'
// this.executeSql(sql)
// },
createWorkMessageRespList() {
let sql =
'CREATE TABLE if not exists workMessageRespList ("webId" text NOT NULL,"contactId" text,"vvyId" text,"vvyName" text,"loadType" text,"loadTypeName" text,"pwcType" text,"pwcTypeName" text,"workStartTime" text,"workEndTime" text,"tradeTypeName" text,"importExportFlagName" text,"spmName" text,"webStatus" text,"webDate" text, PRIMARY KEY("webId"));'
this.executeSql(sql)
},
// 创建工班信息详细 workMessageRespInfoList
createWorkMessageRespInfoList() {
let sql =
'CREATE TABLE if not exists workMessageRespInfoList ("webId" text NOT NULL,"contactId" text,"carType" text,"carTypeName" text,"goodsNumber" text,"loadingType" text,"loadingTypeName" text,"remark" text,"tradeTypeName" text,"importExportFlagName" text,"spmName" text,"webStatus" text,"webDate" text, PRIMARY KEY("webId"));'
this.executeSql(sql)
},
// 创建工班信息翻仓 retallyMessageRespList
createRetallyMessageRespList() {
console.log('创建工班信息翻仓表');
let sql =
'CREATE TABLE if not exists workMessageRespFlipList ("webId" text NOT NULL,"contactId" text,"vvyId" text,"vvyName" text,"retallyType" text,"retallyTypeName" text,"tradeTypeName" text,"importExportFlagName" text,"spmName" text,"webStatus" text,"webDate" text, PRIMARY KEY("webId"));'
this.executeSql(sql)
},
// 创建工班信息翻仓详情 retallyMessageRespInfoList
createRetallyMessageRespInfoList() {
console.log('创建工班信息翻仓详情表');
let sql =
'CREATE TABLE if not exists retallyMessageRespInfoList ("webId" text NOT NULL,"contactId" text,"vvyId" text,"vvyName" text,"retallyOrigin" text,"retallyTerminus" text,"carType" text,"carTypeName" text,"retallyStartTime" text,"retallyEndTime" text,"goodsNumber" text,"goodsVolume" text,"goodsWeight" text,"tradeTypeName" text,"importExportFlagName" text,"spmName" text,"webStatus" text,"webDate" text, PRIMARY KEY("webId"));'
this.executeSql(sql)
},
// 创建工班信息其他 infoRespList
createInfoRespList() {
console.log('创建工班信息翻仓其他表');
let sql =
'CREATE TABLE if not exists infoRespList ("webId" text NOT NULL,"contactId" text,"vvyId" text,"vvyName" text,"tecNum" text,"tecStartTm" text,"tecEndTm" text,"tecWeight" text,"tecVolume" text,"genNum" text,"genStartTm" text,"genEndTm" text,"genWeight" text,"genVolume" text,"tradeTypeName" text,"importExportFlagName" text,"spmName" text,"webStatus" text,"webDate" text, PRIMARY KEY("webId"));'
this.executeSql(sql)
},
// 创建系解缆 attachUnmoorRespList
creatAttachUnmoorRespList() {
let sql =
@ -67,7 +123,7 @@ module.exports = {
'CREATE TABLE if not exists abnormalConditionRespList ("webId" text NOT NULL,"vvyId" text,"vvyName" text,"type" text,"remark" text,"workTime" text,"tradeTypeName" text,"importExportFlagName" text,"spmName" text,"webStatus" text,"webDate" text, PRIMARY KEY("webId"));'
this.executeSql(sql)
},
// 创建mifi mafiListRespList
// 创建mafi mafiListRespList
createMafiListRespList() {
let sql =
'CREATE TABLE if not exists mafiListRespList ("webId" text NOT NULL,"vvyId" text,"vvyName" text,"loaderTypeId" text,"loaderType" text,"typeId" text,"type" text,"size" text,"mafiBarcode" text,"workDate" text,"tradeTypeName" text,"importExportFlagName" text,"spmName" text,"webStatus" text,"webDate" text, PRIMARY KEY("webId"));'

View File

@ -15,8 +15,7 @@
<button class="searchBtn" type="default" @click="createTable"></button>
<button class="searchBtn" type="default" @click="dropTable"></button>
<button class="searchBtn" type="default" @click="dropData"></button>
<button class="searchBtn" type="default" @click="add"></button>
<button class="searchBtn" type="default" @click="executeSql1('messageRespList')"></button>
<button class="searchBtn" type="default" @click="executeSql1('shipInfoTable')"></button>
</view>
<view class="itemList">
<template v-if="itemList.length > 0">
@ -118,7 +117,17 @@
pageSize: 4,
current: 1,
shipInfo: {},
//
shipInfo: {
vslCd: "123",
vslCnname: "测试船只",
vvyId: "hangciId",
vvyName: "hangciName",
importExportFlag: "jinchukouId",
importExportFlagName: "进口",
tradeType: "maoyileixingId",
tradeTypeName: "外贸"
},
//
shipData: {
vslCd: "123",
@ -309,7 +318,7 @@
},
mounted() {
this.pamValue = uni.getStorageSync('portObj').portId
this.shipInfo = uni.getStorageSync('shipInfo').voyageScheduleDataList
// this.shipInfo = uni.getStorageSync('shipInfo').voyageScheduleDataList
},
methods: {
open() {
@ -348,28 +357,13 @@
},
dropTable() {
console.log('删除表');
let sql = 'DROP TABLE shipmentShipLoadPlansRespList;'
let sql = 'DROP TABLE shipInfoTable;'
this.executeSql(sql)
},
dropData() {
let sql = "delete from shipOption"
let sql = "delete from shipInfoTable"
this.executeSql(sql)
},
add() {
let data = this.shipInfo
data.forEach(v => {
let date = new Date().getTime()
let str = String(date)
v["id"] = Number(str.slice(str.length - 5))
})
let dbTable = 'messageRespList'
let sql = '';
for (let i = 0; i < data.length; i++) {
sql = "insert into " + dbTable + " values('" + data[i].id + "','" + data[i].berthStatus + "')";
this.executeSql(sql)
console.log(data[i].id)
}
},
//
executeSql(sql) {
sqlite.executeSqlCeshi(sql).then((value) => {
@ -387,8 +381,7 @@
//
initData() {
uni.request({
url: this.$local + '/api/shipOperate/select?pamId=' + this.pamValue + "&vvyId=" + this
.shipValue,
url: `${this.$local}/api/shipOperate/select?pamId=${this.pamValue}&vvyId=${this.shipValue}`,
header: {
'Content-Type': 'application/json' //
},
@ -423,7 +416,7 @@
//
getShip() {
uni.request({
url: this.$local + '/api/shipOperate/queryShipmentVoyageData?key=' + this.shipInput,
url: `${this.$local}/api/shipOperate/queryShipmentVoyageData?key=${this.shipInput}`,
header: {
'Content-Type': 'application/json' //
},
@ -460,6 +453,19 @@
}]
// this.initData()
},
//
shipDataInfo() {
let webStatus = 0
let sql = ""
let date = new Date().getTime()
let webId = uuidv4()
let webDate = api.getDate(date)
sql =
`insert into shipInfoTable values('${webId}','${this.shipInfo.vslCd}','${this.shipInfo.vslCnname}',
'${this.shipInfo.vvyId}','${this.shipInfo.vvyName}','${this.shipInfo.importExportFlag}','${this.shipInfo.importExportFlagName}',
'${this.shipInfo.tradeType}','${this.shipInfo.tradeTypeName}','${webStatus}','${webDate}')`
this.executeSql(sql)
},
//
cbzlData() {
let webStatus = 0
@ -473,6 +479,7 @@
'${this.shipData.spmCabinht}','${this.shipData.spmMintide}','${this.shipData.spmCab}','${this.shipData.spmBoardCentrele}',
'${this.shipData.spmBoardFrontle}','${this.shipData.spmBoardLaterle}','${this.shipData.spmBoardCentrerg}','${this.shipData.spmBoardFrontrg}','${this.shipData.spmBoardLaterrg}',
'${webStatus}','${webDate}')`
console.log(sql)
this.executeSql(sql)
},
//
@ -524,6 +531,7 @@
this.zycxData()
this.cbzlData()
this.xlData()
this.shipDataInfo()
// let ids = []
// if (item.inVvyId != null && item.outVvyId == null) {
// ids.push(item.inVvyId)

View File

@ -33,7 +33,7 @@
</view>
<view class="li">
<p><text class="required" v-if="obj.state != 'look'">*</text></p>
<uni-number-box v-model="size" v-if="obj.state != 'look'" />
<uni-number-box v-model="size" :max="1000000000" v-if="obj.state != 'look'" />
<text v-else>{{size}}</text>
</view>
<view class="li">

View File

@ -71,6 +71,9 @@
this.shipInfo = uni.getStorageSync('shipInfo')
if (this.tabsType == 0) {
this.executeSql1('messageRespList')
} else {
this.executeSql1('workMessageRespList')
this.executeSql1('workMessageRespInfoList')
}
},
methods: {
@ -80,6 +83,8 @@
sqlite.executeSqlCeshi(sql).then((value) => {
if (this.tabsType == 0) {
this.peopleInfo = value
} else {
console.log(value)
}
}).catch((error) => {
// reject
@ -96,8 +101,11 @@
this.tabsIndex = index;
if (item == "人员信息") {
this.tabsType = 0;
this.executeSql1('messageRespList')
} else {
this.tabsType = 1;
this.executeSql1('workMessageRespList')
this.executeSql1('workMessageRespInfoList')
}
},
//

View File

@ -34,12 +34,12 @@
</view>
<view class="li">
<p><text class="required" v-if="obj.state != 'look'">*</text></p>
<uni-number-box v-model="vehicleSize" v-if="obj.state != 'look'" />
<uni-number-box v-model="vehicleSize" :max="1000000000" v-if="obj.state != 'look'" />
<text v-else>{{vehicleSize}}</text>
</view>
<view class="li">
<p><text class="required" v-if="obj.state != 'look'">*</text></p>
<uni-number-box v-model="sparePart" v-if="obj.state != 'look'" />
<uni-number-box v-model="sparePart" :max="1000000000" v-if="obj.state != 'look'" />
<text v-else>{{sparePart}}</text>
</view>
<view class="li">

View File

@ -34,12 +34,14 @@
</view>
<view class="li">
<p><text class="required" v-if="obj.state != 'look'">*</text></p>
<uni-number-box @change="workChange" v-model="workValue" v-if="obj.state != 'look'" />
<uni-number-box @change="workChange" v-model="workValue" :max="1000000000"
v-if="obj.state != 'look'" />
<text v-else>{{peopleRow.workSuite}}</text>
</view>
<view class="li">
<p><text class="required" v-if="obj.state != 'look'">*</text></p>
<uni-number-box @change="shipChange" v-model="shipValue" v-if="obj.state != 'look'" />
<uni-number-box @change="shipChange" v-model="shipValue" :max="1000000000"
v-if="obj.state != 'look'" />
<text v-else>{{peopleRow.shipPerson}}</text>
</view>
<view class="li">

View File

@ -52,7 +52,7 @@
</view>
<view class="li">
<p><text class="required">*</text>数量</p>
<uni-number-box @change="numChange" v-model="item2.numValue" />
<uni-number-box @change="numChange" v-model="item2.numValue" :max="1000000000" />
</view>
<view class="li">
<p class="liTitle"><text class="required">*</text>装卸方式</p>
@ -106,15 +106,15 @@
</view>
<view class="li">
<p class="liTitle"><text class="required">*</text>数量</p>
<uni-number-box v-model="item2.numValue" />
<uni-number-box v-model="item2.numValue" :max="1000000000" />
</view>
<view class="li">
<p class="liTitle"><text class="required">*</text>体积</p>
<uni-number-box v-model="item2.tjValue" />
<uni-number-box v-model="item2.tjValue" :max="1000000000" />
</view>
<view class="li">
<p class="liTitle"><text class="required">*</text>重量</p>
<uni-number-box v-model="item2.zlValue" />
<uni-number-box v-model="item2.zlValue" :max="1000000000" />
</view>
</view>
</view>
@ -128,11 +128,7 @@
<view class="ul">
<view class="li">
<p class="liTitle"><text class="required">*</text>技术工人</p>
<uni-number-box v-model="otherObj.jsWorker" />
</view>
<view class="li">
<p class="liTitle"><text class="required">*</text>普通工人</p>
<uni-number-box v-model="otherObj.ptworker" />
<uni-number-box v-model="otherObj.jsWorker" :max="1000000000" />
</view>
<view class="li">
<p class="liTitle"><text class="required">*</text>作业时间 </p>
@ -141,11 +137,28 @@
</view>
<view class="li">
<p class="liTitle"><text class="required">*</text>重量</p>
<uni-number-box v-model="otherObj.zlValue" />
<uni-number-box v-model="otherObj.zlValue" :max="1000000000" />
</view>
<view class="li">
<p class="liTitle"><text class="required">*</text>体积</p>
<uni-number-box v-model="otherObj.tjValue" />
<uni-number-box v-model="otherObj.tjValue" :max="1000000000" />
</view>
<view class="li">
<p class="liTitle"><text class="required">*</text>普通工人</p>
<uni-number-box v-model="otherObj.ptworker" :max="1000000000" />
</view>
<view class="li">
<p class="liTitle"><text class="required">*</text>作业时间 </p>
<uni-datetime-picker v-model="otherObj.datetime2" type="datetimerange" rangeSeparator="-"
@change="changeLog(otherObj)" />
</view>
<view class="li">
<p class="liTitle"><text class="required">*</text>重量</p>
<uni-number-box v-model="otherObj.zlValue2" :max="1000000000" />
</view>
<view class="li">
<p class="liTitle"><text class="required">*</text>体积</p>
<uni-number-box v-model="otherObj.tjValue2" :max="1000000000" />
</view>
<view class="li">
<p class="liTitle">描述</p>
@ -183,6 +196,10 @@
<script>
import sqlite from "../../common/sqlite.js"
import api from "../../common/api.js"
import {
v4 as uuidv4
} from 'uuid';
export default {
data() {
return {
@ -262,12 +279,17 @@
//
otherObj: {
jsWorker: 0,
ptworker: 0,
datetime: ['', ''],
startTime: "",
endTime: "",
zlValue: 0,
tjValue: 0,
ptworker: 0,
datetime2: ['', ''],
startTime2: "",
endTime2: "",
zlValue2: 0,
tjValue2: 0,
describe: "",
dgWork: "",
notes: "",
@ -435,7 +457,9 @@
this.ulList1[index].ulList2.push({
cxValue: "",
numValue: 0,
cxTextValue: "",
fsValue: "",
fsTextValue: "",
notes: "",
})
},
@ -452,6 +476,10 @@
changeLog(item) {
item.startTime = item.datetime[0].slice(0, item.datetime[0].length - 3)
item.endTime = item.datetime[1].slice(0, item.datetime[1].length - 3)
if (item.startTime2 != undefined) {
item.startTime2 = item.datetime2[0].slice(0, item.datetime2[0].length - 3)
item.endTime2 = item.datetime2[1].slice(0, item.datetime2[1].length - 3)
}
},
//
delGb(index) {
@ -540,7 +568,6 @@
delFc2(index, index2) {
this.fcUlList[index].fcUlList2.splice(index2, 1)
},
//
cancel() {
uni.setStorageSync('tabsType', 1);
@ -558,34 +585,70 @@
},
//
save() {
let addShiftArr = uni.getStorageSync('addShiftArr')
let addShiftObj = {
vvyName: this.hcTextValue,
vvyId: this.hcValue,
loadTypeName: this.zxTextValue,
loadType: this.zxValue,
shiftList: this.ulList1,
fcList: this.fcUlList,
otherList: this.otherObj
if (this.obj.state == "edit") {} else if (this.obj.state == "add") {
for (let i = 0; i < this.ulList1.length; i++) {
let webId = uuidv4()
let contactId = ""
let webStatus = "0"
let date = new Date().getTime()
let webDate = api.getDate(date)
let sql = `insert into workMessageRespList values('${webId}','${contactId}','${this.hcValue}',
'${this.hcTextValue}','${this.zxValue}','${this.zxTextValue}','${this.ulList1[i].gbValue}',
'${this.ulList1[i].gbTextValue}','${this.ulList1[i].startTime}','${this.ulList1[i].endTime}',
'${this.shipInfo.voyageScheduleDataList[0].tradeTypeName}',
'${this.shipInfo.voyageScheduleDataList[0].importExportFlagName}','${this.shipInfo.voyageScheduleDataList[0].spmName}',
'${webStatus}','${webDate}')`
this.executeSql(sql)
for (let j = 0; j < this.ulList1[i].ulList2.length; j++) {
let webId = uuidv4()
let contactId = ""
let webDate = api.getDate(date)
let sql2 = `insert into workMessageRespInfoList values('${webId}','${contactId}','${this.ulList1[i].ulList2[j].cxValue}',
'${this.ulList1[i].ulList2[j].cxTextValue}','${this.ulList1[i].ulList2[j].numValue}','${this.ulList1[i].ulList2[j].fsValue}',
'${this.ulList1[i].ulList2[j].fsTextValue}','${this.ulList1[i].ulList2[j].notes}',
'${this.shipInfo.voyageScheduleDataList[0].tradeTypeName}','${this.shipInfo.voyageScheduleDataList[0].importExportFlagName}',
'${this.shipInfo.voyageScheduleDataList[0].spmName}','${webStatus}','${webDate}')`
this.executeSql(sql2)
}
if (this.obj.state == 'add') {
if (addShiftArr != "") {
addShiftArr.push(addShiftObj)
uni.setStorageSync('addShiftArr', addShiftArr);
} else {
addShiftArr = []
addShiftArr.push(addShiftObj)
uni.setStorageSync('addShiftArr', addShiftArr);
}
} else {
addShiftArr[this.shiftRowIndex] = addShiftObj;
uni.setStorageSync('addShiftArr', addShiftArr);
}
// let addShiftArr = uni.getStorageSync('addShiftArr')
// let addShiftObj = {
// vvyName: this.hcTextValue,
// vvyId: this.hcValue,
// loadTypeName: this.zxTextValue,
// loadType: this.zxValue,
// shiftList: this.ulList1,
// fcList: this.fcUlList,
// otherList: this.otherObj
// }
// if (this.obj.state == 'add') {
// if (addShiftArr != "") {
// addShiftArr.push(addShiftObj)
// uni.setStorageSync('addShiftArr', addShiftArr);
// } else {
// addShiftArr = []
// addShiftArr.push(addShiftObj)
// uni.setStorageSync('addShiftArr', addShiftArr);
// }
// } else {
// addShiftArr[this.shiftRowIndex] = addShiftObj;
// uni.setStorageSync('addShiftArr', addShiftArr);
// }
uni.setStorageSync('tabsType', 1);
uni.navigateTo({
url: '/pages/shipWork/mixWork'
})
},
executeSql(sql) {
sqlite.executeSqlCeshi(sql).then((value) => {
// resolve
console.log(value);
}).catch((error) => {
// reject
console.error(error);
});
},
onBackPress(event) {
uni.setStorageSync('tabsType', 1);
uni.navigateTo({

View File

@ -97,10 +97,6 @@
<p>技术工人</p>
<text>{{dataInfo.otherList.jsWorker}}</text>
</view>
<view class="li">
<p>普通工人</p>
<text>{{dataInfo.otherList.ptworker}}</text>
</view>
<view class="li">
<p>作业时间</p>
<text>{{dataInfo.otherList.startTime}} - {{dataInfo.otherList.endTime}}</text>
@ -113,6 +109,22 @@
<p>体积</p>
<text>{{dataInfo.otherList.tjValue}}</text>
</view>
<view class="li">
<p>普通工人</p>
<text>{{dataInfo.otherList.ptworker}}</text>
</view>
<view class="li">
<p>作业时间</p>
<text>{{dataInfo.otherList.startTime2}} - {{dataInfo.otherList.endTime2}}</text>
</view>
<view class="li">
<p>重量</p>
<text>{{dataInfo.otherList.zlValue2}}</text>
</view>
<view class="li">
<p>体积</p>
<text>{{dataInfo.otherList.tjValue2}}</text>
</view>
<view class="li wLi">
<p>描述</p>
<text>{{dataInfo.otherList.describe}}</text>
@ -251,7 +263,7 @@
flex-wrap: wrap;
.li {
width: 45%;
width: 50%;
display: flex;
padding: 10px 20px;
line-height: 35px;

View File

@ -34,7 +34,7 @@
</view>
<view class="li">
<p><text class="required" v-if="obj.state != 'look'">*</text></p>
<uni-number-box v-model="supplyAmount" v-if="obj.state != 'look'" />
<uni-number-box v-model="supplyAmount" :max="1000000000" v-if="obj.state != 'look'" />
<text v-else>{{supplyAmount}}</text>
</view>
<view class="li">

View File

@ -8,7 +8,7 @@
</view>
<view class="li">
<p><text class="required" v-if="obj.state != 'look'">*</text></p>
<uni-number-box v-model="zlShip" v-if="obj.state != 'look'" />
<uni-number-box v-model="zlShip" :max="1000000000" v-if="obj.state != 'look'" />
<text v-else>{{zlShip}}</text>
</view>
<view class="li">

View File

@ -34,7 +34,7 @@
</view>
<view class="li">
<p><text class="required" v-if="obj.state != 'look'">*</text></p>
<uni-number-box v-model="personNumber" v-if="obj.state != 'look'" />
<uni-number-box v-model="personNumber" :max="1000000000" v-if="obj.state != 'look'" />
<text v-else>{{personNumber}}</text>
</view>
<view class="li">
@ -45,12 +45,12 @@
</view>
<view class="li">
<p><text class="required" v-if="obj.state != 'look'">*</text></p>
<uni-number-box v-model="vehicleSize" v-if="obj.state != 'look'" />
<uni-number-box v-model="vehicleSize" :max="1000000000" v-if="obj.state != 'look'" />
<text v-else>{{vehicleSize}}</text>
</view>
<view class="li">
<p><text class="required" v-if="obj.state != 'look'">*</text></p>
<uni-number-box v-model="sparePart" v-if="obj.state != 'look'" />
<uni-number-box v-model="sparePart" :max="1000000000" v-if="obj.state != 'look'" />
<text v-else>{{sparePart}}</text>
</view>
<view class="li">