fix:功能调整
This commit is contained in:
@@ -63,10 +63,10 @@ const journeyTypeList = ref([])
|
||||
const data = reactive({
|
||||
form: {},
|
||||
rules: {
|
||||
name: [{ type: 'string', required: true, message: '请输入标题', trigger: ['change', 'blur'] }],
|
||||
createTime: [{ type: 'string', required: true, message: '请选择记录时间', trigger: ['change', 'blur'] }],
|
||||
type: [{ type: 'string', required: true, message: '请选择类型', trigger: ['change', 'blur'] }],
|
||||
remark: [{ type: 'string', required: true, message: '请输入内容', trigger: ['change', 'blur'] }],
|
||||
name: [{ type: 'string', required: true, message: '标题不能为空', trigger: ['change', 'blur'] }],
|
||||
createTime: [{ type: 'string', required: true, message: '记录时间不能为空', trigger: ['change', 'blur'] }],
|
||||
type: [{ type: 'string', required: true, message: '类型不能为空', trigger: ['change', 'blur'] }],
|
||||
remark: [{ type: 'string', required: true, message: '内容不能为空', trigger: ['change', 'blur'] }],
|
||||
}
|
||||
})
|
||||
const { form, rules} = toRefs(data)
|
||||
@@ -84,17 +84,30 @@ onLoad((option) => {
|
||||
proxy.$refs['uForm'].setRules(rules.value)
|
||||
})
|
||||
function getDict() {
|
||||
// 工单状态
|
||||
// 类型
|
||||
getDicts('journey_type').then(res => {
|
||||
journeyTypeList.value =[res.data]
|
||||
})
|
||||
if(form.value.id!=null){
|
||||
getHeartJourney(form.value.id).then(res => {
|
||||
form.value = res.data
|
||||
// 类型
|
||||
getDicts('journey_type').then(result => {
|
||||
form.value.typeName=dictStr(form.value.type, result.data)
|
||||
})
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
function dictStr(val, arr) {
|
||||
let str = ''
|
||||
arr.map(item => {
|
||||
if (item.dictValue === val) {
|
||||
str = item.dictLabel
|
||||
}
|
||||
})
|
||||
return str
|
||||
}
|
||||
|
||||
function handleShowTeam() {
|
||||
if (journeyTypeList.value[0].length === 0) {
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
>
|
||||
</u-navbar>
|
||||
<view class="section">
|
||||
<!-- <view class="section-title">{{ detailInfo.name }}</view> -->
|
||||
<uni-cellItem title="标题:" :value="detailInfo.name"></uni-cellItem>
|
||||
<uni-cellItem title="记录时间:" :value="detailInfo.createTime"></uni-cellItem>
|
||||
<uni-cellItem title="内容:"></uni-cellItem>
|
||||
<view class="content">{{ detailInfo.remark }}</view>
|
||||
<u-cell-group>
|
||||
<u-cell title="标题:" titleStyle="font-weight:bolder" :value="detailInfo.name"></u-cell>
|
||||
<u-cell title="记录时间:" titleStyle="font-weight:bolder" :value="detailInfo.createTime"></u-cell>
|
||||
<u-cell title="内容:" titleStyle="font-weight:bolder" center :value="detailInfo.remark"> </u-cell>
|
||||
</u-cell-group>
|
||||
</view>
|
||||
<u-toast ref="uToast"></u-toast>
|
||||
</view>
|
||||
|
||||
@@ -120,7 +120,7 @@ function getList() {
|
||||
})
|
||||
}
|
||||
function getDict() {
|
||||
// 工单状态
|
||||
// 类型
|
||||
getDicts('journey_type').then(res => {
|
||||
journeyTypeList.value = res.data
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user