system-clients 3.0.46-fanxian → 3.0.47-fanxian

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. package/.babelrc +5 -5
  2. package/.editorconfig +9 -9
  3. package/.eslintrc.js +16 -16
  4. package/.gradle/buildOutputCleanup/cache.properties +2 -2
  5. package/CHANGELOG.md +51 -51
  6. package/README.md +36 -36
  7. package/SystemClient.iml +11 -11
  8. package/build/css-loaders.js +34 -34
  9. package/build/dev-client.js +8 -8
  10. package/build/example-server.js +80 -80
  11. package/build/release.sh +28 -28
  12. package/build/utils.js +71 -71
  13. package/build/webpack.dev.conf.js +31 -31
  14. package/build/webpack.example.conf.js +49 -49
  15. package/build/webpack.prod.conf.js +60 -60
  16. package/build/webpack.test.conf.js +31 -31
  17. package/build.gradle +6 -6
  18. package/config/dev.env.js +6 -6
  19. package/config/index.js +38 -38
  20. package/config/prod.env.js +3 -3
  21. package/config/test.env.js +6 -6
  22. package/doc/Login.md +7 -7
  23. package/examples/ReadCard/App.vue +23 -23
  24. package/examples/ReadCard/index.html +11 -11
  25. package/examples/ReadCard/main.js +12 -12
  26. package/index.html +21 -21
  27. package/package.json +1 -1
  28. package/release.bat +5 -5
  29. package/src/App.vue +24 -24
  30. package/src/LodopFuncs.js +123 -123
  31. package/src/assets/binding.svg +1 -1
  32. package/src/assets/unbind.svg +1 -1
  33. package/src/assets//345/205/254/345/221/212.svg +1 -1
  34. package/src/assets//347/207/203/346/260/224/347/274/264/350/264/271.eps +116 -116
  35. package/src/assets//350/201/224/347/263/273/346/210/221/344/273/254.svg +1 -1
  36. package/src/components/List.vue +51 -51
  37. package/src/components/Table.js +74 -74
  38. package/src/components/Util.js +343 -343
  39. package/src/components/equipment/EquipmentManage.vue +65 -65
  40. package/src/components/equipment/PcAdd.vue +105 -105
  41. package/src/components/equipment/PcList.vue +119 -119
  42. package/src/components/equipment/PcManage.vue +60 -60
  43. package/src/components/equipment/PhoneAdd.vue +94 -94
  44. package/src/components/equipment/PhoneList.vue +102 -102
  45. package/src/components/equipment/PhoneManage.vue +60 -60
  46. package/src/components/equipment/PosAdd.vue +137 -137
  47. package/src/components/equipment/PosList.vue +156 -156
  48. package/src/components/equipment/PosManage.vue +67 -67
  49. package/src/components/materialManage/materialData.vue +44 -44
  50. package/src/components/materialManage/materialList.vue +255 -255
  51. package/src/components/parammanage/ParamManage.vue +42 -42
  52. package/src/components/parammanage/ParamManages.vue +43 -43
  53. package/src/components/parammanage/ParamPage.vue +314 -314
  54. package/src/components/parammanage/ParamPages.vue +214 -214
  55. package/src/components/parammanage/SinglePage.vue +237 -237
  56. package/src/components/parammanage/SinglePages.vue +161 -161
  57. package/src/components/server/AddChangeMsg.vue +66 -66
  58. package/src/components/server/ChangeDeclare.vue +45 -45
  59. package/src/components/server/IconTree.vue +26 -26
  60. package/src/components/server/LeftTree.vue +111 -111
  61. package/src/components/server/LoadData.vue +36 -36
  62. package/src/components/server/Login.vue +625 -623
  63. package/src/components/server/Menu.vue +188 -188
  64. package/src/components/server/ModifyPw.vue +125 -106
  65. package/src/components/server/ResSelect.vue +150 -150
  66. package/src/components/server/ResSelectGroup.vue +140 -140
  67. package/src/components/server/RightTree.vue +263 -263
  68. package/src/components/server/RoleSelector.vue +88 -88
  69. package/src/components/server/TestResSelect.vue +58 -58
  70. package/src/components/server/TestResSelectGroup.vue +388 -388
  71. package/src/components/server/TestRightTree.vue +42 -42
  72. package/src/index.js +7 -7
  73. package/src/plugins/GetLoginInfoService.js +509 -498
  74. package/src/plugins/validation.js +7 -7
  75. package/src/project/ProjectPage.vue +24 -24
  76. package/src/project/State.js +17 -17
  77. package/src/stores/AppData.js +38 -38
  78. package/src/systemphone.js +11 -11
  79. package/src/util/LdapHelper.js +75 -75
  80. package/test/e2e/custom-assertions/elementCount.js +26 -26
  81. package/test/e2e/nightwatch.conf.js +40 -40
  82. package/test/e2e/runner.js +30 -30
  83. package/test/e2e/specs/test.js +14 -14
  84. package/test/unit/.eslintrc +5 -5
  85. package/test/unit/index.js +13 -13
  86. package/test/unit/init.js +10 -10
  87. package/test/unit/karma.conf.js +49 -49
  88. package/test/unit/specs/base64.spec.js +5 -5
  89. package/test/unit/specs/components/parammanage/ParamPage.spec.js +20 -20
  90. package/test/unit/specs/components/parammanage/SinglePage.spec.js +20 -20
  91. package/test/unit/specs/components/server/LeftTree/App.vue +18 -18
  92. package/test/unit/specs/components/server/LeftTree/LeftTree.spec.js +22 -22
  93. package/test/unit/specs/components/server/LoadData.spec.js +24 -24
  94. package/test/unit/specs/components/server/Login.spec.js +61 -61
  95. package/test/unit/specs/components/server/RightTree.spec.js +50 -50
  96. package/test/unit/specs/plugins/GetLoginInfoService.spec.js +55 -55
  97. package/test/unit/test.html +76 -76
