n rel="diff-2aa9c103904131dc6750fb4819ee97b56658784fR12581">12581
    },
12563 12582
    "ws": {
@ -12566,8 +12585,8 @@
12566 12585
      "integrity": "sha512-ZGh/8kF9rrRNffkLFV4AzhvooEclrOH0xaugmqGsIfFgOE/pIz4fMc4Ef+5HSQqTEug2S9JZIWDR47duDSLfaA==",
12567 12586
      "dev": true,
12568 12587
      "requires": {
12569
        "async-limiter": "1.0.0",
12570
        "safe-buffer": "5.1.2"
12588
        "async-limiter": "~1.0.0",
12589
        "safe-buffer": "~5.1.0"
12571 12590
      }
12572 12591
    },
12573 12592
    "xregexp": {
@ -12600,18 +12619,18 @@
12600 12619
      "integrity": "sha512-e7SkEx6N6SIZ5c5H22RTZae61qtn3PYUE8JYbBFlK9sYmh3DMQ6E5ygtaG/2BW0JZi4WGgTR2IV5ChqlqrDGVQ==",
12601 12620
      "dev": true,
12602 12621
      "requires": {
12603
        "cliui": "4.1.0",
12604
        "decamelize": "2.0.0",
12605
        "find-up": "3.0.0",
12606
        "get-caller-file": "1.0.3",
12607
        "os-locale": "3.0.1",
12608
        "require-directory": "2.1.1",
12609
        "require-main-filename": "1.0.1",
12610
        "set-blocking": "2.0.0",
12611
        "string-width": "2.1.1",
12612
        "which-module": "2.0.0",
12613
        "y18n": "4.0.0",
12614
        "yargs-parser": "10.1.0"
12622
        "cliui": "^4.0.0",
12623
        "decamelize": "^2.0.0",
12624
        "find-up": "^3.0.0",
12625
        "get-caller-file": "^1.0.1",
12626
        "os-locale": "^3.0.0",
12627
        "require-directory": "^2.1.1",
12628
        "require-main-filename": "^1.0.1",
12629
        "set-blocking": "^2.0.0",
12630
        "string-width": "^2.0.0",
12631
        "which-module": "^2.0.0",
12632
        "y18n": "^3.2.1 || ^4.0.0",
12633
        "yargs-parser": "^10.1.0"
12615 12634
      },
12616 12635
      "dependencies": {
12617 12636
        "find-up": {
@ -12620,7 +12639,7 @@
12620 12639
          "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==",
12621 12640
          "dev": true,
12622 12641
          "requires": {
12623
            "locate-path": "3.0.0"
12642
            "locate-path": "^3.0.0"
12624 12643
          }
12625 12644
        },
12626 12645
        "locate-path": {
@ -12629,8 +12648,8 @@
12629 12648
          "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==",
12630 12649
          "dev": true,
12631 12650
          "requires": {
12632
            "p-locate": "3.0.0",
12633
            "path-exists": "3.0.0"
12651
            "p-locate": "^3.0.0",
12652
            "path-exists": "^3.0.0"
12634 12653
          }
12635 12654
        },
12636 12655
        "p-limit": {
@ -12639,7 +12658,7 @@
12639 12658
          "integrity": "sha512-fl5s52lI5ahKCernzzIyAP0QAZbGIovtVHGwpcu1Jr/EpzLVDI2myISHwGqK7m8uQFugVWSrbxH7XnhGtvEc+A==",
12640 12659
          "dev": true,
12641 12660
          "requires": {
12642
            "p-try": "2.0.0"
12661
            "p-try": "^2.0.0"
12643 12662
          }
12644 12663
        },
12645 12664
        "p-locate": {
@ -12648,7 +12667,7 @@
12648 12667
          "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==",
12649 12668
          "dev": true,
12650 12669
          "requires": {
12651
            "p-limit": "2.0.0"
12670
            "p-limit": "^2.0.0"
12652 12671
          }
12653 12672
        },
12654 12673
        "p-try": {
@ -12665,7 +12684,7 @@
12665 12684
      "integrity": "sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ==",
12666 12685
      "dev": true,
12667 12686
      "requires": {
12668
        "camelcase": "4.1.0"
12687
        "camelcase": "^4.1.0"
12669 12688
      }
12670 12689
    },
12671 12690
    "yorkie": {
@ -12674,10 +12693,10 @@
12674 12693
      "integrity": "sha512-jcKpkthap6x63MB4TxwCyuIGkV0oYP/YRyuQU5UO0Yz/E/ZAu+653/uov+phdmO54n6BcvFRyyt0RRrWdN2mpw==",
12675 12694
      "dev": true,
12676 12695
      "requires": {
12677
        "execa": "0.8.0",
12678
        "is-ci": "1.2.1",
12679
        "normalize-path": "1.0.0",
12680
        "strip-indent": "2.0.0"
12696
        "execa": "^0.8.0",
12697
        "is-ci": "^1.0.10",
12698
        "normalize-path": "^1.0.0",
12699
        "strip-indent": "^2.0.0"
12681 12700
      },
12682 12701
      "dependencies": {
12683 12702
        "cross-spawn": {
@ -12686,9 +12705,9 @@
12686 12705
          "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=",
12687 12706
          "dev": true,
12688 12707
          "requires": {
12689
            "lru-cache": "4.1.3",
12690
            "shebang-command": "1.2.0",
12691
            "which": "1.3.1"
12708
            "lru-cache": "^4.0.1",
12709
            "shebang-command": "^1.2.0",
12710
            "which": "^1.2.9"
12692 12711
          }
12693 12712
        },
12694 12713
        "execa": {
@ -12697,13 +12716,13 @@
12697 12716
          "integrity": "sha1-2NdrvBtVIX7RkP1t1J08d07PyNo=",
12698 12717
          "dev": true,
12699 12718
          "requires": {
12700
            "cross-spawn": "5.1.0",
12701
            "get-stream": "3.0.0",
12702
            "is-stream": "1.1.0",
12703
            "npm-run-path": "2.0.2",
12704
            "p-finally": "1.0.0",
12705
            "signal-exit": "3.0.2",
12706
            "strip-eof": "1.0.0"
12719
            "cross-spawn": "^5.0.1",
12720
            "get-stream": "^3.0.0",
12721
            "is-stream": "^1.1.0",
12722
            "npm-run-path": "^2.0.0",
12723
            "p-finally": "^1.0.0",
12724
            "signal-exit": "^3.0.0",
12725
            "strip-eof": "^1.0.0"
12707 12726
          }
12708 12727
        },
12709 12728
        "normalize-path": {

+ 1 - 1
static-res/json-edit/public/index.html

@ -5,7 +5,7 @@
5 5
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
6 6
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
7 7
    <link rel="icon" href="<%= BASE_URL %>favicon.ico">
8
    <link rel="stylesheet" href="//at.alicdn.com/t/font_887867_2ymz9v1whck.css">
8
    <link rel="stylesheet" href="https://at.alicdn.com/t/font_887867_2ymz9v1whck.css">
9 9
    <title>IPU项目请求模拟器</title>
10 10
  </head>
11 11
  <body>

+ 2 - 2
static-res/json-edit/src/style/css/jsonedit.less

@ -32,7 +32,7 @@
32 32
      }
33 33
      .ipt-base{
34 34
        float: left;
35
        width: 308px;
35
        width: 570px;
36 36
        .el-input-group__prepend{
37 37
          padding: 0 6px;
38 38
        }
@ -62,7 +62,7 @@
62 62
        position: absolute;
63 63
        top: 42px;
64 64
        left: 0;
65
        width: 574px;
65
        width: 570px;
66 66
        border: 1px solid #dcdfe6;
67 67
        border-radius: 2px;
68 68
        background-color: #fff;

+ 24 - 26
static-res/json-edit/src/views/jsonedit.vue

@ -7,12 +7,12 @@
7 7
      </div>
8 8
      <div class="hand-content">
9 9
        <div class="request clearfix">
10
          <el-input class="ipt-base" v-model="requestPath" placeholder="请输入地址">
11
            <template slot="prepend">BaseUrl:</template>
10
          <el-input class="ipt-base" v-model="requestPath" placeholder="请输入请求地址">
11
            <template slot="prepend">RequestUrl:</template>
12 12
          </el-input>
13
          <el-input class="ipt-path" v-model="path" placeholder="请输入路径">
13
          <!-- <el-input class="ipt-path" v-model="path" placeholder="请输入路径">
14 14
            <template slot="prepend">Path:</template>
15
          </el-input>
15
          </el-input> -->
16 16
          <el-select class="sel" v-model="requestType" placeholder="请选择请求方式">
17 17
            <el-option label="POST" value="post"></el-option>
18 18
            <el-option label="GET" value="get"></el-option>
@ -20,7 +20,7 @@
20 20
          <el-button class="btn" type="info" @click="handHistory()">历史纪录</el-button>
21 21
          <el-button class="btn" type="primary" @click="handSend()">发送请求</el-button>
22 22
          <div class="history-box" v-if="historyShow">
23
            <div class="history-item" v-for="(item, index) in history" :key="index" @click="handHistorySend(item)">{{item.basePath + item.path}}</div>
23
            <div class="history-item" v-for="(item, index) in history" :key="index" @click="handHistorySend(item)">{{item.path}}</div>
24 24
            <div class="history-nodata" v-if="history.length == 0">暂无历史纪录</div>
25 25
          </div>
26 26
        </div>
@ -50,7 +50,7 @@ export default {
50 50
  data () {
51 51
    return {
52 52
      requestPath: '',
53
      path: '',
53
      // path: '',
54 54
      requestType: '',
55 55
      postType: 'application/x-www-from-urlencoded',
56 56
      jsonEditContainer: '', //编辑容器
@ -93,8 +93,7 @@ export default {
93 93
    if (localStorage.getItem("history")) {
94 94
      this.history = [].concat(JSON.parse(localStorage.getItem("history")))
95 95
      console.log('this.history', this.history)
96
      this.requestPath = this.history[0].basePath
97
      this.path = this.history[0].path
96
      this.requestPath = this.history[0].path
98 97
      this.requestType = this.history[0].type
99 98
      this.editor.set(this.history[0].params)
100 99
    } else {
@ -121,8 +120,7 @@ export default {
121 120
    },
122 121
    handHistorySend (item) {
123 122
      this.historyShow = false
124
      this.requestPath = item.basePath
125
      this.path = item.path
123
      this.requestPath = item.path
126 124
      this.requestType = item.type
127 125
      this.editor.set(item.params)
128 126
    },
@ -151,11 +149,10 @@ export default {
151 149
      }
152 150
    },
153 151
    handSend () {
154
      if (this.requestPath && this.path && this.requestType) {
152
      if (this.requestPath && this.requestType) {
155 153
        // lru数组
156 154
        let tempObj = {
157
          basePath: this.requestPath,
158
          path: this.path,
155
          path: this.requestPath,
159 156
          type: this.requestType,
160 157
          params: this.editor.get() || {},
161 158
          times: 0
@ -166,7 +163,7 @@ export default {
166 163
        }
167 164
        // 替换已有的历史
168 165
        for (let i = 0; i < this.history.length; i++) {
169
          if ((this.history[i].basePath + this.history[i].path) === (tempObj.basePath + tempObj.path)) {
166
          if (this.history[i].path === tempObj.path) {
170 167
            this.history.splice(i, 1)
171 168
            break
172 169
          }
@ -183,7 +180,7 @@ export default {
183 180
          }
184 181
          // 删除过期多余
185 182
          for (let k = 0; k < this.history.length; k++) {
186
            if ((this.history[k].basePath + this.history[k].path) === (oldOne.basePath + oldOne.path)) {
183
            if (this.history[k].path === oldOne.path) {
187 184
              this.history.splice(k, 1)
188 185
              break
189 186
            }
@ -197,11 +194,12 @@ export default {
197 194
          if (this.postType === 'application/x-www-from-urlencoded') {
198 195
            let sendData = this.editor.get()
199 196
            let arr = Object.keys(sendData)
200
            console.log(sendData, typeof(sendData))
197
            let qsStr = Qs.stringify(sendData)
198
            console.log('qsStr', qsStr)
201 199
            if (arr.length !== 0) {
202
              console.log(1 + 'post')
200
              console.log(1 + 'post' + 'application/x-www-from-urlencoded')
203 201
              this.NProgress.start()
204
              this.axios.post(this.requestPath + this.path, sendData, {headers: {'content-type': 'application/x-www-form-urlencoded'}}).then((res) => {
202
              this.axios.post(this.requestPath, qsStr, {headers: {'content-type': 'application/x-www-form-urlencoded'}}).then((res) => {
205 203
                console.log('ok')
206 204
                this.responser.set(res)
207 205
                this.NProgress.done()
@ -216,9 +214,9 @@ export default {
216 214
                this.$message.error('服务请求报错!')
217 215
              })
218 216
            } else {
219
              console.log(2 + 'post')
217
              console.log(2 + 'post' + 'application/x-www-from-urlencoded')
220 218
              this.NProgress.start()
221
              this.axios.post(this.requestPath + this.path, {headers: {'content-type': 'application/x-www-form-urlencoded'}}).then((res) => {
219
              this.axios.post(this.requestPath, {headers: {'content-type': 'application/x-www-form-urlencoded'}}).then((res) => {
222 220
                console.log('ok')
223 221
                this.responser.set(res)
224 222
                this.NProgress.done()
@ -238,9 +236,9 @@ export default {
238 236
            let arr = Object.keys(sendData)
239 237
            console.log(sendData, typeof(sendData))
240 238
            if (arr.length !== 0) {
241
              console.log(1 + 'post')
239
              console.log(1 + 'post' + 'multipart/form-data')
242 240
              this.NProgress.start()
243
              this.axios.post(this.requestPath + this.path, sendData, {headers: {'content-type': 'multipart/form-data'}}).then((res) => {
241
              this.axios.post(this.requestPath, sendData, {headers: {'content-type': 'multipart/form-data'}}).then((res) => {
244 242
                console.log('ok')
245 243
                this.responser.set(res)
246 244
                this.NProgress.done()
@ -255,9 +253,9 @@ export default {
255 253
                this.$message.error('服务请求报错!')
256 254
              })
257 255
            } else {
258
              console.log(2 + 'post')
256
              console.log(2 + 'post' + 'multipart/form-data')
259 257
              this.NProgress.start()
260
              this.axios.post(this.requestPath + this.path, {headers: {'content-type': 'multipart/form-data'}}).then((res) => {
258
              this.axios.post(this.requestPath, {headers: {'content-type': 'multipart/form-data'}}).then((res) => {
261 259
                console.log('ok')
262 260
                this.responser.set(res)
263 261
                this.NProgress.done()
@ -280,7 +278,7 @@ export default {
280 278
          if (arr.length !== 0) {
281 279
            console.log(1 + 'get')
282 280
            this.NProgress.start()
283
            this.axios.get(this.requestPath + this.path, {params: getData}).then((res) => {
281
            this.axios.get(this.requestPath, {params: getData}).then((res) => {
284 282
              console.log('ok')
285 283
              this.responser.set(res)
286 284
              this.NProgress.done()
@ -297,7 +295,7 @@ export default {
297 295
          } else {
298 296
            console.log(2 + 'get')
299 297
            this.NProgress.start()
300
            this.axios.get(this.requestPath + this.path).then((res) => {
298
            this.axios.get(this.requestPath).then((res) => {
301 299
              console.log('ok')
302 300
              this.responser.set(res)
303 301
              this.NProgress.done()

+ 1 - 1
static-res/json-edit/vue.config.js

@ -1,4 +1,4 @@
1 1
module.exports = {
2 2
  lintOnSave: false,
3
  baseUrl: process.env.NODE_ENV === 'production' ? '/' : '/'
3
  baseUrl: process.env.NODE_ENV === 'production' ? './' : '/'
4 4
}

common-ui - Nuosi Git Service

AIoT前端公共UI

CardDemo.vue 3.8KB

    <!-- * @Author: Devin * @Date: 2023-02-07 14:24:35 * @LastEditors: Devin * @LastEditTime: 2023-02-17 14:55:46 * @Description: card-demo --> <template> <div class="demo"> <common-card-group :card-numbers="cardNumbers" :card-infos="cardInfos" :span="6" :btns="btns" :cards="cards" @handel-click-create-card="handelClickCreateCard" ></common-card-group> </div> </template> <script setup lang="ts"> import { ElMessage } from 'element-plus'; import { ref } from 'vue'; function edit() { ElMessage('编辑'); } function start() {} // const cardNumbers = ref<any>([ { label: '信息1', name: 'name1' }, { label: '信息2', name: 'name2' }, { label: '信息3', name: 'name3' } ]); function deleteFn(data: any) { console.log(data); console.log('点击删除'); } const cardInfos = ref<any>([{ label: '厂商', name: 'name' }]); const btns = ref<any>([ { label: '启用', name: 'start', icon: 'common-bianji', color: '#7b93a7', onClick: start }, { label: '编辑', name: 'edit', icon: '', onClick: edit }, { label: '删除', name: 'delete', icon: 'tool-baocun', color: '#7b93a7', onClick: deleteFn }, { label: '发布', name: 'publish', icon: 'tool-baocun', color: '#7b93a7', onClick: edit }, { label: '查看', name: 'view', icon: 'tool-baocun', color: '#7b93a7', onClick: edit } ]); const cards = ref<any>([ { url: '', title: '大标题大标题大标题大标题大标题大标题大标题大标题大标题大标题大标题大标题大标题', subTitle: '2022-12-24c12:12:12', tags: [ { label: '成功', type: 'success' }, { label: '失败', type: 'danger' } ], desc: '这个是描述信息,可以有最多三行这个是描述信息,可以有最多三行这个是描述信息,可以有最多三行这个是描述信息,可以有最多三行这个是描述信息,可以有最多三行这个是描述信息,可以有最多三行这个是描述信息,可以有最多三行这个是描述信息,可以有最多三行', infos: { name: '海康威视' }, name1: 1, name2: 2, name3: 3 }, { url: '', title: '大标题大标题大标题大标题大标题大标题大标题大标题大标题大标题大标题大标题大标题', subTitle: '2022-12-24c12:12:12', tags: [ { label: '成功', type: 'success' }, { label: '失败', type: 'danger' } ], desc: '这个是描述信息,可以有最多三行这个是描述信息,可以有最多三行这个是描述信息,可以有最多三行这个是描述信息,可以有最多三行这个是描述信息,可以有最多三行这个是描述信息,可以有最多三行这个是描述信息,可以有最多三行这个是描述信息,可以有最多三行', infos: { name: '海康威视' }, name1: 1, name2: 2, name3: 3 }, { url: '', title: '大标题大标题大标题大标题大标题大标题大标题大标题大标题大标题大标题大标题大标题', subTitle: '2022-12-24c12:12:12', tags: [ { label: '成功', type: 'success' }, { label: '失败', type: 'danger' } ], desc: '这个是描述信息,可以有最多三行这个是描述信息,可以有最多三行这个是描述信息,可以有最多三行这个是描述信息,可以有最多三行这个是描述信息,可以有最多三行这个是描述信息,可以有最多三行这个是描述信息,可以有最多三行这个是描述信息,可以有最多三行', infos: { name: '海康威视' }, name1: 1, name2: 2, name3: 3 } ]); // 添加新卡片 function handelClickCreateCard() { ElMessage('123131233'); } </script> <style scoped lang="scss"></style>
android-share - Nuosi Git Service

ipu的trunk版的android工程和服务端工程。

leijie 8b1bd636d6 merge 8 年之前
..
.settings e6611ec91a 通用远程服务端-无require-客户端访问远程页面 9 年之前
java-bak 30535017fe jar包更新、终端判断、general-web-server服务端更新。 9 年之前
lib f9417c757d 更新 9 年之前
src 26f111a4f0 添加对netapp模式的支持 9 年之前
web 2100e310d0 注释alter和confirm 8 年之前
.gitignore 8b3441d9c4 0119-修正一些配置 server-config.xml 9 年之前
.project e6611ec91a 通用远程服务端-无require-客户端访问远程页面 9 年之前
pom.xml 8b1bd636d6 merge 8 年之前
android-share - Nuosi Git Service

ipu的trunk版的android工程和服务端工程。

leijie 9f1b0d5e03 新增通知消息ui及插件 9 years ago
..
build 710312f9bc 工程优化 9 years ago
libs 9f1b0d5e03 新增通知消息ui及插件 9 years ago
src 9f1b0d5e03 新增通知消息ui及插件 9 years ago
.gitignore 61ff9d2503 Merge branch 'master' of 9 years ago
.project 1f191c2a19 初始化 10 years ago