完成签约之后直接添加人员,录入下发凭证
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

267 lines
9.6 KiB

  1. webpackJsonp([72],{
  2. /***/ "6fyX":
  3. /***/ (function(module, exports) {
  4. // removed by extract-text-webpack-plugin
  5. /***/ }),
  6. /***/ "rFFW":
  7. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  8. "use strict";
  9. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  10. // EXTERNAL MODULE: ./node_modules/babel-runtime/core-js/json/stringify.js
  11. var stringify = __webpack_require__("mvHQ");
  12. var stringify_default = /*#__PURE__*/__webpack_require__.n(stringify);
  13. // EXTERNAL MODULE: ./node_modules/moment/moment.js
  14. var moment = __webpack_require__("PJh5");
  15. var moment_default = /*#__PURE__*/__webpack_require__.n(moment);
  16. // EXTERNAL MODULE: ./src/api/index.js + 5 modules
  17. var api = __webpack_require__("gyMJ");
  18. // EXTERNAL MODULE: ./src/utils/index.js
  19. var utils = __webpack_require__("0xDb");
  20. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/views/systemConfiguration.vue
  21. //
  22. //
  23. //
  24. //
  25. //
  26. //
  27. //
  28. //
  29. //
  30. //
  31. //
  32. //
  33. //
  34. //
  35. //
  36. //
  37. //
  38. //
  39. //
  40. //
  41. //
  42. //
  43. //
  44. //
  45. //
  46. //
  47. //
  48. //
  49. //
  50. //
  51. //
  52. //
  53. //
  54. //
  55. //
  56. //
  57. //
  58. //
  59. //
  60. //
  61. //
  62. //
  63. //
  64. //
  65. //
  66. //
  67. //
  68. //
  69. //
  70. //
  71. //
  72. //
  73. //
  74. //
  75. //
  76. //
  77. //
  78. /* harmony default export */ var systemConfiguration = ({
  79. inject: ['reload'],
  80. name: "systemConfiguration",
  81. data: function data() {
  82. return {
  83. fileList: [],
  84. info: { type: '' },
  85. zNodes: [],
  86. form: {
  87. number: '',
  88. id: '',
  89. endTime: '',
  90. key: ''
  91. }
  92. };
  93. },
  94. mounted: function mounted() {
  95. var info = JSON.parse(localStorage.getItem('info'));
  96. this.info = info;
  97. this.getEnterprise();
  98. },
  99. methods: {
  100. getEnterprise: function getEnterprise() {
  101. var _this2 = this;
  102. Object(api["d" /* httpGet */])("", this.$api.getEnterprise).then(function (res) {
  103. res.data.list.map(function (li) {
  104. if (li.id == _this2.info.enterpriseId) {
  105. var quota = JSON.parse(li.quota);
  106. if (quota) {
  107. _this2.form.number = quota.quota;
  108. _this2.form.id = li.id;
  109. _this2.form.endTime = quota.deadline;
  110. }
  111. }
  112. li.pid = li.parentId;
  113. li.label = li.name;
  114. li.value = li.id;
  115. });
  116. var zNodes = [];var arr = [];
  117. zNodes = Object(utils["p" /* ztreeToElementTree */])(res.data.list, {});
  118. if (zNodes.length > 0) {
  119. if (zNodes[0].children) {
  120. zNodes[0].children.map(function (li) {
  121. var obj = {
  122. name: li.name,
  123. id: li.id,
  124. label: li.name,
  125. value: li.id,
  126. parentId: li.parentId
  127. };
  128. arr.push(obj);
  129. });
  130. _this2.zNodes = arr;
  131. }
  132. }
  133. });
  134. },
  135. handleRemove: function handleRemove(file, fileList) {
  136. console.log(file, fileList);
  137. },
  138. handlePreview: function handlePreview(file) {
  139. console.log(file);
  140. },
  141. handleExceed: function handleExceed(files, fileList) {
  142. this.$message.warning("\u5F53\u524D\u9650\u5236\u9009\u62E9 1 \u4E2A\u6587\u4EF6\uFF0C\u672C\u6B21\u9009\u62E9\u4E86 " + files.length + " \u4E2A\u6587\u4EF6\uFF0C\u5171\u9009\u62E9\u4E86 " + (files.length + fileList.length) + " \u4E2A\u6587\u4EF6");
  143. },
  144. beforeRemove: function beforeRemove(file, fileList) {
  145. return this.$confirm("\u786E\u5B9A\u79FB\u9664 " + file.name + "\uFF1F");
  146. },
  147. /*读取授权文件*/
  148. handleChange: function handleChange(file) {
  149. var _this = this;
  150. var reader = new FileReader(); //先new 一个读文件的对象 FileReader
  151. if (typeof FileReader === "undefined") {
  152. //用来判断你的浏览器是否支持 FileReader
  153. this.$message({
  154. type: "info",
  155. message: "您的浏览器不支持文件读取。"
  156. });
  157. return;
  158. }
  159. // reader.readAsText(file.raw, "gb2312"); //读.txt文件
  160. reader.readAsArrayBuffer(file.raw); //读任意文件
  161. reader.onload = function (e) {
  162. var ints = new Uint8Array(e.target.result); //要使用读取的内容,所以将读取内容转化成Uint8Array
  163. // ints = ints.slice(0, 5000); //截取一段读取的内容
  164. var snippets = new TextDecoder('gb2312').decode(ints); //二进制缓存区内容转化成中文(即也就是读取到的内容)
  165. _this.form.key = snippets;
  166. };
  167. },
  168. onSubmit: function onSubmit() {
  169. var _this3 = this;
  170. var q = {
  171. "quota": this.form.number,
  172. "deadline": this.form.endTime
  173. };
  174. var code = 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0DLoa5uX9MjFQJkwvsTb92xkJnwffrdcjKnuFcYN3z4GrGYt0voO22zl3ncNOCzsXZmL6iOK6ukjolajqnpKB/ipXI0/17nZbmY4zturM49EkVt4qw0BvFR7bN/qo7By2Z9dpHOswDEDrJZk+mmD3MCX+ZK5zuhDFVYjDvX9oTZEBdTY5qrgVp2p3fOQCOccGR8ael8lQ+uwewlEMJoJ+NwtF6YPm/SEkVlcnD04J84i7RSXHLoXCV549E8Qv0rDfgcAZhWJfDFmdpuUr42N7TwXl2QI7hNXjqdGbmZjjeZ5MYVWIhDAUGPXB3wlJhYjem7wfjJyeKQ8Zi8vhTtkkQIDAQAB';
  175. var data = {
  176. key: Object(api["j" /* setCode */])(code, stringify_default()(q)),
  177. id: this.form.id
  178. };
  179. Object(api["g" /* httpPost */])(data, this.$api.editLincense).then(function (res) {
  180. if (res.success) {
  181. _this3.$message.success('设置成功');
  182. _this3.reload();
  183. } else {
  184. _this3.$message.error("\u8BBE\u7F6E\u5931\u8D25\uFF1A" + res.message);
  185. }
  186. });
  187. },
  188. onSubmitOne: function onSubmitOne() {
  189. var _this4 = this;
  190. if (this.form.key == '') {
  191. this.$message.error("请上传授权文件");
  192. } else {
  193. var data = {
  194. key: this.form.key,
  195. id: this.form.id
  196. };
  197. Object(api["g" /* httpPost */])(data, this.$api.editLincense).then(function (res) {
  198. if (res.success) {
  199. _this4.$message.success('设置成功');
  200. _this4.reload();
  201. } else {
  202. _this4.$message.error("\u8BBE\u7F6E\u5931\u8D25\uFF1A" + res.message);
  203. }
  204. });
  205. }
  206. }
  207. }
  208. });
  209. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/template-compiler?{"id":"data-v-39529bfc","hasScoped":true,"transformToRequire":{"video":["src","poster"],"source":"src","img":"src","image":"xlink:href"},"buble":{"transforms":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/views/systemConfiguration.vue
  210. var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('el-card',{attrs:{"shadow":"never"}},[(_vm.info.type === 0)?_c('div',{staticClass:"width-percentage-60"},[_c('el-form',{ref:"form",attrs:{"model":_vm.form,"label-width":"150px"}},[_c('el-form-item',{attrs:{"label":"企业/部门"}},[_c('el-select',{attrs:{"placeholder":"请选择"},model:{value:(_vm.form.id),callback:function ($$v) {_vm.$set(_vm.form, "id", $$v)},expression:"form.id"}},_vm._l((_vm.zNodes),function(item){return _c('el-option',{key:item.value,attrs:{"label":item.label,"value":item.value}})}),1)],1),_vm._v(" "),_c('el-form-item',{attrs:{"label":"设备接入数量"}},[_c('el-input',{model:{value:(_vm.form.number),callback:function ($$v) {_vm.$set(_vm.form, "number", $$v)},expression:"form.number"}})],1),_vm._v(" "),_c('el-form-item',{attrs:{"label":"设备接入授权时间"}},[_c('el-col',{attrs:{"span":11}},[_c('el-date-picker',{staticStyle:{"width":"100%"},attrs:{"type":"date","placeholder":"选择日期","value-format":"timestamp","format":"yyyy 年 MM 月 dd 日"},model:{value:(_vm.form.endTime),callback:function ($$v) {_vm.$set(_vm.form, "endTime", $$v)},expression:"form.endTime"}})],1)],1),_vm._v(" "),_c('el-form-item',[_c('el-button',{attrs:{"type":"primary"},on:{"click":_vm.onSubmit}},[_vm._v("确认")])],1)],1)],1):_c('div',{staticClass:"width-percentage-60"},[_c('el-form',{ref:"form",attrs:{"model":_vm.form,"label-width":"150px"}},[_c('el-form-item',{attrs:{"label":"设备接入数量"}},[_c('el-input',{attrs:{"disabled":""},model:{value:(_vm.form.number),callback:function ($$v) {_vm.$set(_vm.form, "number", $$v)},expression:"form.number"}})],1),_vm._v(" "),_c('el-form-item',{attrs:{"label":"设备接入授权时间"}},[_c('el-col',{attrs:{"span":11}},[_c('el-date-picker',{staticStyle:{"width":"100%"},attrs:{"type":"date","placeholder":"选择日期","disabled":"","value-format":"timestamp","format":"yyyy 年 MM 月 dd 日"},model:{value:(_vm.form.endTime),callback:function ($$v) {_vm.$set(_vm.form, "endTime", $$v)},expression:"form.endTime"}})],1)],1),_vm._v(" "),_c('el-form-item',{attrs:{"label":"授权文件"}},[_c('el-upload',{ref:"upload",staticClass:"upload-demo",attrs:{"action":"","on-change":_vm.handleChange,"auto-upload":false,"limit":1}},[_vm._v(" 点击上传\n ")])],1),_vm._v(" "),_c('el-form-item',[_c('el-button',{attrs:{"type":"primary"},on:{"click":_vm.onSubmitOne}},[_vm._v("确认")])],1)],1)],1)])],1)}
  211. var staticRenderFns = []
  212. var esExports = { render: render, staticRenderFns: staticRenderFns }
  213. /* harmony default export */ var views_systemConfiguration = (esExports);
  214. // CONCATENATED MODULE: ./src/views/systemConfiguration.vue
  215. function injectStyle (ssrContext) {
  216. __webpack_require__("6fyX")
  217. }
  218. var normalizeComponent = __webpack_require__("VU/8")
  219. /* script */
  220. /* template */
  221. /* template functional */
  222. var __vue_template_functional__ = false
  223. /* styles */
  224. var __vue_styles__ = injectStyle
  225. /* scopeId */
  226. var __vue_scopeId__ = "data-v-39529bfc"
  227. /* moduleIdentifier (server only) */
  228. var __vue_module_identifier__ = null
  229. var Component = normalizeComponent(
  230. systemConfiguration,
  231. views_systemConfiguration,
  232. __vue_template_functional__,
  233. __vue_styles__,
  234. __vue_scopeId__,
  235. __vue_module_identifier__
  236. )
  237. /* harmony default export */ var src_views_systemConfiguration = __webpack_exports__["default"] = (Component.exports);
  238. /***/ })
  239. });