|
|
@@ -4,7 +4,7 @@
|
|
|
<div class="modal-content">
|
|
|
<!-- tab切换 start-->
|
|
|
<ul class="nav nav-tabs x-nav-tabs x-navbar-right hidden-xs modal-header" role="tablist">
|
|
|
- <li :class="{active: showTab === 'logs'}"><a aria-controls="userSpaceDetailModal_log" role="tab" data-toggle="tab" aria-expanded="false" @click="showTab = 'logs'">操作日志</a></li>
|
|
|
+ <!--<li :class="{active: showTab === 'logs'}"><a aria-controls="userSpaceDetailModal_log" role="tab" data-toggle="tab" aria-expanded="false" @click="showTab = 'logs'">操作日志</a></li>-->
|
|
|
<li :class="{active: showTab === 'apps'}"><a aria-controls="userSpaceDetailModal_apps" role="tab" data-toggle="tab" aria-expanded="false" @click="showTab = 'apps'">绑定应用</a></li>
|
|
|
<li :class="{active: showTab === 'default'}"><a aria-controls="userSpaceDetailModal_info" role="tab" data-toggle="tab" aria-expanded="true" @click="showTab = 'default'">详细资料</a></li>
|
|
|
<h2 class="hidden-xs">
|
|
|
@@ -40,7 +40,7 @@
|
|
|
<dt>注册地区</dt>
|
|
|
<dd>{{data.regAddress || '注册地区'}} <span class="x-text-muted x-text-small">您可以根据营业执照<a href="">填写</a></span></dd>
|
|
|
<dt>企业地址</dt>
|
|
|
- <dd id="primaryAdress">{{data.province || '企业地址'}} <span class="x-text-muted x-text-small"></span></dd>
|
|
|
+ <dd id="primaryAdress">{{data.companyAddress || '企业地址'}} <span class="x-text-muted x-text-small"></span></dd>
|
|
|
<dd id="renewAdress" style="display: none"><input type="text" value="广东省深圳市罗湖区罗湖路266号" name="renewAdress">
|
|
|
</dd>
|
|
|
<dt>所属行业</dt>
|
|
|
@@ -48,10 +48,10 @@
|
|
|
<dt>官网地址</dt>
|
|
|
<dd>http://ww.exempIe.com</dd>
|
|
|
</dl>
|
|
|
- <div class="x-group-header">
|
|
|
+ <div class="x-group-header" v-show="data.admin">
|
|
|
<h4>管理员信息</h4>
|
|
|
</div>
|
|
|
- <dl class="dl-horizontal x-dl-horizontal">
|
|
|
+ <dl class="dl-horizontal x-dl-horizontal" v-show="data.admin">
|
|
|
<dt>姓名</dt>
|
|
|
<dd>王超</dd>
|
|
|
<dt>手机号</dt>
|
|
|
@@ -123,10 +123,19 @@
|
|
|
<div class="modal-body">
|
|
|
<div class="x-mod x-list" style="margin: -15px">
|
|
|
<div class="x-mod-body">
|
|
|
- <div class="x-common-list" id="apps">
|
|
|
+ <div class="x-common-list" id="apps" v-if="data.apps.length > 0">
|
|
|
<!-- userspaces -->
|
|
|
+ <div class="x-item" v-for="app in data.apps">
|
|
|
+ <div class="x-icon"><i class="fa fa-file-o"></i></div>
|
|
|
+ <p><span class="x-title text-info" v-text="app.description"></span><span
|
|
|
+ class="pull-right x-text-muted" v-text="app.uid"></span></p>
|
|
|
+ <div>
|
|
|
+ <div class="x-text-muted" v-text="data.spaceName">公司名称<span
|
|
|
+ class="pull-right" v-text="data.spaceUU">企业UU</span></div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <div class="x-empty" style="display: none">
|
|
|
+ <div class="x-empty" v-if="data.apps.length === 0">
|
|
|
<i class="fa fa-coffee"></i>
|
|
|
<p>还没有绑定任何应用</p>
|
|
|
</div>
|
|
|
@@ -134,16 +143,21 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="modal-footer">
|
|
|
+ <div v-if="canBindApp" style="width: 300px; display: inline-block;">
|
|
|
+ <input type="text" v-model="appUid" placeholder="应用Uid,如b2b"/>
|
|
|
+ <button type="button" class="btn btn-blank" data-close="modal" @click="bindAppWithSpace(appUid)">保存</button>
|
|
|
+ </div>
|
|
|
+ <button type="button" class="btn btn-blank" data-dismiss="modal" @click="canBindApp = true" v-show="!canBindApp">开通应用</button>
|
|
|
<button type="button" class="btn btn-blank" data-dismiss="modal" @click="isVisible = false">关闭</button>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div role="tabpanel" id="userSpaceDetailModal_log" class="x-tab-pane" :class="{active: showTab === 'logs'}">
|
|
|
+ <!--<div role="tabpanel" id="userSpaceDetailModal_log" class="x-tab-pane" :class="{active: showTab === 'logs'}">
|
|
|
<div class="modal-body">
|
|
|
- <!-- 日志列表 start -->
|
|
|
+ <!– 日志列表 start –>
|
|
|
<div class="x-mod x-list x-log-list" style="margin: -15px">
|
|
|
<div class="x-mod-body">
|
|
|
<div class="x-common-list">
|
|
|
- <!-- log item -->
|
|
|
+ <!– log item –>
|
|
|
</div>
|
|
|
<div class="x-empty" style="display: none">
|
|
|
<i class="fa fa-coffee"></i>
|
|
|
@@ -151,40 +165,63 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <!-- 日志列表 end -->
|
|
|
+ <!– 日志列表 end –>
|
|
|
</div>
|
|
|
<div class="modal-footer">
|
|
|
<ul class="pagination pull-left" style="margin: 0"></ul>
|
|
|
<button type="button" class="btn btn-blank" data-dismiss="modal" @click="isVisible = false">关闭</button>
|
|
|
</div>
|
|
|
- </div>
|
|
|
+ </div>-->
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+ import axios from '@/assets/js/axios'
|
|
|
+
|
|
|
export default {
|
|
|
- name: 'SpaceEditModal',
|
|
|
- props: {
|
|
|
- visible: Boolean,
|
|
|
- data: Object
|
|
|
+ name: 'SpaceEditModal',
|
|
|
+ props: {
|
|
|
+ visible: Boolean,
|
|
|
+ data: Object
|
|
|
+ },
|
|
|
+ data () {
|
|
|
+ return {
|
|
|
+ isVisible: false,
|
|
|
+ showTab: 'default',
|
|
|
+ canBindApp: false,
|
|
|
+ appUid: ''
|
|
|
+ }
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ visible: function (value) {
|
|
|
+ this.isVisible = value
|
|
|
},
|
|
|
- data () {
|
|
|
- return {
|
|
|
- isVisible: false,
|
|
|
- showTab: 'default'
|
|
|
+ isVisible: function (value) {
|
|
|
+ this.$emit('update:visible', value)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ bindAppWithSpace (appUid) {
|
|
|
+ console.log(appUid)
|
|
|
+ const params = { appUid: appUid }
|
|
|
+
|
|
|
+ const success = status => {
|
|
|
+ if (status) {
|
|
|
+ this.isVisible = false
|
|
|
+ this.canBindApp = false
|
|
|
+ }
|
|
|
}
|
|
|
- },
|
|
|
- watch: {
|
|
|
- visible: function (value) {
|
|
|
- this.isVisible = value
|
|
|
- },
|
|
|
- isVisible: function (value) {
|
|
|
- this.$emit('update:visible', value)
|
|
|
+ const error = response => {
|
|
|
+ alert(response)
|
|
|
+ console.log('error', response)
|
|
|
}
|
|
|
+
|
|
|
+ axios.put(`/api/user/space/${this.data.spaceUU}/bindAppWithSpace`, {}, { params }).then(success).catch(error)
|
|
|
}
|
|
|
}
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
<style scoped>
|