Elizabeth's proactive approach involves introducing urinal toilet attachment , an ingenious concept that optimizes space and functionality.

schedulePrint.vue 4.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. <template>
  2. <div
  3. v-loading="loading"
  4. element-loading-text="服务器处理数据中,请稍候......."
  5. element-loading-spinner="el-icon-loading"
  6. element-loading-background="rgba(0, 0, 0, 0.8)"
  7. >
  8. <p style="margin-top: 10px;margin-bottom: 30px">
  9. 请选择你需要打印的排班打印单样式
  10. </p>
  11. <el-row :gutter="20" type="flex" justify="center">
  12. <el-col :span="6" style="text-align: center">
  13. <div
  14. @click="imgClick('https://kuyi.shengws.com/tempSchedule1.jpg')"
  15. >
  16. <el-tooltip
  17. class="item"
  18. effect="dark"
  19. :hide-after="2000"
  20. content="点击查看大图"
  21. placement="top-start"
  22. >
  23. <el-image
  24. style="width: 200px; height: 200px"
  25. :src="require('@/assets/home/111.jpg')"
  26. ></el-image>
  27. </el-tooltip>
  28. </div>
  29. <el-radio v-model="radio" label="1" @change="change">模版一</el-radio>
  30. </el-col>
  31. <el-col
  32. :span="6"
  33. style="margin-left: 100px;margin-right: 100px;text-align: center"
  34. >
  35. <div
  36. @click="imgClick('https://kuyi.shengws.com/tempSchedule2.jpg')"
  37. >
  38. <el-tooltip
  39. class="item"
  40. effect="dark"
  41. content="点击查看大图"
  42. placement="top-start"
  43. :hide-after="2000"
  44. >
  45. <el-image
  46. style="width: 200px; height: 200px"
  47. :src="require('@/assets/home/222.jpg')"
  48. ></el-image>
  49. </el-tooltip>
  50. </div>
  51. <el-radio v-model="radio" label="2" @change="change">模版二</el-radio
  52. >
  53. </el-col>
  54. <el-col
  55. :span="6"
  56. style="margin-left: 100px;margin-right: 100px;text-align: center"
  57. >
  58. <div
  59. @click="imgClick('https://kuyi.shengws.com/tempSchedule2.jpg')"
  60. >
  61. <el-tooltip
  62. class="item"
  63. effect="dark"
  64. content="点击查看大图"
  65. placement="top-start"
  66. :hide-after="2000"
  67. >
  68. <el-image
  69. style="width: 200px; height: 200px"
  70. :src="require('@/assets/home/222.jpg')"
  71. ></el-image>
  72. </el-tooltip>
  73. </div>
  74. <el-radio v-model="radio" label="3" @change="change">模版三</el-radio
  75. >
  76. </el-col>
  77. </el-row>
  78. <el-image-viewer
  79. v-if="showViewer"
  80. :on-close="closeViewer"
  81. :url-list="imgs"
  82. ></el-image-viewer>
  83. </div>
  84. </div>
  85. </template>
  86. <script>
  87. import BreadCrumb from "@/xt_pages/components/bread-crumb";
  88. import ElImageViewer from 'element-ui/packages/image/src/image-viewer'
  89. import { getScheduleTemplate, postScheduleTemplate } from "@/api/schedule";
  90. import store from "@/store";
  91. export default {
  92. name: "printTemplate",
  93. components: { ElImageViewer, BreadCrumb },
  94. data() {
  95. return {
  96. showViewer:false,
  97. crumbs: [
  98. { path: false, name: "管理中心" },
  99. { path: "data/print", name: "打印模版" }
  100. ],
  101. imgUrl_One: require("@/assets/home/111.jpg"),
  102. imgUrl_Two: require("@/assets/home/222.jpg"),
  103. imgs:[],
  104. imgs_one: ["https://kuyi.shengws.com/template1.png"],
  105. imgs_two: ["https://kuyi.shengws.com/template2.png"],
  106. delay: 500,
  107. radio: 0,
  108. tempRadio: 0,
  109. loading: false
  110. };
  111. },
  112. methods: {
  113. imgClick(val){
  114. this.imgs = []
  115. this.imgs.push(val)
  116. this.showViewer = true
  117. },
  118. closeViewer() {
  119. this.showViewer = false
  120. },
  121. change: function(val) {
  122. var params = {
  123. template_id:val
  124. }
  125. postScheduleTemplate(params).then(response=>{
  126. if(response.data.state == 1){
  127. var template = response.data.data.template
  128. this.$message.success("保存成功!")
  129. this.getlist()
  130. }
  131. })
  132. },
  133. getlist(){
  134. getScheduleTemplate().then(response=>{
  135. if(response.data.state == 1){
  136. var template = response.data.data.template
  137. console.log("template222222",template)
  138. if(template.template_id == 0){
  139. this.radio = "1"
  140. }
  141. if(template.template_id!=0){
  142. this.radio = template.template_id.toString()
  143. }
  144. }
  145. })
  146. }
  147. },
  148. created() {
  149. this.getlist()
  150. }
  151. };
  152. </script>
  153. <style scoped>
  154. .el-row {
  155. margin-bottom: 20px;
  156. & :last-child {
  157. margin-bottom: 0;
  158. }
  159. }
  160. .el-col {
  161. border-radius: 4px;
  162. }
  163. </style>
  164. <style lang="scss">
  165. .app-print {
  166. .el-radio__label {
  167. padding-left: 10px;
  168. }
  169. }
  170. </style>