Quellcode durchsuchen

Merge branch 'develop5.0-tmd' of http://106.12.23.251:10000/TEAMMODEL/TEAMModelOS into develop5.0-tmd

CrazyIter_Bin vor 4 Jahren
Ursprung
Commit
550f7a8b25

+ 1 - 1
TEAMModelOS/ClientApp/src/api/openMgmt.js

@@ -20,7 +20,7 @@ export default{
      * @param {} data
      */
     getApiList: function (data) {
-        return post('/open-api/get', data)
+        return post('/open-api/get-api', data)
     },
     /**
      * 新增/编辑

+ 5 - 0
TEAMModelOS/ClientApp/src/locale/lang/en-US/settings.js

@@ -56,6 +56,11 @@ export default {
 	openStatus: '状态',
 	enable: '启用',
 	disable: '禁用',
+	webhook: "webhook",
+	domainName: "域名",
+	subNews: "订阅通知",
+	apiType1: "数据写入接口",
+	apiType2: "数据读取接口",
 	apiName: '接口名称',
 	apiAddress: '接口地址',
 	apiMethod: '请求方法',

+ 5 - 0
TEAMModelOS/ClientApp/src/locale/lang/zh-CN/settings.js

@@ -56,6 +56,11 @@ export default {
 	openStatus: '状态',
 	enable: '启用',
 	disable: '禁用',
+	webhook: "webhook",
+	domainName: "域名",
+	subNews: "订阅通知",
+	apiType1: "数据写入接口",
+	apiType2: "数据读取接口",
 	apiName: '接口名称',
 	apiAddress: '接口地址',
 	apiMethod: '请求方法',

+ 6 - 1
TEAMModelOS/ClientApp/src/locale/lang/zh-TW/settings.js

@@ -56,10 +56,15 @@ export default {
     openStatus: '狀態',
     enable: '啟用',
     disable: '禁用',
+    webhook: "webhook",
+    domainName: "域名",
+	subNews: "訂閱通知",
+	apiType1: "數據寫入接口",
+	apiType2: "數據讀取接口",
     apiName: '接口名稱',
     apiAddress: '接口地址',
     apiMethod: '請求方法',
-    apiParams: '参数示例',
+    apiParams: '參數示例',
     openKeep: '儲存平臺',
     edit: "編輯應用",
     unedit: '取消編輯',

+ 32 - 1
TEAMModelOS/ClientApp/src/view/settings/OpenMgmt2.css

@@ -68,11 +68,26 @@
                 } */
 }
 .open-mgmt .open-mgmt-right .open-right-info .open-info .open-mgmt-info {
-  padding: 20px;
+  padding: 20px 20px 0 20px;
   /* .ivu-radio-inner{
                         background-color: #F3F3F3;
                     } */
 }
+.open-mgmt .open-mgmt-right .open-right-info .open-info .open-mgmt-info + p {
+  color: #949494;
+  height: 40px;
+  line-height: 40px;
+  padding-left: 20px;
+  border-top: 1px solid #424242;
+  border-bottom: 1px solid #424242;
+}
+.open-mgmt .open-mgmt-right .open-right-info .open-info .open-mgmt-info .ivu-checkbox {
+  margin-right: 0;
+}
+.open-mgmt .open-mgmt-right .open-right-info .open-info .open-mgmt-info .ivu-checkbox-wrapper {
+  margin-left: 0;
+  margin-right: 30px;
+}
 .open-mgmt .open-mgmt-right .open-right-info .open-info .ivu-form-item:not(:first-child) {
   margin-top: 30px;
 }
@@ -97,9 +112,25 @@
 .open-mgmt .open-mgmt-right .open-right-info .open-api {
   width: 70%;
 }
+.open-mgmt .open-mgmt-right .open-right-info .open-api .ivu-tabs-nav {
+  color: #a5a5a5;
+}
+.open-mgmt .open-mgmt-right .open-right-info .open-api .ivu-tabs-nav .ivu-tabs-ink-bar {
+  border-bottom: 2px solid #1cc0f3;
+}
+.open-mgmt .open-mgmt-right .open-right-info .open-api .ivu-tabs-nav .ivu-tabs-tab-active {
+  font-size: 14px;
+  color: #fff;
+}
+.open-mgmt .open-mgmt-right .open-right-info .open-api .ivu-tabs-nav .ivu-tabs-tab:hover {
+  color: #fff;
+}
 .open-mgmt .open-mgmt-right .open-right-info .open-api .open-api-header {
   height: 40px;
 }
