Explorar o código

时间选择器添加边框

xiaohaizhao hai 1 ano
pai
achega
8e4e936775

+ 21 - 6
control/components/prodnum-MT02/modules/division.vue

@@ -19,7 +19,7 @@
             </view>
             <view class="row">
                 <view class="box">
-                    <view class="">
+                    <view>
                         开始时间
                     </view>
                     <view class="content">
@@ -27,7 +27,7 @@
                     </view>
                 </view>
                 <view class="box">
-                    <view class="">
+                    <view>
                         结束时间
                     </view>
                     <view class="content">
@@ -54,17 +54,17 @@
                         <view class="label">
                             开始时间:
                         </view>
-                        <view class="value">{{ changeItem.showValue.begin || ' --' }}
+                        <view class="value day-parting-row">{{ changeItem.showValue.begin || ' --' }}
                         </view>
                     </view>
                 </picker>
-                <picker class="row" mode="time" :start="changeItem.showValue.begin" :value="changeItem.showValue.end"
-                    data-name="end" @change="timeChange">
+                <picker mode="time" :start="changeItem.showValue.begin" :value="changeItem.showValue.end" data-name="end"
+                    @change="timeChange">
                     <view class="row">
                         <view class="label">
                             结束时间:
                         </view>
-                        <view class="value">{{ changeItem.showValue.end || ' --' }}</view>
+                        <view class="value day-parting-row">{{ changeItem.showValue.end || ' --' }}</view>
                     </view>
                 </picker>
                 <view class="row">
@@ -180,6 +180,20 @@ export default {
 </script>
 
 <style lang="scss" scoped>
+/* 边框 */
+.day-parting-row {
+    display: flex;
+    align-items: center;
+    flex: 1;
+    width: 0;
+    border: 1px solid #dadbde;
+    border-radius: 4px;
+    padding: 6px 9px;
+    height: 35px;
+    font-size: 14px;
+    box-sizing: border-box;
+}
+
 .item {
     position: relative;
     padding: 4px 6px 6px;
@@ -243,6 +257,7 @@ export default {
         align-items: center;
         line-height: 35px;
         width: 100%;
+        margin-top: 4px;
 
         .label {
             width: 80px;

+ 19 - 4
control/components/prodnum-MT03/modules/division.vue

@@ -44,17 +44,17 @@
                         <view class="label">
                             开始时间:
                         </view>
-                        <view class="value">{{ changeItem.showValue.begin || ' --' }}
+                        <view class="value day-parting-row">{{ changeItem.showValue.begin || ' --' }}
                         </view>
                     </view>
                 </picker>
-                <picker class="row" mode="time" :start="changeItem.showValue.begin" :value="changeItem.showValue.end"
-                    data-name="end" @change="timeChange">
+                <picker mode="time" :start="changeItem.showValue.begin" :value="changeItem.showValue.end" data-name="end"
+                    @change="timeChange">
                     <view class="row">
                         <view class="label">
                             结束时间:
                         </view>
-                        <view class="value">{{ changeItem.showValue.end || ' --' }}</view>
+                        <view class="value day-parting-row">{{ changeItem.showValue.end || ' --' }}</view>
                     </view>
                 </picker>
                 <view class="row">
@@ -171,6 +171,20 @@ export default {
 </script>
 
 <style lang="scss" scoped>
+/* 边框 */
+.day-parting-row {
+    display: flex;
+    align-items: center;
+    flex: 1;
+    width: 0;
+    border: 1px solid #dadbde;
+    border-radius: 4px;
+    padding: 6px 9px;
+    height: 35px;
+    font-size: 14px;
+    box-sizing: border-box;
+}
+
 .item {
     position: relative;
     padding: 4px 6px 6px;
@@ -234,6 +248,7 @@ export default {
         align-items: center;
         line-height: 35px;
         width: 100%;
+        margin-top: 4px;
 
         .label {
             width: 80px;

+ 24 - 8
control/modules/My_input.vue

@@ -55,11 +55,13 @@
                     </view>
                     <view class="day-parting">
                         <picker mode="time" :value="item.params[item.key + 'T'].lastvalue" @change="changeT_T">
-                            <view class="row">
+                            <view class="row ">
                                 <view class="label">
                                     时间:
                                 </view>
-                                {{ item.params[item.key + 'T'].lastvalue || '请选择时间' }}
+                                <view class="day-parting-row">
+                                    {{ item.params[item.key + 'T'].lastvalue || '请选择时间' }}
+                                </view>
                             </view>
                         </picker>
 
@@ -194,9 +196,9 @@ export default {
                     toBeUpdated = item.paramValue.time || item.paramValue.value ? `查询到一条待更新指令,更新内容为:时间${item.paramValue.time.split("_").join(":")},压力${item.paramValue.value}MPA` : ""
                     let p = item.params[item.key + 'P'];
                     if (p.num_minvalue || p.num_maxvalue) tips += `输入范围:${p.num_minvalue || 0} ~ ${p.num_maxvalue || '∞'}`
-                    if (p.num_scale) tips += `保留${p.num_scale}位小数`
-                    if (p.num_step) tips += `增量${p.num_step || 0}`
-                    if (tips && p.unit) tips += `单位${p.unit}`
+                    if (p.num_scale) tips += ` 保留${p.num_scale}位小数`
+                    if (p.num_step) tips += ` 增量${p.num_step || 0}`
+                    if (tips && p.unit) tips += ` 单位${p.unit}`
                     setTimeout(() => {
                         this.dayPartingFocus = true
                     }, 300);
@@ -212,9 +214,9 @@ export default {
                     if (this.value > params.num_maxvalue) this.value = params.num_maxvalue;
                     if (this.value < params.num_minvalue) this.value = params.num_minvalue;
                     if (params.num_minvalue || params.num_maxvalue) tips += `输入范围:${params.num_minvalue || 0} ~ ${params.num_maxvalue || '∞'}`
-                    if (params.num_scale) tips += `保留${params.num_scale}位小数`
-                    if (params.num_step) tips += `增量${params.num_step || 0}`
-                    if (tips && params.unit) tips += `单位${params.unit}`
+                    if (params.num_scale) tips += ` 保留${params.num_scale}位小数`
+                    if (params.num_step) tips += ` 增量${params.num_step || 0}`
+                    if (tips && params.unit) tips += ` 单位${params.unit}`
                     setTimeout(() => {
                         this.intFocus = true
                     }, 300);
@@ -320,6 +322,20 @@ export default {
 .content {
     width: 100%;
 
+    /* 边框 */
+    .day-parting-row {
+        display: flex;
+        align-items: center;
+        flex: 1;
+        width: 0;
+        border: 1px solid #dadbde;
+        border-radius: 4px;
+        padding: 6px 9px;
+        height: 35px;
+        font-size: 14px;
+        box-sizing: border-box;
+    }
+
     .title {
         text-align: center;
         font-size: 16px;