|
- <template>
- <view class="main">
-
-
- <view v-if="current===0">
- <view class="buts">
- <view><button class="but" @click="liuyt">生成二维码</button></view>
- <view><button class="butss">采集</button></view>
- </view>
-
- </view>
-
-
- <dialog id="dev" class="dev">
- <form onsubmit={this.onsubmit}>
- <view>
- <text class="text_2">追溯码生成</text>
- </view>
- <view class="item">
- <text>追溯码: </text>
- <input name="zsm" placeholder="请输入追溯码" />
- </view>
- <view class="item">
- <text>接收人: </text>
- <input name="jsr" placeholder="请输入接收人" />
- </view>
- <picker class="picker" id="selector" mode="selector" value={selectorValue}
- onChange={this.selectorChange} name="jes">
- <text name="jess">选择性别:{genderDesc}</text>
- </picker>
- <view class="item">
- <text>所属科室: </text>
- <input name="ssks" placeholder="请输入所属科室" />
- </view>
- <button type="submit">提交</button>
- <button type="reset">重置</button>
- <button @click="qux">取消</button>
- </form>
- </dialog>
- </view>
- </template>
- <style>
- .main {
- width: 100%;
- height: 100%;
- }
- .picker {
- margin: 8px;
- }
- .main {
- width: 100%;
- height: 100%;
- }
- form {
- margin: 5px;
- }
- button {
- margin: 5px;
- }
- .item {
- flex-direction: row;
- align-items: center;
- margin: 5px;
- }
- .dev {
- width: 100%;
- height: 100%;
- background: #ffffff;
- margin-top: 50px;
- }
- .page {
- height: 100%;
- }
- .a-tabs {
- width: 100%;
- justify-content: space-between;
- align-items: center;
- height: 44px;
- display: flex;
- flex-direction: row;
- flex-wrap: nowrap;
- flex-shrink: 0;
- background: #fff;
- overflow: auto;
- }
- .a-tab-item {
- flex: 1;
- height: 100%;
- padding: 0 12px;
- justify-content: center;
- align-items: center;
- }
- .a-tab-item-text {
- color: #666;
- font-size: 14px;
- font-weight: normal;
- white-space: nowrap;
- text-overflow: ellipsis;
- }
- .a-tab-item-text-active {
- color: #333;
- font-weight: bold;
- }
- .a-tab-item-line {
- position: absolute;
- bottom: 0;
- background: #f1c694;
- width: 20px;
- height: 2px;
- }
- .but {
- width: 110px;
- height: 45px;
- color: #fff;
- background: #169bd5;
- }
- .butss {
- width: 70px;
- height: 45px;
- color: #fff;
- background: #70b603;
- }
- .buts {
- flex-direction: row;
- }
- .box {
- border: 1px solid #000000;
- padding: 10px 0;
- width: 90%;
- display: inline-block;
- }
- .boi {
- width: 20px;
- height: 20px;
- margin: 5px 5px;
- display: inline-block;
- text-align: center;
- border-radius: 6px;
- border: 1px solid #000000;
- }
- .boxs {
- height: 30px;
- line-height: 10px;
- flex-direction: row;
- }
- .tex {
- margin-left: 5px;
- font-size: 15px;
- }
- .imgs {
- width: 20px;
- height: 20px;
- margin-left: 10px;
- }
- #divs {
- margin-top: 10px;
- flex-direction: row;
- }
- .text_2 {
- margin: auto;
- font-size: 27px;
- text-align: center;
- }
- </style>
- <script>
- export default {
- name: 'test',
- data() {
- return {
- genderDesc: '',
- selectorValue: 0,
- genderList: ['男', '女'],
- current: 0,
-
- }
- },
- methods: {
- apiready() {
- var selector = document.getElementById('selector');
- selector.setData({
- data: this.data.genderList
- });
- },
-
- liuyt() {
- $('#dev').show();
- },
- qux() {
- $('#dev').close();
- },
- onsubmit(e) {
- console.log(JSON.stringify(e.detail));
- },
- selectorChange(e) {
- this.data.selectorValue = e.detail.value;
- this.data.genderDesc = this.data.genderList[this.data.selectorValue];
- },
- }
- }
- </script>
复制代码
如果是这一个页面的话是可以的,你可以试一下进入首页后切换到这个页面,这样子就没有数据,还有就是form表单获取不到的问题 |
|