Commit bad4185a authored by Damon's avatar Damon

完工页面-拆分调节

parent 0cd5cb61
...@@ -9,38 +9,49 @@ ...@@ -9,38 +9,49 @@
mode="center" mode="center"
width="690rpx"> width="690rpx">
<view class="slot-content"> <view class="slot-content">
<view class="check-status"> <view v-if="confirmButtonText !== '确定'">
<u-image width="224rpx" height="224rpx" :src="statusImage"></u-image> <view class="check-status">
<text :class="['status-txt', { 'pass-color': pass }]">{{statusTxt}}</text> <u-image width="224rpx" height="224rpx" :src="statusImage"></u-image>
</view> <text :class="['status-txt', { 'pass-color': pass }]">{{statusTxt}}</text>
<view class="check-list">
<view class="u-flex u-row-between list-title">
<view class="left-txt">验证项</view>
<view>已提交/需提交</view>
<view class="right-txt">结果</view>
</view> </view>
<view class="u-flex u-row-between list-item" <view class="check-list">
v-for="(item, index) in listData" :key="index"> <view class="u-flex u-row-between list-title">
<view class="item-txt left-txt" style="width: 160rpx;text-align: left;"> <view class="left-txt">验证项</view>
<u-icon <view>已提交/需提交</view>
:name="item.pass ? passIcon : noPassIcon" <view class="right-txt">结果</view>
:label="item.label"
margin-left="12"
label-color="#333333"
label-size="28"
size="32"></u-icon>
</view> </view>
<view class="item-txt">{{item.submitted}}/{{item.required}}</view> <view class="u-flex u-row-between list-item"
<view v-for="(item, index) in listData" :key="index">
:class="['item-txt', 'right-txt', item.pass ? 'pass-color' : 'no-pass-color']" <view class="item-txt left-txt" style="width: 200rpx;text-align: left;">
style="width: 160rpx;text-align: right;"> <u-icon
{{item.pass ? "通过" : "未通过"}} :name="item.pass ? passIcon : noPassIcon"
:label="item.label"
margin-left="12"
label-color="#333333"
label-size="28"
size="32"></u-icon>
</view>
<view class="item-txt">{{item.submitted}}/{{item.required}}</view>
<view
:class="['item-txt', 'right-txt', item.pass ? 'pass-color' : 'no-pass-color']"
style="width: 160rpx;text-align: right;">
{{item.pass ? "通过" : "未通过"}}
</view>
</view> </view>
</view> </view>
</view> </view>
<view v-else>
<view class="check-status">
<text class='status-txt' style="color: #333;">确认安装结果</text>
</view>
<view class="u-flex no-install">
<text class="tips">提交信息,确认安装结论为不安装</text>
</view>
</view>
<view class="check-bottom"> <view class="check-bottom">
<view class="button cancel" v-show="!pass" @tap="cancel">取消</view> <view class="button cancel" v-show="cancelButtonText !== ''" @tap="cancel">{{ cancelButtonText }}</view>
<view class="button confirm" @tap="confirm">{{confirmText}}</view> <view class="button confirm" @tap="confirm">{{ confirmButtonText }}</view>
</view> </view>
</view> </view>
</u-popup> </u-popup>
...@@ -79,6 +90,14 @@ ...@@ -79,6 +90,14 @@
{label: '安装信息', submitted: 15, required: 20, pass: false} {label: '安装信息', submitted: 15, required: 20, pass: false}
] ]
} }
},
confirmButtonText: {
type: String,
default: '确定'
},
cancelButtonText: {
type: String,
default: ''
} }
}, },
data() { data() {
...@@ -104,9 +123,6 @@ ...@@ -104,9 +123,6 @@
statusTxt() { statusTxt() {
return this.pass ? "完工校验已通过" : "完工校验未通过" return this.pass ? "完工校验已通过" : "完工校验未通过"
}, },
confirmText() {
return this.pass ? "确定" : "去处理"
},
passIcon() { return process.uniEnv.qn_base_url + 'icon/pass.png'}, passIcon() { return process.uniEnv.qn_base_url + 'icon/pass.png'},
noPassIcon() { return process.uniEnv.qn_base_url + 'icon/no-pass.png'}, noPassIcon() { return process.uniEnv.qn_base_url + 'icon/no-pass.png'},
}, },
...@@ -115,14 +131,7 @@ ...@@ -115,14 +131,7 @@
this.$emit('close') this.$emit('close')
}, },
confirm() { confirm() {
if(this.pass) { this.$emit('confirm')
this.$emit('change')
} else {
let data = this.listData.find((item, index) => {
return item.pass == false;
})
this.$emit('handle', data)
}
} }
}, },
...@@ -161,6 +170,15 @@ ...@@ -161,6 +170,15 @@
margin-bottom: 40rpx; margin-bottom: 40rpx;
} }
} }
.no-install {
justify-content: center;
align-items: center;
height: 200rpx;
border-top: 2rpx solid #F4F5F7;
.tips {
font-size: 28rpx;
}
}
.check-bottom { .check-bottom {
display: flex; display: flex;
justify-content: center; justify-content: center;
...@@ -194,7 +212,7 @@ ...@@ -194,7 +212,7 @@
line-height: 32rpx; line-height: 32rpx;
} }
.left-txt { .left-txt {
width: 160rpx; width: 200rpx;
text-align: left; text-align: left;
} }
.right-txt { .right-txt {
......
...@@ -3,6 +3,9 @@ ...@@ -3,6 +3,9 @@
<view :style="{'width': fieldsWidth}"> <view :style="{'width': fieldsWidth}">
<u-input :type="type" class="input-item" v-model="dataValue" @input="valueChange" :placeholder="placeholder" :placeholder-style="placeholderStyle" <u-input :type="type" class="input-item" v-model="dataValue" @input="valueChange" :placeholder="placeholder" :placeholder-style="placeholderStyle"
:custom-style="customStyle" :clearable="false" :border="border" border-color="#ECECEC" :maxlength="maxlength" :cursor-spacing="10" hold-keyboard/> :custom-style="customStyle" :clearable="false" :border="border" border-color="#ECECEC" :maxlength="maxlength" :cursor-spacing="10" hold-keyboard/>
<view class="content" v-if="slotContent">
<text class="txt">{{ slotContent }}</text>
</view>
</view> </view>
</template> </template>
...@@ -26,6 +29,10 @@ ...@@ -26,6 +29,10 @@
type: { type: {
type: String, type: String,
default: 'text' default: 'text'
},
slotContent: {
type: String,
default: ''
} }
// width: { // 例如:454rpx // width: { // 例如:454rpx
// type: String, // type: String,
...@@ -97,8 +104,16 @@ ...@@ -97,8 +104,16 @@
} }
</script> </script>
<style scoped> <style lang="scss" scoped>
.input-item{ .input-item{
background: #F4F5F7; background: #F4F5F7;
} }
.content {
padding-top: 20rpx;
line-height: 45rpx;
.txt {
font-size: 24rpx;
color: #999;
}
}
</style> </style>
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment