12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- <template>
- <div id="list-1">
- <van-col span="24" class="main">
- <van-col span="24" class="list" v-for="(item, index) in list" :key="index">
- <van-col span="24" class="title">
- {{ item.name }}
- </van-col>
- <van-col span="24" class="other">
- <van-col span="24" class="otherInfo">
- 组织机构代码:<span>{{ item.institution_code || '暂无' }}</span>
- </van-col>
- <van-col span="24" class="otherInfo">
- 所属辖区:<span>{{ item.juris || '暂无' }}</span>
- </van-col>
- </van-col>
- <van-col span="24" class="btn">
- <el-button type="primary" size="mini" @click="bind(item)" v-if="item.openid == null">绑定</el-button>
- <el-button type="danger" size="mini" @click="removeBind(item)" v-if="item.openid">解绑</el-button>
- </van-col>
- </van-col>
- </van-col>
- </div>
- </template>
- <script>
- import { mapState, createNamespacedHelpers } from 'vuex';
- export default {
- name: 'list-1',
- props: {
- list: { type: Array },
- },
- components: {},
- data: function () {
- return {};
- },
- created() {},
- methods: {
- // 绑定微信
- bind(data) {
- this.$emit('bind', data);
- },
- // 接触绑定
- removeBind(data) {
- this.$emit('removeBind', data);
- },
- },
- computed: {
- ...mapState(['user']),
- },
- metaInfo() {
- return { title: this.$route.meta.title };
- },
- watch: {
- test: {
- deep: true,
- immediate: true,
- handler(val) {},
- },
- },
- };
- </script>
- <style lang="less" scoped>
- .main {
- padding: 8px 8px 0 8px;
- .list {
- background-color: #fff;
- margin: 0 0 8px 0;
- padding: 8px;
- border-radius: 5px;
- .title {
- font-size: 16px;
- font-weight: bold;
- margin: 0 0 5px 0;
- }
- .other {
- .otherInfo {
- font-size: 14px;
- color: #666;
- margin: 0 0 5px 0;
- span {
- color: #000;
- }
- }
- }
- .btn {
- text-align: center;
- }
- }
- }
- </style>
|