Commit 70bd1d21 authored by 乐宝呗666's avatar 乐宝呗666

修改机顶盒激活上报的问题

parent eba2434a
...@@ -5,13 +5,16 @@ ...@@ -5,13 +5,16 @@
class="field-form-item" class="field-form-item"
readonly readonly
clickable clickable
required
name="organName" name="organName"
:value="boxInfo.organName" :value="boxInfo.organName"
label="机顶盒所属单位" label="机顶盒所属单位"
placeholder="请选择组织单位" placeholder="请选择组织单位"
:right-icon="showOrg ? 'arrow-up' : 'arrow-down'" :right-icon="showOrg ? 'arrow-up' : 'arrow-down'"
@click="showOrg = true" @click="showOrg = true"
:rules="[{ required: true }]" :rules="[
{ required: true, message: '请选择组织单位', trigger: 'change'}
]"
/> />
<van-popup v-model="showOrg" position="bottom"> <van-popup v-model="showOrg" position="bottom">
<van-picker <van-picker
...@@ -24,10 +27,14 @@ ...@@ -24,10 +27,14 @@
<van-field <van-field
class="field-form-item" class="field-form-item"
v-model="boxInfo.macURL" v-model="boxInfo.macURL"
required
name="macURL" name="macURL"
label="机顶盒Mac地址" label="机顶盒Mac地址"
placeholder="请填写机顶盒Mac地址" placeholder="请填写机顶盒Mac地址"
:rules="[{ required: true }]" :rules="[
{ required: true, message: '请填写机顶盒Mac地址', trigger: ['blur', 'change'] },
{ pattern: /^[A-F0-9]{2}([-:]?[A-F0-9]{2})([-:.]?[A-F0-9]{2})([-:]?[A-F0-9]{2})([-:.]?[A-F0-9]{2})([-:]?[A-F0-9]{2})$/, message: '请填写正确的Mac地址', trigger: ['blur', 'change']}
]"
/> />
<div class="form-page-button"> <div class="form-page-button">
<van-button type="default" native-type="submit" v-if="actived === '1'" <van-button type="default" native-type="submit" v-if="actived === '1'"
...@@ -52,7 +59,6 @@ export default { ...@@ -52,7 +59,6 @@ export default {
showUser: false, showUser: false,
}; };
}, },
watch: {},
mounted() { mounted() {
this.getorganName(); this.getorganName();
}, },
...@@ -67,8 +73,13 @@ export default { ...@@ -67,8 +73,13 @@ export default {
}) })
.then((res) => { .then((res) => {
if (res.data.resultCode === "200") { if (res.data.resultCode === "200") {
vm.orgList = res.data.data; if(this.actived==='1'){
vm.orgNameList = res.data.data.map((item) => item.organName); this.orgList = res.data.data.filter(item=>item.status !==2)
}
if(this.actived==='2'){
this.orgList = res.data.data.filter(item=>item.status===2)
}
vm.orgNameList = this.orgList.map((item) => item.organName);
} }
}) })
.catch(function (err) { .catch(function (err) {
...@@ -138,6 +149,10 @@ export default { ...@@ -138,6 +149,10 @@ export default {
margin-right: 12px; margin-right: 12px;
} }
} }
.van-cell--required::before {
left: -10px;
color:#A4151D;
}
} }
.form-page-button { .form-page-button {
text-align: center; text-align: center;
...@@ -181,7 +196,6 @@ export default { ...@@ -181,7 +196,6 @@ export default {
font-weight: normal; font-weight: normal;
} }
} }
.van-tabs__nav--card { .van-tabs__nav--card {
margin: 0; margin: 0;
} }
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<div class="opt-page"> <div class="opt-page">
<van-tabs type="card" v-model="activeName"> <van-tabs type="card" v-model="activeName">
<van-tab title="机顶盒激活" name="1"> <van-tab title="机顶盒激活" name="1">
<custom-form actived="1"></custom-form> <custom-form actived="1"></custom-form>
</van-tab> </van-tab>
<van-tab title="故障上报" name="2"> <van-tab title="故障上报" name="2">
<custom-form actived="2"></custom-form> <custom-form actived="2"></custom-form>
......
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