+.open-mgmt .open-mgmt-right .open-right-info .open-api .ivu-tabs-tab {
+  height: 40px;
+}
 .open-mgmt .open-mgmt-right .open-right-info .open-api .open-api-table {
   padding: 20px;
   /* .ivu-table-wrapper{

+ 40 - 1
TEAMModelOS/ClientApp/src/view/settings/OpenMgmt2.less

@@ -77,7 +77,25 @@
                 font-size: 16px;
 
                 .open-mgmt-info {
-                    padding: 20px;
+                    padding: 20px 20px 0 20px;
+
+                    & + p{
+                        color: #949494;
+                        height: 40px;
+                        line-height: 40px;
+                        padding-left: 20px;
+                        border-top: 1px solid #424242;
+                        border-bottom: 1px solid #424242;
+                    }
+
+                    .ivu-checkbox{
+                        margin-right: 0;
+                    }
+
+                    .ivu-checkbox-wrapper{
+                        margin-left: 0;
+                        margin-right: 30px;
+                    }
 
                     /* .ivu-radio-inner{
                         background-color: #F3F3F3;
@@ -126,10 +144,31 @@
             .open-api{
                 width: 70%;
 
+                .ivu-tabs-nav{
+                    color: #a5a5a5;
+
+                    .ivu-tabs-ink-bar{
+                        border-bottom: 2px solid #1cc0f3;
+                    }
+
+                    .ivu-tabs-tab-active{
+                        font-size: 14px;
+                        color: #fff;
+                    }
+
+                    .ivu-tabs-tab:hover{
+                        color: #fff;
+                    }
+                }
+
                 .open-api-header{
                     height: 40px;
                 }
 
+                .ivu-tabs-tab{
+                    height: 40px;
+                }
+
                 .open-api-table{
                     padding: 20px;
 

+ 129 - 45
TEAMModelOS/ClientApp/src/view/settings/OpenMgmt2.vue

@@ -48,63 +48,141 @@
             <div class="open-right-info">
                 <div class="open-info">
                     <vuescroll>
-                        <div class="open-mgmt-info dark-iview-form disabled-iview-input">
+                        <div class=" dark-iview-form disabled-iview-input">
                             <!-- <div class="open-mgmt-info"> -->
                                 <Form :model="openMgInfo" label-position="top">
-                                    <FormItem :label="$t('settings.openName')">
-                                        <Input v-model="openMgInfo.name"
-                                            :class="isEdit ? '' : 'open-info-disabled'"
-                                            :readonly="isEdit ? false : true"></Input>
-                                    </FormItem>
-                                    <FormItem :label="$t('settings.token')" class="api-token" v-show="!isEdit">
-                                        <div class="api-icon">
-                                            <!-- 隐藏 -->
-                                            <Icon :type="isTokenShow ? 'md-eye' : 'md-eye-off'" size="18" style="margin-right: 10px" color="rgb(115 115 115)" @click="isTokenShow = !isTokenShow" />
-                                            <!-- 刷新 -->
-                                            <Icon type="md-refresh" size="18" style="margin-right: 10px" color="rgb(115 115 115)" @click="refresh" />
-                                            <!-- 复制 -->
-                                            <Icon type="ios-copy" size="18" color="rgb(115 115 115)" @click="copyToken" />
-                                        </div>
-                                        <Input
-                                            v-model="openMgInfo.token"
-                                            type="textarea"
-                                            :autosize="{ minRows: 10 }"
-                                            class="open-info-disabled"
-                                            readonly
-                                            v-show="isTokenShow"
-                                        ></Input>
-                                    </FormItem>
-                                    <FormItem :label="$t('settings.des')">
-                                        <Input v-model="openMgInfo.descr"
-                                            type="textarea"
-                                            :autosize="{ minRows: 2 }"
-                                            :class="isEdit ? '' : 'open-info-disabled'"
-                                            :readonly="isEdit ? false : true"></Input>
-                                    </FormItem>
-                                    <FormItem :label="$t('settings.openStatus')">
-                                        <RadioGroup v-model="openMgInfo.status">
-                                            <Radio :label="1" :disabled="isEdit ? false : true">{{ $t("settings.enable") }}</Radio>
-                                            <Radio :label="0" :disabled="isEdit ? false : true">{{ $t("settings.disable") }}</Radio>
-                                        </RadioGroup>
-                                    </FormItem>
+                                    <div class="open-mgmt-info">
+                                        <FormItem :label="$t('settings.openName')">
+                                            <Input v-model="openMgInfo.name"
+                                                :class="isEdit ? '' : 'open-info-disabled'"
+                                                :readonly="isEdit ? false : true"></Input>
+                                        </FormItem>
+                                        <FormItem :label="$t('settings.token')" class="api-token" v-show="!isEdit">
+                                            <div class="api-icon">
+                                                <!-- 隐藏 -->
+                                                <Icon :type="isTokenShow ? 'md-eye' : 'md-eye-off'" size="18" style="margin-right: 10px" color="rgb(115 115 115)" @click="isTokenShow = !isTokenShow" />
+                                                <!-- 刷新 -->
+                                                <Icon type="md-refresh" size="18" style="margin-right: 10px" color="rgb(115 115 115)" @click="refresh" />
+                                                <!-- 复制 -->
+                                                <Icon type="ios-copy" size="18" color="rgb(115 115 115)" @click="copyToken" />
+                                            </div>
+                                            <Input
+                                                v-model="openMgInfo.token"
+                                                type="textarea"
+                                                :autosize="{ minRows: 10 }"
+                                                class="open-info-disabled"
+                                                readonly
+                                                v-show="isTokenShow"
+                                            ></Input>
+                                        </FormItem>
+                                        <FormItem :label="$t('settings.des')">
+                                            <Input v-model="openMgInfo.descr"
+                                                type="textarea"
+                                                :autosize="{ minRows: 2 }"
+                                                :class="isEdit ? '' : 'open-info-disabled'"
+                                                :readonly="isEdit ? false : true"></Input>
+                                        </FormItem>
+                                        <FormItem :label="$t('settings.openStatus')">
+                                            <RadioGroup v-model="openMgInfo.status">
+                                                <Radio :label="1" :disabled="isEdit ? false : true">{{ $t("settings.enable") }}</Radio>
+                                                <Radio :label="0" :disabled="isEdit ? false : true">{{ $t("settings.disable") }}</Radio>
+                                            </RadioGroup>
+                                        </FormItem>
+                                    </div>
+                                    <p>{{ $t('settings.webhook') }}</p>
+                                    <div class="open-mgmt-info">
+                                        <FormItem :label="$t('settings.domainName')">
+                                            <Input v-model="openMgInfo.domain"
+                                                :class="isEdit ? '' : 'open-info-disabled'"
+                                                :readonly="isEdit ? false : true"></Input>
+                                        </FormItem>
+                                        <FormItem :label="$t('settings.subNews')">
+                                            <CheckboxGroup v-model="openMgInfo.news">
+                                                <Checkbox label="hhhh" :disabled="isEdit ? false : true">
+                                                    <span>订阅通知1</span>
+                                                </Checkbox>
+                                                <Checkbox label="www" :disabled="isEdit ? false : true">
+                                                    <span>订阅通知2</span>
+                                                </Checkbox>
+                                                <Checkbox label="mmm" :disabled="isEdit ? false : true">
+                                                    <span>订阅通知3</span>
+                                                </Checkbox>
+                                                <Checkbox label="wwwww" :disabled="isEdit ? false : true">
+                                                    <span>订阅通知4</span>
+                                                </Checkbox>
+                                            </CheckboxGroup>
+                                        </FormItem>
+                                    </div>
                                 </Form>
                             </div>
                         <!-- </div> -->
                     </vuescroll>
                 </div>
-                <div class="open-api dark-iview-table dark-iview-page">
+                <div class="open-api dark-iview-table dark-iview-page dark-iview-tabs-card">
                 <!-- <div class="open-api"> -->
-                    <vuescroll>
-                        <div class="open-api-table">
+                    <!-- <vuescroll> -->
+                        <!-- <div class="open-api-table">
+                            <p>数据写入接口</p>
                             <Table ref="selection"
                                    :loading="isLoadList"
                                    :columns="apiListCol"
                                    :data="isEdit ? apiListSelect : apiListNow"
                                    @on-selection-change="selectionChange"
                             ></Table>
-                            <!-- <Page :total="pageTotal" :page-size-opts="pageSizeOpts" size="small" show-sizer show-total /> -->
-                        </div>
-                    </vuescroll>
+                            <Page :total="pageTotal" :page-size-opts="pageSizeOpts" size="small" show-sizer show-total />
+                        </div> -->
+                    <!-- </vuescroll> -->
+                    <!-- <vuescroll> -->
+                        <!-- <div class="open-api-table">
+                            <p>数据读取接口</p>
+                            <Table ref="selection"
+                                   :loading="isLoadList"
+                                   :columns="apiListCol"
+                                   :data="isEdit ? apiListSelect : apiListNow"
+                                   @on-selection-change="selectionChange"
+                            ></Table>
+                            <Page :total="pageTotal" :page-size-opts="pageSizeOpts" size="small" show-sizer show-total />
+                        </div> -->
+                    <!-- </vuescroll> -->
+
+                    <Tabs value="1">
+                        <TabPane :label="$t('settings.apiType1')" name="1">
+                            <div class="open-api-table">
+                                <Table ref="selection"
+                                       :loading="isLoadList"
+                                       :columns="apiListCol"
+                                       :data="isEdit ? apiListSelect : apiListNow"
+                                       @on-selection-change="selectionChange"
+                                >
+                                    <template slot-scope="{ row }" slot="name">
+                                        <span>{{ row.name }}</span>
+                                        <Poptip trigger="hover" :content="row.descr" placement="right">
+                                            <!-- <Icon type="ios-alert" /> -->
+                                            <Icon type="ios-alert-outline" />
+                                        </Poptip>
+                                    </template>
+                                </Table>
+                            </div>
+                        </TabPane>
+                        <TabPane :label="$t('settings.apiType2')" name="2">
+                            <div class="open-api-table">
+                                <Table ref="selection"
+                                       :loading="isLoadList"
+                                       :columns="apiListCol"
+                                       :data="isEdit ? apiListSelect : apiListNow"
+                                       @on-selection-change="selectionChange"
+                                >
+                                    <template slot-scope="{ row }" slot="name">
+                                        <span>{{ row.name }}</span>
+                                        <Poptip trigger="hover" :content="row.descr" placement="right">
+                                            <!-- <Icon type="ios-alert" /> -->
+                                            <Icon type="ios-alert-outline" />
+                                        </Poptip>
+                                    </template>
+                                </Table>
+                            </div>
+                        </TabPane>
+                    </Tabs>
                 </div>
             </div>
         </div>
@@ -122,6 +200,7 @@ export default {
             schoolCode: this.$store.state.userInfo.schoolCode,
             openList: [], //开放平台列表
             openMgInfo: {}, //平台信息
+            apiType: 1,
             apiListCol: [ //api表头
                 /* {
                     type: 'selection',
@@ -131,6 +210,7 @@ export default {
                 {
                     title: this.$t("settings.apiName"),
                     key: "name",
+                    slot: "name"
                 },
                 {
                     title: this.$t("settings.apiAddress"),
@@ -141,7 +221,7 @@ export default {
                     key: "method",
                 },
                 {
-                    title: this.$t("settings.apiParams"),
+                    title: this.$t("settings.des"),
                     key: "descr",
                 },
             ],
@@ -406,7 +486,11 @@ export default {
         selectionChange(selection) {
             this.apiListNow = selection
             console.log(selection);
-        }
+        },
+        selectMenu(name) {
+            console.log(name);
+            this.apiType = name
+        },
     }
 }
 </script>