isMy.vue 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282
  1. <template>
  2. <div v-if="showMine" class="about-container">
  3. <top-bar ref="topbar"></top-bar>
  4. <div class="item-list">
  5. <van-cell is-link @click="clickMine">
  6. <!-- 使用 title 插槽来自定义标题 -->
  7. <template #title>
  8. <p class="item-title">
  9. <!-- <van-icon size=".5rem" name="smile-comment-o" color="#008cd6"/>-->
  10. <van-image
  11. width="0.6rem"
  12. height="0.6rem"
  13. style="margin-left: 10px;float: left"
  14. :src="require('@/assets/img/my/sign.png')"
  15. />
  16. <span class="custom-title">签名印章</span>
  17. </p>
  18. </template>
  19. </van-cell>
  20. <van-cell is-link @click="clickServe">
  21. <!-- 使用 title 插槽来自定义标题 -->
  22. <template #title>
  23. <p class="item-title">
  24. <!-- <van-icon size=".5rem" name="smile-comment-o" color="#008cd6"/>-->
  25. <van-image
  26. width="0.6rem"
  27. height="0.6rem"
  28. style="margin-left: 10px;float: left"
  29. :src="require('@/assets/img/my/server.png')"
  30. />
  31. <span class="custom-title">客服服务</span>
  32. </p>
  33. </template>
  34. </van-cell>
  35. <van-cell is-link @click="checkOperate">
  36. <!-- 使用 title 插槽来自定义标题 -->
  37. <template #title>
  38. <p class="item-title">
  39. <!-- <van-icon size=".5rem" name="info-o" color="#008cd6"/>-->
  40. <van-image
  41. width="0.6rem"
  42. height="0.6rem"
  43. style="margin-left: 10px;float: left"
  44. :src="require('@/assets/img/my/operta.png')"
  45. />
  46. <span class="custom-title">操作手册</span>
  47. </p>
  48. </template>
  49. </van-cell>
  50. </div>
  51. </div>
  52. <!-- 消息详情 -->
  53. <div v-else-if="showServer" class="serve-detail">
  54. <van-nav-bar
  55. title="客服服务"
  56. left-arrow
  57. @click-left="onClickLeft"
  58. />
  59. <div class="detail-box" v-if="dataInfo">
  60. <div class="message-content">
  61. <div class="text-content">
  62. <p v-html="dataInfo.content"></p>
  63. </div>
  64. </div>
  65. </div>
  66. </div>
  67. <!-- 个人印章 -->
  68. <div v-else class="serve-detail">
  69. <van-nav-bar
  70. title="签名印章"
  71. left-arrow
  72. @click-left="onClickLeft"
  73. />
  74. <div class="detail-box" v-if="dataInfo">
  75. <div class="message-content">
  76. <div class="text-content">
  77. <div class="mainItem" style="margin-top: 5%;">
  78. <div style="height: 140px">
  79. <van-row>
  80. <van-col :span="24">
  81. <imgCom
  82. :width="'100%'"
  83. :list="imgList"
  84. v-for="item in imgList"
  85. :key="item"
  86. :height="'130'"
  87. :src="item"
  88. ></imgCom>
  89. </van-col>
  90. </van-row>
  91. </div>
  92. <div class="btns" style="text-align: center;margin-top: 10px;">
  93. <van-button v-if="signatureSeal" type="info" size="small" @click="showSignHandler">重置签名印章</van-button>
  94. <van-button v-else size="small" type="info" @click="showSignHandler">新增签名印章</van-button>
  95. </div>
  96. <van-action-sheet v-model="showSign" title="签名" class="sheet">
  97. <writingPad ref="esign" :show-into-btn="false" @resultImg="resultImg" @cancelSign="cancelSign"></writingPad>
  98. </van-action-sheet>
  99. <!-- <div class="label">上传图片</div> -->
  100. </div>
  101. </div>
  102. </div>
  103. </div>
  104. </div>
  105. </template>
  106. <script>
  107. import TopBar from '@/components/TopBar'
  108. import {getServer} from '@/views/home/api'
  109. import { getOperatings } from '@/views/menu/operate/api'
  110. import imgCom from "@/components/imgCom/index.vue";
  111. import writingPad from "@/components/writingPad/index.vue";
  112. import {base64ToBlob} from "@/utils/base64TurnImg";
  113. import {upload,updateSignatureSeal} from "@/api/public";
  114. export default {
  115. name: 'isMy',
  116. components: {writingPad, imgCom, TopBar },
  117. data() {
  118. return {
  119. showServer:false,
  120. showMine:true,
  121. imgList:[],
  122. signatureSeal:"",
  123. showSign:false,
  124. dataInfo:{
  125. content:'每一代PCIe标准的速度都实现了翻倍的增长,例如我们熟悉的PCIe 3.0与PCIe 4.0,其单通道速度就分别为8GT/s与16GT/s,考虑到数据编码方案(均为128b/130b)效率,最终换算为我们更熟悉的单位时则是984.6MB/s与1969MB/s。看到这里,想必大家都能联想到PCIe 3.0与4.0固态硬盘常见的速率水平,由于它们都采用4通道,因此上限速率能够达到3500MB/s以及7000MB/s以上。\n' +
  126. '\n' +
  127. '  相似的规律依旧延续到PCIe 5.0标准上,其单通道速度再次翻倍达到32GT/s,因此针对NVMe固态硬盘常见的4通道,其速率上限应该能达到15000MB/s左右。然而只需了解一下目前市面上为数不多的PCIe 5.0固态硬盘产品,就能看出它们距离这个理论上限还有一段距离。'
  128. },
  129. }
  130. },
  131. created() {
  132. this.showServer = false;
  133. this.showMine =true;
  134. let imgUrl = JSON.parse(window.sessionStorage.getItem('SET_MASTER_SIGNATURE_SEAL')) + '';
  135. if (imgUrl !== "" && imgUrl !== null && imgUrl !== "null"){
  136. this.signatureSeal = imgUrl;
  137. }
  138. },
  139. mounted() {
  140. this.initData();
  141. this.$refs.topbar.getSubUserList();
  142. },
  143. methods: {
  144. initData(){
  145. console.log("123456")
  146. if (this.signatureSeal){
  147. this.imgList = this.signatureSeal.split(',');
  148. }
  149. getServer({code:'CUSTOMER_SERVICE'}).then(res => {
  150. let data = res.data;
  151. if(data){
  152. this.dataInfo.content = data.configValue;
  153. }
  154. });
  155. },
  156. checkOperate(){
  157. this.$router.push({path:"/operate"})
  158. },
  159. clickServe(){
  160. this.showMine = false;
  161. this.showServer = true;
  162. },
  163. clickMine(){
  164. this.showMine = false;
  165. this.showServer = false;
  166. },
  167. onClickLeft(){
  168. this.showMine = true;
  169. this.showServer = false;
  170. },
  171. showSignHandler(){
  172. this.showSign = true;
  173. },
  174. cancelSign()
  175. {
  176. this.showSign = false
  177. },
  178. //上传签名图到服务器
  179. resultImg(img) {
  180. let obj = base64ToBlob(img)
  181. let formData = new FormData()
  182. obj.name = '签名.jpg'
  183. formData.append('file', base64ToBlob(img))
  184. upload(formData, 'image')
  185. .then(res => {
  186. /*上传成功*/
  187. let imgUrl = process.env.NODE_ENV === 'development' ? res.data.url : res.data.url
  188. updateSignatureSeal({"signatureSeal":imgUrl}).then(res => {
  189. this.showSign = false;
  190. this.imgList = imgUrl.split(',') || [];
  191. this.$store.commit('SET_MASTER_SIGNATURE_SEAL', imgUrl);
  192. this.signatureSeal = imgUrl;
  193. })
  194. // this.$emit("imgUrl", res.data.url);
  195. })
  196. .catch(err => {
  197. /*上传失败*/
  198. })
  199. },
  200. }
  201. }
  202. </script>
  203. <style lang="scss" scoped>
  204. .about-container {
  205. /* 你的命名空间 */
  206. .item-list {
  207. height: calc(100vh - 858px);
  208. overflow: auto;
  209. -border:1px solid red;
  210. }
  211. .item-title{
  212. display: flex;
  213. align-items: center;
  214. }
  215. .custom-title{
  216. margin-left: 10px;
  217. font-size: 4vw;
  218. color: #797979;
  219. }
  220. }
  221. .message-detail{
  222. height: calc(100vh - 102px)
  223. }
  224. .detail-box{
  225. height: calc(100% - 90px);
  226. overflow: auto;
  227. background-color: #fff;
  228. margin: 20px;
  229. }
  230. .msg-title{
  231. display: flex;
  232. flex-direction: column;
  233. box-sizing: border-box;
  234. width: 100%;
  235. padding: 2.666667vw 4.266667vw;
  236. overflow: hidden;
  237. color: #323233;
  238. font-size: 3.733333vw;
  239. line-height: 6.4vw;
  240. border-bottom: 1px solid #f5f5f5;
  241. }
  242. .message-content {
  243. width: 100%;
  244. padding: 20px 30px 20px 30px;
  245. height: 100%;
  246. overflow: auto;
  247. .text-content {
  248. width: 100%;
  249. min-height: 40px;
  250. overflow: auto;
  251. > p {
  252. text-indent: 2em;
  253. word-break: break-word;
  254. white-space: pre-wrap;
  255. text-align: justify;
  256. width: 100%;
  257. color: #777;
  258. }
  259. }
  260. .file-box {
  261. width: 100%;
  262. min-height: 40px;
  263. padding: 20px 0;
  264. > div {
  265. line-height: 32px;
  266. padding-left: 20px;
  267. margin: 10px 0;
  268. }
  269. }
  270. }
  271. </style>