isMy.vue 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278
  1. <template>
  2. <div v-if="showMine" class="about-container">
  3. <top-bar></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/server.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: 10%;">
  78. <van-row>
  79. <van-col :span="6" class="label">
  80. <!-- <div style="text-align: center;">签名印章</div>-->
  81. </van-col>
  82. <van-col :span="18">
  83. <imgCom
  84. :width="'150'"
  85. :list="imgList"
  86. v-for="item in imgList"
  87. :key="item"
  88. :height="'150'"
  89. :src="item"
  90. ></imgCom>
  91. </van-col>
  92. </van-row>
  93. <div class="btns" style="text-align: center;margin-top: 10px;">
  94. <van-button v-if="signatureSeal" type="info" size="small" @click="showSignHandler">重置签名印章</van-button>
  95. <van-button v-else size="small" type="info" @click="showSignHandler">新增签名印章</van-button>
  96. </div>
  97. <van-action-sheet v-model="showSign" title="签名" class="sheet">
  98. <writingPad ref="esign" :show-into-btn="false" @resultImg="resultImg" @cancelSign="cancelSign"></writingPad>
  99. </van-action-sheet>
  100. <!-- <div class="label">上传图片</div> -->
  101. </div>
  102. </div>
  103. </div>
  104. </div>
  105. </div>
  106. </template>
  107. <script>
  108. import TopBar from '@/components/TopBar'
  109. import {getServer} from '@/views/home/api'
  110. import { getOperatings } from '@/views/menu/operate/api'
  111. import imgCom from "@/components/imgCom/index.vue";
  112. import writingPad from "@/components/writingPad/index.vue";
  113. import {base64ToBlob} from "@/utils/base64TurnImg";
  114. import {upload,updateSignatureSeal} from "@/api/public";
  115. export default {
  116. name: 'isMy',
  117. components: {writingPad, imgCom, TopBar },
  118. data() {
  119. return {
  120. showServer:false,
  121. showMine:true,
  122. imgList:[],
  123. signatureSeal:"",
  124. showSign:false,
  125. dataInfo:{
  126. 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' +
  127. '\n' +
  128. '  相似的规律依旧延续到PCIe 5.0标准上,其单通道速度再次翻倍达到32GT/s,因此针对NVMe固态硬盘常见的4通道,其速率上限应该能达到15000MB/s左右。然而只需了解一下目前市面上为数不多的PCIe 5.0固态硬盘产品,就能看出它们距离这个理论上限还有一段距离。'
  129. },
  130. }
  131. },
  132. created() {
  133. this.showServer = false;
  134. this.showMine =true;
  135. let imgUrl = JSON.parse(window.sessionStorage.getItem('SET_MASTER_SIGNATURE_SEAL')) + '';
  136. if (imgUrl !== "" && imgUrl !== null && imgUrl !== "null"){
  137. this.signatureSeal = imgUrl;
  138. }
  139. },
  140. mounted() {
  141. this.initData();
  142. },
  143. methods: {
  144. initData(){
  145. this.imgList = this.signatureSeal.split(',') || [];
  146. getServer({code:'CUSTOMER_SERVICE'}).then(res => {
  147. let data = res.data;
  148. if(data){
  149. this.dataInfo.content = data.configValue;
  150. }
  151. });
  152. },
  153. checkOperate(){
  154. this.$router.push({path:"/operate"})
  155. },
  156. clickServe(){
  157. this.showMine = false;
  158. this.showServer = true;
  159. },
  160. clickMine(){
  161. this.showMine = false;
  162. this.showServer = false;
  163. },
  164. onClickLeft(){
  165. this.showMine = true;
  166. this.showServer = false;
  167. },
  168. showSignHandler(){
  169. this.showSign = true;
  170. },
  171. cancelSign()
  172. {
  173. this.showSign = false
  174. },
  175. //上传签名图到服务器
  176. resultImg(img) {
  177. let obj = base64ToBlob(img)
  178. let formData = new FormData()
  179. obj.name = '签名.jpg'
  180. formData.append('file', base64ToBlob(img))
  181. upload(formData, 'image')
  182. .then(res => {
  183. /*上传成功*/
  184. let imgUrl = process.env.NODE_ENV === 'development' ? res.data.url : res.data.url
  185. updateSignatureSeal({"signatureSeal":imgUrl}).then(res => {
  186. this.showSign = false;
  187. this.imgList = imgUrl.split(',') || [];
  188. this.$store.commit('SET_MASTER_SIGNATURE_SEAL', imgUrl)
  189. })
  190. // this.$emit("imgUrl", res.data.url);
  191. })
  192. .catch(err => {
  193. /*上传失败*/
  194. })
  195. },
  196. }
  197. }
  198. </script>
  199. <style lang="scss" scoped>
  200. .about-container {
  201. /* 你的命名空间 */
  202. .item-list {
  203. height: calc(100vh - 858px);
  204. overflow: auto;
  205. -border:1px solid red;
  206. }
  207. .item-title{
  208. display: flex;
  209. align-items: center;
  210. }
  211. .custom-title{
  212. margin-left: 10px;
  213. font-size: 4vw;
  214. color: #797979;
  215. }
  216. }
  217. .message-detail{
  218. height: calc(100vh - 102px)
  219. }
  220. .detail-box{
  221. height: calc(100% - 90px);
  222. overflow: auto;
  223. background-color: #fff;
  224. margin: 20px;
  225. }
  226. .msg-title{
  227. display: flex;
  228. flex-direction: column;
  229. box-sizing: border-box;
  230. width: 100%;
  231. padding: 2.666667vw 4.266667vw;
  232. overflow: hidden;
  233. color: #323233;
  234. font-size: 3.733333vw;
  235. line-height: 6.4vw;
  236. border-bottom: 1px solid #f5f5f5;
  237. }
  238. .message-content {
  239. width: 100%;
  240. padding: 20px 30px 20px 30px;
  241. height: 100%;
  242. overflow: auto;
  243. .text-content {
  244. width: 100%;
  245. min-height: 40px;
  246. overflow: auto;
  247. > p {
  248. text-indent: 2em;
  249. word-break: break-word;
  250. white-space: pre-wrap;
  251. text-align: justify;
  252. width: 100%;
  253. color: #777;
  254. }
  255. }
  256. .file-box {
  257. width: 100%;
  258. min-height: 40px;
  259. padding: 20px 0;
  260. > div {
  261. line-height: 32px;
  262. padding-left: 20px;
  263. margin: 10px 0;
  264. }
  265. }
  266. }
  267. </style>