CCL_QMS检验
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.

199 lines
3.3 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. import Vue from 'vue';
  2. import Element from 'element-ui';
  3. Vue.use(Element, {size: 'small', zIndex: 1000});
  4. import {
  5. Pagination,
  6. Dialog,
  7. Autocomplete,
  8. Dropdown,
  9. DropdownMenu,
  10. DropdownItem,
  11. Menu,
  12. Submenu,
  13. MenuItem,
  14. MenuItemGroup,
  15. Input,
  16. InputNumber,
  17. Radio,
  18. RadioGroup,
  19. RadioButton,
  20. Checkbox,
  21. CheckboxButton,
  22. CheckboxGroup,
  23. Switch,
  24. Select,
  25. Option,
  26. OptionGroup,
  27. Button,
  28. ButtonGroup,
  29. Table,
  30. TableColumn,
  31. DatePicker,
  32. TimeSelect,
  33. TimePicker,
  34. Popover,
  35. Tooltip,
  36. Breadcrumb,
  37. BreadcrumbItem,
  38. Form,
  39. FormItem,
  40. Tabs,
  41. TabPane,
  42. Tag,
  43. Tree,
  44. Alert,
  45. Slider,
  46. Icon,
  47. Row,
  48. Col,
  49. Upload,
  50. Progress,
  51. Badge,
  52. Card,
  53. Rate,
  54. Steps,
  55. Step,
  56. Carousel,
  57. CarouselItem,
  58. Collapse,
  59. CollapseItem,
  60. Cascader,
  61. ColorPicker,
  62. Transfer,
  63. Container,
  64. Header,
  65. Aside,
  66. Main,
  67. Footer,
  68. Loading,
  69. MessageBox,
  70. Message,
  71. Notification
  72. } from 'element-ui';
  73. Vue.use(Pagination);
  74. Vue.use(Dialog);
  75. if (Dialog.props && Dialog.props.closeOnPressEscape) {
  76. Dialog.props.closeOnPressEscape.default = true;
  77. }
  78. Vue.use(Autocomplete);
  79. Vue.use(Dropdown);
  80. Vue.use(DropdownMenu);
  81. Vue.use(DropdownItem);
  82. Vue.use(Menu);
  83. Vue.use(Submenu);
  84. Vue.use(MenuItem);
  85. Vue.use(MenuItemGroup);
  86. Vue.use(Input);
  87. Vue.use(InputNumber);
  88. Vue.use(Radio);
  89. Vue.use(RadioGroup);
  90. Vue.use(RadioButton);
  91. Vue.use(Checkbox);
  92. Vue.use(CheckboxButton);
  93. Vue.use(CheckboxGroup);
  94. Vue.use(Switch);
  95. Vue.use(Select);
  96. Vue.use(Option);
  97. Vue.use(OptionGroup);
  98. Vue.use(Button);
  99. Vue.use(ButtonGroup);
  100. Vue.use(Table);
  101. Vue.use(TableColumn);
  102. Vue.use(DatePicker);
  103. Vue.use(TimeSelect);
  104. Vue.use(TimePicker);
  105. Vue.use(Popover);
  106. Vue.use(Tooltip);
  107. Vue.use(Breadcrumb);
  108. Vue.use(BreadcrumbItem);
  109. Vue.use(Form);
  110. Vue.use(FormItem);
  111. Vue.use(Tabs);
  112. Vue.use(TabPane);
  113. Vue.use(Tag);
  114. Vue.use(Tree);
  115. Vue.use(Alert);
  116. Vue.use(Slider);
  117. Vue.use(Icon);
  118. Vue.use(Row);
  119. Vue.use(Col);
  120. Vue.use(Upload);
  121. Vue.use(Progress);
  122. Vue.use(Badge);
  123. Vue.use(Card);
  124. Vue.use(Rate);
  125. Vue.use(Steps);
  126. Vue.use(Step);
  127. Vue.use(Carousel);
  128. Vue.use(CarouselItem);
  129. Vue.use(Collapse);
  130. Vue.use(CollapseItem);
  131. Vue.use(Cascader);
  132. Vue.use(ColorPicker);
  133. Vue.use(Container);
  134. Vue.use(Header);
  135. Vue.use(Aside);
  136. Vue.use(Main);
  137. Vue.use(Footer);
  138. Vue.use(Loading.directive);
  139. Vue.prototype.$loading = Loading.service;
  140. Vue.prototype.$msgbox = MessageBox;
  141. Vue.prototype.$alert = MessageBox.alert;
  142. Vue.prototype.$confirm = MessageBox.confirm;
  143. Vue.prototype.$prompt = MessageBox.prompt;
  144. Vue.prototype.$notify = Notification;
  145. Vue.prototype.$message = Message;
  146. Vue.prototype.$ELEMENT = {size: 'medium'}
  147. Vue.prototype.$message = function (msg) {
  148. let msgObj = {
  149. message: msg.message ? msg.message : msg,
  150. duration: 2000
  151. }
  152. let msgType = msg.type || ""
  153. switch (msgType) {
  154. case 'success':
  155. return Message.success(msgObj);
  156. break;
  157. case 'warning':
  158. return Message.warning(msgObj);
  159. break;
  160. case 'error':
  161. return Message.error(msgObj);
  162. break;
  163. default:
  164. return Message(msgObj);
  165. }
  166. }
  167. Vue.prototype.$message.success = function (msg) {
  168. return Message.success({
  169. message: msg,
  170. duration: 1000
  171. })
  172. }
  173. Vue.prototype.$message.warning = function (msg) {
  174. return Message.warning({
  175. message: msg,
  176. duration: 1000
  177. })
  178. }
  179. Vue.prototype.$message.error = function (msg) {
  180. return Message.error({
  181. message: msg,
  182. duration: 1500
  183. })
  184. }