App.vue 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340
  1. <template>
  2. <div id="app">
  3. <div class="left">
  4. test
  5. </div>
  6. <div>
  7. <div class="right">
  8. <div>
  9. <span>打印</span>
  10. <div>2张纸</div>
  11. </div>
  12. <div>
  13. <span>目标打印机</span>
  14. <div>
  15. <Select
  16. v-model="model"
  17. prefix="md-print"
  18. >
  19. <Option
  20. v-for="item in List"
  21. :key="item.value"
  22. :value="item.value"
  23. >
  24. {{ item.label }}
  25. </Option>
  26. </Select>
  27. </div>
  28. </div>
  29. <div>
  30. <span>页面</span>
  31. <div>
  32. <Select
  33. v-model="model"
  34. >
  35. <Option
  36. v-for="item in List"
  37. :key="item.value"
  38. :value="item.value"
  39. >
  40. {{ item.label }}
  41. </Option>
  42. </Select>
  43. </div>
  44. </div>
  45. <div>
  46. <span>份数</span>
  47. <div>
  48. <InputNumber
  49. v-model="model1"
  50. :max="10"
  51. :min="1"
  52. />
  53. </div>
  54. </div>
  55. <div>
  56. <span>布局</span>
  57. <div>
  58. <Select
  59. v-model="model"
  60. >
  61. <Option
  62. v-for="item in List"
  63. :key="item.value"
  64. :value="item.value"
  65. >
  66. {{ item.label }}
  67. </Option>
  68. </Select>
  69. </div>
  70. </div>
  71. <div>
  72. <!-- -->
  73. <Collapse simple>
  74. <Panel hide-arrow>
  75. 更多设置
  76. <Icon type="ios-arrow-forward" />
  77. <template #content>
  78. <div>
  79. <span>纸质尺寸</span>
  80. <div>
  81. <Select
  82. v-model="model"
  83. >
  84. <Option
  85. v-for="item in List"
  86. :key="item.value"
  87. :value="item.value"
  88. >
  89. {{ item.label }}
  90. </Option>
  91. </Select>
  92. </div>
  93. </div>
  94. <div>
  95. <span>每个工作表的页数</span>
  96. <div>
  97. <Select
  98. v-model="model"
  99. >
  100. <Option
  101. v-for="item in List"
  102. :key="item.value"
  103. :value="item.value"
  104. >
  105. {{ item.label }}
  106. </Option>
  107. </Select>
  108. </div>
  109. </div>
  110. <div>
  111. <span>边距</span>
  112. <div>
  113. <Select
  114. v-model="model"
  115. >
  116. <Option
  117. v-for="item in List"
  118. :key="item.value"
  119. :value="item.value"
  120. >
  121. {{ item.label }}
  122. </Option>
  123. </Select>
  124. </div>
  125. </div>
  126. <div>
  127. <span>打印质量</span>
  128. <div>
  129. <Select
  130. v-model="model"
  131. >
  132. <Option
  133. v-for="item in List"
  134. :key="item.value"
  135. :value="item.value"
  136. >
  137. {{ item.label }}
  138. </Option>
  139. </Select>
  140. </div>
  141. </div>
  142. <div>
  143. <span>缩放</span>
  144. <div>
  145. <Select
  146. v-model="model"
  147. >
  148. <Option
  149. v-for="item in List"
  150. :key="item.value"
  151. :value="item.value"
  152. >
  153. {{ item.label }}
  154. </Option>
  155. </Select>
  156. </div>
  157. </div>
  158. <div class="resetStyle">
  159. <span>选项</span>
  160. <div>
  161. <CheckboxGroup
  162. v-model="checkAllGroup"
  163. >
  164. <Checkbox label="双面打印" />
  165. <Checkbox label="页面页脚" />
  166. <Checkbox label="背景图形" />
  167. </CheckboxGroup>
  168. </div>
  169. </div>
  170. <div>
  171. 使用系统对话框进行打印...(Ctrl+Shift+P)
  172. <Icon type="md-share-alt" />
  173. </div>
  174. </template>
  175. </Panel>
  176. </Collapse>
  177. </div>
  178. </div>
  179. <div class="right-bottom">
  180. <Button type="primary">
  181. 打印
  182. </Button>
  183. <Button>取消</Button>
  184. </div>
  185. </div>
  186. </div>
  187. </template>
  188. <script>
  189. export default {
  190. data() {
  191. return {
  192. model: 'test',
  193. model1: 1,
  194. checkAllGroup: [],
  195. List: [
  196. {
  197. value: 'test',
  198. label: 'test'
  199. }
  200. ]
  201. }
  202. }
  203. }
  204. </script>
  205. <style lang="less" scoped>
  206. #app {
  207. font-family: Avenir, Helvetica, Arial, sans-serif;
  208. text-align: center;
  209. width: 1310px;
  210. height: 860px;
  211. margin: 0;
  212. padding: 0;
  213. overflow: hidden;
  214. display: flex;
  215. font-size: 15px;
  216. color: black;
  217. .left{
  218. width: 900px;
  219. height: 860px;
  220. background: rgb(218, 220, 224);
  221. overflow-y: scroll;
  222. }
  223. .right{
  224. width: calc(1310px - 900px);
  225. height: 800px;
  226. padding-top: 20px;
  227. overflow-y: overlay;
  228. // 修改图标
  229. /deep/ .ivu-icon-ios-arrow-up:before{
  230. content:"\f343";
  231. font-size: 17px;
  232. }
  233. /deep/ .ivu-icon-ios-arrow-down:before {
  234. content: "\f33d";
  235. font-size: 17px;
  236. }
  237. /deep/ .ivu-input-number-input,
  238. /deep/ .ivu-input-number,
  239. /deep/ .ivu-select-selection{
  240. background: rgb(241, 243, 244);
  241. border: none;
  242. }
  243. /deep/ .ivu-input-number-handler-wrap{
  244. border:none;
  245. background: none;
  246. &>a{
  247. border: none;
  248. }
  249. }
  250. /deep/ .ivu-icon-md-print:before {
  251. font-size: 20px;
  252. }
  253. /deep/ .ivu-collapse{
  254. border-bottom: none;
  255. .ivu-collapse-header{
  256. display: flex;
  257. align-items: center;
  258. justify-content: space-between;
  259. padding: 20px 15px 20px 20px;
  260. height: auto;
  261. line-height: normal;
  262. }
  263. .ivu-collapse-header:hover{
  264. background: rgba(232, 233, 233, 1);
  265. }
  266. .ivu-collapse-content{
  267. padding: 0;
  268. }
  269. .ivu-collapse-content-box>div{
  270. display: flex;
  271. align-items: center;
  272. margin-top: 20px;
  273. text-align: left;
  274. padding: 0 20px;
  275. &>span:first-child{
  276. display: inline-block;
  277. width: 150px;
  278. }
  279. &>div:last-child{
  280. flex: 1;
  281. }
  282. &:last-child{
  283. font-size: 13px;
  284. justify-content: space-between;
  285. margin-top: 40px;
  286. cursor: pointer;
  287. }
  288. .ivu-checkbox-group-item{
  289. display: block;
  290. margin-bottom: 20px;
  291. }
  292. }
  293. .ivu-collapse-content-box .resetStyle{
  294. align-items: flex-start;
  295. }
  296. }
  297. &>div:first-child span:first-child{
  298. font-size: 16px;
  299. }
  300. &>div:first-child > div:last-child{
  301. text-align: right;
  302. font-size: 14px;
  303. }
  304. &>div:not(:last-child){
  305. display: flex;
  306. align-items: center;
  307. margin-bottom: 20px;
  308. text-align: left;
  309. padding: 0 20px;
  310. &>span:first-child{
  311. display: inline-block;
  312. width: 150px;
  313. }
  314. &>div:last-child{
  315. flex: 1;
  316. }
  317. }
  318. }
  319. .right-bottom{
  320. height: 60px;
  321. display: flex;
  322. align-items: center;
  323. padding: 0 20px;
  324. justify-content: flex-end;
  325. &>button:last-child{
  326. margin-left: 10px;
  327. }
  328. }
  329. }
  330. </style>
  331. <style>
  332. html,
  333. body {
  334. padding: 0;
  335. margin: 0;
  336. width: 100%;
  337. height: 100%;
  338. user-select: none;
  339. }
  340. </style>