@@ -1,49 +1,49 @@
1
- // This is a karma config file. For more details see
2
- // http://karma-runner.github.io/0.13/config/configuration-file.html
3
- // we are also using it with karma-webpack
4
- // https://github.com/webpack/karma-webpack
5
-
6
- var webpackConfig = require('../../build/webpack.test.conf')
7
-
8
- module.exports = function (config) {
9
- config.set({
10
- customContextFile: './test.html',
11
- // to run in additional browsers:
12
- // 1. install corresponding karma launcher
13
- // http://karma-runner.github.io/0.13/config/browsers.html
14
- // 2. add it to the `browsers` array below.
15
- browsers: ['Chrome_without_security'],
16
- customLaunchers: {
17
- Chrome_without_security: {
18
- base: 'Chrome',
19
- flags: ['--disable-web-security']
20
- }
21
- },
22
- proxies: {
23
- //'/rs': 'http://202.108.65.218:9001/rs',
24
- // '/rs': 'http://127.0.0.1:8080/rs',
25
- '/rs': 'http://192.168.50.222:8300/rs',
26
- //'/rs/report': 'http://127.0.0.1:8080/rs/report',
27
- //'/rs/logic/getLogin': 'http://127.0.0.1:8080/rs/logic/getLogin'
28
- // '/rs/logic': 'http://127.0.0.1:8888/product/rs/logic',
29
- },
30
- autoWatch: true,
31
- frameworks: ['mocha', 'sinon-chai'],
32
- reporters: ['spec', 'coverage'],
33
- files: ['./index.js'],
34
- preprocessors: {
35
- './index.js': ['webpack', 'sourcemap']
36
- },
37
- webpack: webpackConfig,
38
- webpackMiddleware: {
39
- noInfo: true
40
- },
41
- coverageReporter: {
42
- dir: './coverage',
43
- reporters: [
44
- { type: 'lcov', subdir: '.' },
45
- { type: 'text-summary' }
46
- ]
47
- }
48
- })
49
- }
1
+ // This is a karma config file. For more details see
2
+ // http://karma-runner.github.io/0.13/config/configuration-file.html
3
+ // we are also using it with karma-webpack
4
+ // https://github.com/webpack/karma-webpack
5
+
6
+ var webpackConfig = require('../../build/webpack.test.conf')
7
+
8
+ module.exports = function (config) {
9
+ config.set({
10
+ customContextFile: './test.html',
11
+ // to run in additional browsers:
12
+ // 1. install corresponding karma launcher
13
+ // http://karma-runner.github.io/0.13/config/browsers.html
14
+ // 2. add it to the `browsers` array below.
15
+ browsers: ['Chrome_without_security'],
16
+ customLaunchers: {
17
+ Chrome_without_security: {
18
+ base: 'Chrome',
19
+ flags: ['--disable-web-security']
20
+ }
21
+ },
22
+ proxies: {
23
+ //'/rs': 'http://202.108.65.218:9001/rs',
24
+ // '/rs': 'http://127.0.0.1:8080/rs',
25
+ '/rs': 'http://192.168.50.222:8300/rs',
26
+ //'/rs/report': 'http://127.0.0.1:8080/rs/report',
27
+ //'/rs/logic/getLogin': 'http://127.0.0.1:8080/rs/logic/getLogin'
28
+ // '/rs/logic': 'http://127.0.0.1:8888/product/rs/logic',
29
+ },
30
+ autoWatch: true,
31
+ frameworks: ['mocha', 'sinon-chai'],
32
+ reporters: ['spec', 'coverage'],
33
+ files: ['./index.js'],
34
+ preprocessors: {
35
+ './index.js': ['webpack', 'sourcemap']
36
+ },
37
+ webpack: webpackConfig,
38
+ webpackMiddleware: {
39
+ noInfo: true
40
+ },
41
+ coverageReporter: {
42
+ dir: './coverage',
43
+ reporters: [
44
+ { type: 'lcov', subdir: '.' },
45
+ { type: 'text-summary' }
46
+ ]
47
+ }
48
+ })
49
+ }
@@ -1,5 +1,5 @@
1
- describe('base64', () => {
2
- it('加密', () => {
3
- console.log(btoa('1'))
4
- })
5
- })
1
+ describe('base64', () => {
2
+ it('加密', () => {
3
+ console.log(btoa('1'))
4
+ })
5
+ })
@@ -1,20 +1,20 @@
1
- import Vue from 'vue'
2
- import init from 'test/unit/init'
3
- import { TestUtil } from 'vue-client'
4
-
5
- import ParamPage from 'src/components/parammanage/ParamPage'
6
-
7
- describe('ParamPage: 参数管理', () => {
8
- let vm = null
9
- before(async function () {
10
- init()
11
- await Vue.$login.login('cdy', '1')
12
- })
13
-
14
- it.only('正确显示', async function() {
15
- vm = await TestUtil.createAsyncTest(ParamPage, {
16
- })
17
- })
18
-
19
- })
20
-
1
+ import Vue from 'vue'
2
+ import init from 'test/unit/init'
3
+ import { TestUtil } from 'vue-client'
4
+
5
+ import ParamPage from 'src/components/parammanage/ParamPage'
6
+
7
+ describe('ParamPage: 参数管理', () => {
8
+ let vm = null
9
+ before(async function () {
10
+ init()
11
+ await Vue.$login.login('cdy', '1')
12
+ })
13
+
14
+ it.only('正确显示', async function() {
15
+ vm = await TestUtil.createAsyncTest(ParamPage, {
16
+ })
17
+ })
18
+
19
+ })
20
+
@@ -1,20 +1,20 @@
1
- import Vue from 'vue'
2
- import init from 'test/unit/init'
3
- import { TestUtil } from 'vue-client'
4
-
5
- import SinglePage from 'src/components/parammanage/SinglePage'
6
-
7
- describe('SinglePage: 单值管理', () => {
8
- let vm = null
9
- before(async function () {
10
- init()
11
- await Vue.$login.login('cdy', '1')
12
- })
13
-
14
- it('正确显示', async function() {
15
- vm = await TestUtil.createAsyncTest(SinglePage, {
16
- })
17
- })
18
-
19
- })
20
-
1
+ import Vue from 'vue'
2
+ import init from 'test/unit/init'
3
+ import { TestUtil } from 'vue-client'
4
+
5
+ import SinglePage from 'src/components/parammanage/SinglePage'
6
+
7
+ describe('SinglePage: 单值管理', () => {
8
+ let vm = null
9
+ before(async function () {
10
+ init()
11
+ await Vue.$login.login('cdy', '1')
12
+ })
13
+
14
+ it('正确显示', async function() {
15
+ vm = await TestUtil.createAsyncTest(SinglePage, {
16
+ })
17
+ })
18
+
19
+ })
20
+
@@ -1,18 +1,18 @@
1
- <template>
2
- <app-base class="bg">
3
- <div class='flex'>
4
- <article>
5
- <left-tree v-ref:tree></left-tree>
6
- <dynamic :comps='[]' name='main'></dynamic>
7
- </article>
8
- </div>
9
- </app-base>
10
- </template>
11
-
12
- <script>
13
- import LeftTree from 'src/components/server/LeftTree'
14
-
15
- export default {
16
- components: {LeftTree}
17
- }
18
- </script>
1
+ <template>
2
+ <app-base class="bg">
3
+ <div class='flex'>
4
+ <article>
5
+ <left-tree v-ref:tree></left-tree>
6
+ <dynamic :comps='[]' name='main'></dynamic>
7
+ </article>
8
+ </div>
9
+ </app-base>
10
+ </template>
11
+
12
+ <script>
13
+ import LeftTree from 'src/components/server/LeftTree'
14
+
15
+ export default {
16
+ components: {LeftTree}
17
+ }
18
+ </script>
@@ -1,22 +1,22 @@
1
- import Vue from 'vue'
2
- import init from 'test/unit/init'
3
- import { TestUtil } from 'vue-client'
4
- import App from './App'
5
-
6
- describe('LeftTree: 功能树', () => {
7
- let vm = null
8
-
9
- before(async function() {
10
- init()
11
- await Vue.$login.login('hns', '1')
12
- })
13
-
14
- it('正确显示', function() {
15
- vm = TestUtil.createTest(App, {})
16
- let row = {data: {navigate: 'http://127.0.0.1:8084', name: '百度'}}
17
- vm.$refs.tree.open(row)
18
- })
19
- })
20
-
21
- // also see example testing a component with mocks at
22
- // https://github.com/vuejs/vue-loader-example/blob/master/test/unit/a.spec.js#L24-L49
1
+ import Vue from 'vue'
2
+ import init from 'test/unit/init'
3
+ import { TestUtil } from 'vue-client'
4
+ import App from './App'
5
+
6
+ describe('LeftTree: 功能树', () => {
7
+ let vm = null
8
+
9
+ before(async function() {
10
+ init()
11
+ await Vue.$login.login('hns', '1')
12
+ })
13
+
14
+ it('正确显示', function() {
15
+ vm = TestUtil.createTest(App, {})
16
+ let row = {data: {navigate: 'http://127.0.0.1:8084', name: '百度'}}
17
+ vm.$refs.tree.open(row)
18
+ })
19
+ })
20
+
21
+ // also see example testing a component with mocks at
22
+ // https://github.com/vuejs/vue-loader-example/blob/master/test/unit/a.spec.js#L24-L49
@@ -1,24 +1,24 @@
1
- import init from 'test/unit/init'
2
- import { TestUtil } from 'vue-client'
3
-
4
- import LoadData from 'src/components/server/LoadData'
5
-
6
- describe('LoadData: 加载初始数据', () => {
7
- let vm = null
8
- before((done) => {
9
- init()
10
- vm = TestUtil.createTest(LoadData)
11
- vm.$on('ready', () => {
12
- done()
13
- })
14
- })
15
-
16
- it('正确加载', () => {
17
- assert.equal(vm.$appdata.singleValues.appVer, '15')
18
- assert.isAbove(vm.$appdata.saleParams.price.length, 10)
19
- // assert.lengthOf(vm.$appdata.safeCheckParams, 0)
20
- })
21
- })
22
-
23
- // also see example testing a component with mocks at
24
- // https://github.com/vuejs/vue-loader-example/blob/master/test/unit/a.spec.js#L24-L49
1
+ import init from 'test/unit/init'
2
+ import { TestUtil } from 'vue-client'
3
+
4
+ import LoadData from 'src/components/server/LoadData'
5
+
6
+ describe('LoadData: 加载初始数据', () => {
7
+ let vm = null
8
+ before((done) => {
9
+ init()
10
+ vm = TestUtil.createTest(LoadData)
11
+ vm.$on('ready', () => {
12
+ done()
13
+ })
14
+ })
15
+
16
+ it('正确加载', () => {
17
+ assert.equal(vm.$appdata.singleValues.appVer, '15')
18
+ assert.isAbove(vm.$appdata.saleParams.price.length, 10)
19
+ // assert.lengthOf(vm.$appdata.safeCheckParams, 0)
20
+ })
21
+ })
22
+
23
+ // also see example testing a component with mocks at
24
+ // https://github.com/vuejs/vue-loader-example/blob/master/test/unit/a.spec.js#L24-L49
@@ -1,61 +1,61 @@
1
- import init from 'test/unit/init'
2
- import { TestUtil } from 'vue-client'
3
-
4
- import Login from 'src/components/server/Login'
5
-
6
- describe('测试是否可以正确登录', () => {
7
- let vm = null
8
- before((done) => {
9
- init()
10
- vm = TestUtil.createTest(Login)
11
- vm.$on('ready', () => {
12
- done()
13
- })
14
- })
15
-
16
- it('超管可以正确登录', async function() {
17
- vm.model.ename = '1'
18
- vm.model.password = 'Af@1234'
19
- // 验证码
20
- vm.picLyanzhengma = vm.checkCode
21
- await vm.confirm()
22
- assert.isAbove(vm.$login.jwt.length, 100)
23
- // 检查登录结果
24
- assert.lengthOf(vm.$login.f.functions, 14)
25
- })
26
-
27
- it('正确调用到了通用票据', async function() {
28
- let report = await vm.$resetpost('/rs/report/card_bill', {"data": {"condition":"53"}}, { rejectMsg: null, resolveMsg: null })
29
- assert.include(report.data, '流水号:')
30
- })
31
-
32
- it('海南管理员可以正确登录', async function() {
33
- vm.model.ename = 'hainan'
34
- vm.model.password = '1'
35
- // 验证码
36
- vm.picLyanzhengma = vm.checkCode
37
- await vm.confirm()
38
- assert.isAbove(vm.$login.jwt.length, 1)
39
- // 检查登录结果
40
- assert.isAbove(vm.$login.f.functions.length, 1)
41
- })
42
-
43
- it('正确调用到了自己的票据', async function() {
44
- let report = await vm.$resetpost('/rs/report/card_bill', {"data": {"condition":"53"}}, { rejectMsg: null, resolveMsg: null })
45
- assert.include(report.data, '流水1号:')
46
- })
47
-
48
- it('锆鹏可以正确登录', async function() {
49
- vm.model.ename = 'JcCeShi'
50
- vm.model.password = '1'
51
- // 验证码
52
- vm.picLyanzhengma = vm.checkCode
53
- await vm.confirm()
54
- assert.isAbove(vm.$login.jwt.length, 1)
55
- // 检查登录结果
56
- assert.isAbove(vm.$login.f.functions.length, 1)
57
- })
58
- })
59
-
60
- // also see example testing a component with mocks at
61
- // https://github.com/vuejs/vue-loader-example/blob/master/test/unit/a.spec.js#L24-L49
1
+ import init from 'test/unit/init'
2
+ import { TestUtil } from 'vue-client'
3
+
4
+ import Login from 'src/components/server/Login'
5
+
6
+ describe('测试是否可以正确登录', () => {
7
+ let vm = null
8
+ before((done) => {
9
+ init()
10
+ vm = TestUtil.createTest(Login)
11
+ vm.$on('ready', () => {
12
+ done()
13
+ })
14
+ })
15
+
16
+ it('超管可以正确登录', async function() {
17
+ vm.model.ename = '1'
18
+ vm.model.password = 'Af@1234'
19
+ // 验证码
20
+ vm.picLyanzhengma = vm.checkCode
21
+ await vm.confirm()
22
+ assert.isAbove(vm.$login.jwt.length, 100)
23
+ // 检查登录结果
24
+ assert.lengthOf(vm.$login.f.functions, 14)
25
+ })
26
+
27
+ it('正确调用到了通用票据', async function() {
28
+ let report = await vm.$resetpost('/rs/report/card_bill', {"data": {"condition":"53"}}, { rejectMsg: null, resolveMsg: null })
29
+ assert.include(report.data, '流水号:')
30
+ })
31
+
32
+ it('海南管理员可以正确登录', async function() {
33
+ vm.model.ename = 'hainan'
34
+ vm.model.password = '1'
35
+ // 验证码
36
+ vm.picLyanzhengma = vm.checkCode
37
+ await vm.confirm()
38
+ assert.isAbove(vm.$login.jwt.length, 1)
39
+ // 检查登录结果
40
+ assert.isAbove(vm.$login.f.functions.length, 1)
41
+ })
42
+
43
+ it('正确调用到了自己的票据', async function() {
44
+ let report = await vm.$resetpost('/rs/report/card_bill', {"data": {"condition":"53"}}, { rejectMsg: null, resolveMsg: null })
45
+ assert.include(report.data, '流水1号:')
46
+ })
47
+
48
+ it('锆鹏可以正确登录', async function() {
49
+ vm.model.ename = 'JcCeShi'
50
+ vm.model.password = '1'
51
+ // 验证码
52
+ vm.picLyanzhengma = vm.checkCode
53
+ await vm.confirm()
54
+ assert.isAbove(vm.$login.jwt.length, 1)
55
+ // 检查登录结果
56
+ assert.isAbove(vm.$login.f.functions.length, 1)
57
+ })
58
+ })
59
+
60
+ // also see example testing a component with mocks at
61
+ // https://github.com/vuejs/vue-loader-example/blob/master/test/unit/a.spec.js#L24-L49
@@ -1,50 +1,50 @@
1
- import init from 'test/unit/init'
2
- import { TestUtil } from 'vue-client'
3
- import * as ldapHelper from 'src/util/LdapHelper'
4
-
5
- import RightTree from 'src/components/server/RightTree'
6
-
7
- describe('RightTree: 资源选择树', () => {
8
- let vm = null
9
-
10
- before(() => {
11
- init()
12
- })
13
-
14
- it('正确显示', async function() {
15
- vm = await TestUtil.createAsyncTest(RightTree, {
16
- userid: '20853',
17
- source: 'tool.getFullTree(this.getRights().where(row.getType() == $organization$))'
18
- })
19
- // 中海油不可选择
20
- let ele = document.querySelector('.RightTreeCanNotSelect')
21
- assert.equal(ele.innerText, '中海油', '中海油不能选择')
22
- // 选中根节点
23
- let tree = vm.$children[0].$children[0]
24
- await tree.toggle(tree.toNode[0])
25
- // 海南分公司可以选择
26
- ele = document.querySelector('.RightTreeCanSelect')
27
- assert.equal(ele.innerText, '海南分公司', '海南分公司可以选择')
28
- })
29
-
30
- it('正确选择', (done) => {
31
- let row = vm.model[0].children[0]
32
- vm.$on('re-res', (obj) => {
33
- assert.equal(obj.resids, '1531.1535.')
34
- done()
35
- })
36
- vm.selectclick(row)
37
- })
38
-
39
- it('选中值变化', (done) => {
40
- vm.selectData = '1531.1535.'
41
- vm.selectDataChange()
42
- vm.$nextTick(() => {
43
- assert.equal('海南分公司', vm.textContent)
44
- done()
45
- })
46
- })
47
- })
48
-
49
- // also see example testing a component with mocks at
50
- // https://github.com/vuejs/vue-loader-example/blob/master/test/unit/a.spec.js#L24-L49
1
+ import init from 'test/unit/init'
2
+ import { TestUtil } from 'vue-client'
3
+ import * as ldapHelper from 'src/util/LdapHelper'
4
+
5
+ import RightTree from 'src/components/server/RightTree'
6
+
7
+ describe('RightTree: 资源选择树', () => {
8
+ let vm = null
9
+
10
+ before(() => {
11
+ init()
12
+ })
13
+
14
+ it('正确显示', async function() {
15
+ vm = await TestUtil.createAsyncTest(RightTree, {
16
+ userid: '20853',
17
+ source: 'tool.getFullTree(this.getRights().where(row.getType() == $organization$))'
18
+ })
19
+ // 中海油不可选择
20
+ let ele = document.querySelector('.RightTreeCanNotSelect')
21
+ assert.equal(ele.innerText, '中海油', '中海油不能选择')
22
+ // 选中根节点
23
+ let tree = vm.$children[0].$children[0]
24
+ await tree.toggle(tree.toNode[0])
25
+ // 海南分公司可以选择
26
+ ele = document.querySelector('.RightTreeCanSelect')
27
+ assert.equal(ele.innerText, '海南分公司', '海南分公司可以选择')
28
+ })
29
+
30
+ it('正确选择', (done) => {
31
+ let row = vm.model[0].children[0]
32
+ vm.$on('re-res', (obj) => {
33
+ assert.equal(obj.resids, '1531.1535.')
34
+ done()
35
+ })
36
+ vm.selectclick(row)
37
+ })
38
+
39
+ it('选中值变化', (done) => {
40
+ vm.selectData = '1531.1535.'
41
+ vm.selectDataChange()
42
+ vm.$nextTick(() => {
43
+ assert.equal('海南分公司', vm.textContent)
44
+ done()
45
+ })
46
+ })
47
+ })
48
+
49
+ // also see example testing a component with mocks at
50
+ // https://github.com/vuejs/vue-loader-example/blob/master/test/unit/a.spec.js#L24-L49
@@ -1,55 +1,55 @@
1
- import init from 'test/unit/init'
2
-
3
- import Vue from 'vue'
4
-
5
- describe('GetLoginInfoService: 登录服务', () => {
6
- before(() => {
7
- init()
8
- })
9
-
10
- it('取登录数据', async function () {
11
- let data = {name: 'hainan', password: '1'}
12
- let result = await Vue.resetpost('rs/logic/getLogin', data)
13
- assert.equal('登录成功', result.states);
14
- })
15
-
16
- it('取登录数据', async function () {
17
- let data = `{name: 'hainan', password: '1'}`
18
- data = btoa(data)
19
- let result = await Vue.resetpost('rs/logic/getLogin', '$' + data)
20
- assert.equal('登录成功', result.data.states);
21
- })
22
-
23
- it('超管登录', async function() {
24
- Vue.$login.afterLogin.push((f) => {
25
- return new Promise((resolve, reject) => {
26
- setTimeout(() => {
27
- console.log('注册成功')
28
- resolve()
29
- }, 100)
30
- })
31
- })
32
- await Vue.$login.login('hainan', '1')
33
- console.log('登录完成')
34
- assert.equal(document.cookie, 'loginId=20853')
35
- // 检查登录结果
36
- console.log(JSON.stringify(Vue.$login.r))
37
- assert.lengthOf(Vue.$login.f.functions, 15)
38
- await new Promise((resolve, reject) => {
39
- setTimeout(()=>{
40
- resolve()
41
- }, 200)
42
- })
43
- })
44
-
45
- it('中海油登录', () => {
46
- return Vue.$login.login('hns', '1').then(() => {
47
- assert.equal(document.cookie, 'loginId=20853')
48
- // 检查登录结果
49
- assert.lengthOf(Vue.$login.f.functions, 13)
50
- })
51
- })
52
- })
53
-
54
- // also see example testing a component with mocks at
55
- // https://github.com/vuejs/vue-loader-example/blob/master/test/unit/a.spec.js#L24-L49
1
+ import init from 'test/unit/init'
2
+
3
+ import Vue from 'vue'
4
+
5
+ describe('GetLoginInfoService: 登录服务', () => {
6
+ before(() => {
7
+ init()
8
+ })
9
+
10
+ it('取登录数据', async function () {
11
+ let data = {name: 'hainan', password: '1'}
12
+ let result = await Vue.resetpost('rs/logic/getLogin', data)
13
+ assert.equal('登录成功', result.states);
14
+ })
15
+
16
+ it('取登录数据', async function () {
17
+ let data = `{name: 'hainan', password: '1'}`
18
+ data = btoa(data)
19
+ let result = await Vue.resetpost('rs/logic/getLogin', '$' + data)
20
+ assert.equal('登录成功', result.data.states);
21
+ })
22
+
23
+ it('超管登录', async function() {
24
+ Vue.$login.afterLogin.push((f) => {
25
+ return new Promise((resolve, reject) => {
26
+ setTimeout(() => {
27
+ console.log('注册成功')
28
+ resolve()
29
+ }, 100)
30
+ })
31
+ })
32
+ await Vue.$login.login('hainan', '1')
33
+ console.log('登录完成')
34
+ assert.equal(document.cookie, 'loginId=20853')
35
+ // 检查登录结果
36
+ console.log(JSON.stringify(Vue.$login.r))
37
+ assert.lengthOf(Vue.$login.f.functions, 15)
38
+ await new Promise((resolve, reject) => {
39
+ setTimeout(()=>{
40
+ resolve()
41
+ }, 200)
42
+ })
43
+ })
44
+
45
+ it('中海油登录', () => {
46
+ return Vue.$login.login('hns', '1').then(() => {
47
+ assert.equal(document.cookie, 'loginId=20853')
48
+ // 检查登录结果
49
+ assert.lengthOf(Vue.$login.f.functions, 13)
50
+ })
51
+ })
52
+ })
53
+
54
+ // also see example testing a component with mocks at
55
+ // https://github.com/vuejs/vue-loader-example/blob/master/test/unit/a.spec.js#L24-L49