step2.blade.php 70 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761
  1. @extends('layouts.base')
  2. @section('content')
  3. @section('title', '合同模版信息')
  4. <script type="text/javascript" src="{{static_url('js/pdfjs/pdf.js')}}"></script>
  5. <script>
  6. pdfjsLib.GlobalWorkerOptions.workerSrc ="{{static_url('js/pdfjs/pdf.worker.min.js')}}";
  7. </script>
  8. <div class="w1200 m0a">
  9. <div class="right-titpos">
  10. <ul class="add-snav">
  11. <li class="active"><a href="#">合同模版信息</a></li>
  12. </ul>
  13. </div>
  14. <div id="app">
  15. <template>
  16. <div id="pageContent" class="pageContent_2lAGg">
  17. <div class="leftContent_2NoKi">
  18. <div class="doc-list-context">
  19. <div class="doc-list-title">合同 <span>(1份)</span></div>
  20. <div class="doc-list">
  21. <div class="doc-item">
  22. <div class="doc-img">
  23. {{--<img src="../../assets/images/pdfpng.png"
  24. alt="">--}}
  25. <div class="doc-page-num">[[page_count]]</div>
  26. </div>
  27. <div class="doc-name">[[Data.contract_doc_name]]</div>
  28. </div>
  29. <div class="componentsList_1OIrB">
  30. <p class="title_3vpva">控件库</p>
  31. <!--这个页面不能格式化-->
  32. <p class="tips_2oKGU">请将控件拖动到合同区域。</p>
  33. <div class="componentSign-show" @mousedown='signSeal'>
  34. <p>签署区</p><p><i class="iconfont icon-all_sign"></i></p>
  35. </div>
  36. <div class="componentVariable-text">
  37. <p class="title_3vpva">变量</p>
  38. <!--这个页面不能格式化-->
  39. <p class="tips_2oKGU">请将变量拖动到合同区域。</p>
  40. </div>
  41. <div class="componentSign" @mousedown='signSeal'>
  42. <p class="sealCompInfo_3v9iQ"><span class="need">*</span><span><span>甲方</span><em>(<span>签署区</span>)</em></span></p><div class="itemConentStyle_2MWEL"><div class="infoMsg_3NkPg">签署区</div><i class="iconfont icon-pm_auction_success"></i></div><div class="text_delete" @click.stop="TextDeleteIt">删除</div>
  43. </div>
  44. <div class="componentVariable">
  45. @foreach($variable_list as $key=>$row)
  46. <div class="variable-item" data-name="{{$row['key']}}" @mousedown='signVariable'>
  47. <p>{{$row['text']}}</p><div class="variable_delete" @click.stop="VariableDeleteIt">删除</div><div class="sealCompInfo_text">{{$row['text']}}</div>
  48. </div>
  49. @endforeach
  50. </div>
  51. </div>
  52. <div style="text-align: center;margin-top: 50px">
  53. <el-button type="primary" style="width: 90px;" @click="goBack">上一步</el-button>
  54. <el-button type="primary" style="width: 90px;" @click="submitForm">保存</el-button>
  55. </div>
  56. <div style="text-align: center;margin-top: 20px">
  57. </div>
  58. </div>
  59. </div>
  60. </div>
  61. <div class="pdfContent_1PW2f">
  62. <div class="pdf-header">
  63. <div class="block">
  64. <span class="demonstration">[[value1*100]]%</span>
  65. <div class="slider">
  66. <el-slider v-model="value1" :min="0.5" :max="2" :step="0.25" @change="handleChange"></el-slider>
  67. </div>
  68. </div>
  69. <div class="input">
  70. <span>Page: <input type="text" class="input-text" v-model="page_num" placeholder="1"> / [[page_count]]</span>
  71. <el-button @click="jump" type="text">跳转</el-button>
  72. <!--<span>全屏</span>-->
  73. </div>
  74. </div>
  75. <div class="pdf-container" ref="pdfBox" v-loading="!isShow"
  76. element-loading-text="拼命加载中"
  77. element-loading-spinner="el-icon-loading"
  78. element-loading-background="rgba(0, 0, 0, 0.1)">
  79. <div class="pdf-box" :style="{width: pdfWidth+'px'}">
  80. <div class="pdfPage_1yRne" :style="{width: pdfWidth+'px',height: pdfHeight+ 'px'}" v-for="page in page_count" :key="page">
  81. <canvas class="pdf-item" :id="'the-canvas'+page" ></canvas>
  82. <div @click="clearAll" class="dragLayer_3ccsq" v-bind:id="'can'+ page"></div>
  83. </div>
  84. </div>
  85. </div>
  86. </div>
  87. <div class="taskInfoArea_3ThxW">
  88. <div class="tab-bar">
  89. <el-tabs v-model="activeName" @tab-click="handleClick">
  90. <el-tab-pane label="文本控件设置" name="2"></el-tab-pane>
  91. </el-tabs>
  92. </div>
  93. <div class="tab-context">
  94. <div class="item" v-show="activeName == 2">
  95. <div class="testSetting_8FNRp" v-show="hasChoose">
  96. <div class="item-box">
  97. <p class="titleh2_3zdht">名称</p>
  98. <el-input v-model="form_name" ref="input1" placeholder="请输入文本名称"></el-input>
  99. </div>
  100. <div class="item-box">
  101. <p class="titleh2_3zdht">文本域默认值</p>
  102. <el-input v-model="form_value" ref="input2" placeholder="请输入文本默认值"></el-input>
  103. </div>
  104. <div class="item-box">
  105. <span class="titleh2_3zdht">是否必填项</span>
  106. <el-switch v-model="form_need"></el-switch>
  107. </div>
  108. </div>
  109. <div class="testSetting_8FNRp" v-show="hasChoose2">
  110. <div class="item-box">
  111. <p class="titleh2_3zdht">名称</p>
  112. <el-input v-model="seal_name" ref="input3" placeholder="请输入签署区名称"></el-input>
  113. </div>
  114. <div class="item-box">
  115. <p class="titleh2_3zdht">填写人设置</p>
  116. <el-select v-model="role_id" placeholder="请选择填写人">
  117. <el-option v-for="item in role_idList" :key="item.role_id" :label="item.name" :value="item.role_id"></el-option>
  118. </el-select>
  119. </div>
  120. </div>
  121. <div class="emptyStyle_wctx0" v-show="!hasChoose && !hasChoose2">
  122. <p class="emptyP_2N3sX">请从控件库中将控件拖动到合同区域</p>
  123. <p class="emptyP_2N3sX">或选中已经添加到合同上的控件</p>
  124. </div>
  125. </div>
  126. </div>
  127. </div>
  128. </div>
  129. </template>
  130. </div>
  131. <input type="hidden" id="get_detail_url" value="{{yzWebUrl(\Yunshop\ShopEsign\admin\TemplateController::GET_DETAIL_URL)}}">
  132. <input type="hidden" id="get_forms_url" value="{{yzWebUrl(\Yunshop\ShopEsign\admin\TemplateController::GET_FORMS_URL)}}">
  133. <input type="hidden" id="edit_step2_url" value="{{yzWebUrl(\Yunshop\ShopEsign\admin\TemplateController::EDIT_STEP2_URL)}}">
  134. <input type="hidden" id="edit_form_url" value="{{yzWebUrl(\Yunshop\ShopEsign\admin\TemplateController::EDIT_FORM_URL)}}">
  135. <input type="hidden" id="delete_form_url" value="{{yzWebUrl(\Yunshop\ShopEsign\admin\TemplateController::DELETE_FORM_URL)}}">
  136. <input type="hidden" id="index_url" value="{{yzWebUrl(\Yunshop\ShopEsign\admin\TemplateController::INDEX_URL)}}">
  137. </div>
  138. <script>
  139. // 解决mousedown和click的之间的冲突 (利用事件发生时间来判断 点击事件时间短)
  140. var key = false;//设置了一个标志 false为点击事件 ture为鼠标移动事件
  141. var firstTime = 0;
  142. var lastTime = 0;
  143. var app = new Vue({
  144. el:"#app",
  145. delimiters: ['[[', ']]'],
  146. data() {
  147. return {
  148. isShow: false,
  149. role_idList: [{name: '甲方',role_id: '1'},{name: '乙方',role_id: '2'},{name: '丙方',role_id: '3'}],
  150. seal_name: '签署区',
  151. role_id: '1',
  152. id: '',
  153. hasChoose2: false,
  154. hasChoose: false,
  155. Data: {},
  156. dom: null,
  157. scrollTop: 0,
  158. activeName: "2",
  159. pdfUrl: "",// 这里是pdf文件地址,后台给的流文件请求地址也是可以的
  160. pdfDoc: null,// pdfjs 生成的对象
  161. pageNum: 1,//
  162. value1: 1,
  163. scale: 1.0,// 放大倍数
  164. page_num: 0,// 当前页数
  165. page_count: 0,// 总页数
  166. maxscale: 2,// 最大放大倍数
  167. minscale: 0.5,// 最小放大倍数
  168. pdfWidth: 0,
  169. pdfHeight: 0,
  170. right: true,
  171. left: true,
  172. code: "",
  173. form_name: "文本名称",
  174. form_value: "文本",
  175. form_need: true,
  176. pos_x: '',
  177. pos_y: '',
  178. pos_page: '',
  179. textId: '',
  180. commonStructsList: []
  181. };
  182. },
  183. created() {
  184. },
  185. beforeRouteLeave (to, from, next) {
  186. next()
  187. },
  188. mounted() {
  189. this.id = parseInt("{{$id}}");
  190. this.$nextTick(function() {
  191. this.$refs.pdfBox.addEventListener("scroll", this.handleScroll, false);
  192. this.getData();
  193. });
  194. },
  195. watch: {
  196. scale(new1, old1) {
  197. document.querySelectorAll(".mark").forEach((item) => {
  198. item.style.left = (parseInt(item.style.left) / (old1 / new1)) + "px";
  199. item.style.top = (parseInt(item.style.top) / (old1 / new1)) + "px";
  200. item.style.height = 100 * new1 + "px";
  201. item.style.width = 100 * new1 + "px";
  202. });
  203. document.querySelectorAll(".text_mark").forEach((item) => {
  204. item.style.left = (parseInt(item.style.left) / (old1 / new1)) + "px";
  205. item.style.top = (parseInt(item.style.top) / (old1 / new1)) + "px";
  206. item.style.height = 28 * new1 + "px";
  207. item.style.width = (item.offsetWidth) / (old1 / new1) + "px";
  208. });
  209. document.querySelectorAll(".text_mark2").forEach((item) => {
  210. item.style.left = (parseInt(item.style.left) / (old1 / new1)) + "px";
  211. item.style.top = (parseInt(item.style.top) / (old1 / new1)) + "px";
  212. item.style.height = 100 * new1 + "px";
  213. item.style.width = 100 * new1 + "px";
  214. });
  215. document.querySelectorAll(".text_mark3").forEach((item) => {
  216. item.style.left = (parseInt(item.style.left) / (old1 / new1)) + "px";
  217. item.style.top = (parseInt(item.style.top) / (old1 / new1)) + "px";
  218. item.style.height = 28 * new1 + "px";
  219. item.style.width = (item.offsetWidth) / (old1 / new1) + "px";
  220. });
  221. },
  222. role_id(now, before) {
  223. let str = '';
  224. if(now == '1'){
  225. str = '甲方'
  226. }else if(now == '2'){
  227. str = '乙方'
  228. }else if(now == '3'){
  229. str = '丙方'
  230. }
  231. document.querySelector(".choose2").setAttribute('role_id',this.role_id);
  232. document.querySelector(".choose2").childNodes[0].childNodes[1].childNodes[0].innerText = str;
  233. },
  234. seal_name(now,before) {
  235. document.querySelector(".choose2").childNodes[0].childNodes[1].childNodes[1].childNodes[1].innerText = now;
  236. },
  237. form_name(now, before) {
  238. document.querySelector(".choose").childNodes[0].childNodes[1].innerText = now;
  239. },
  240. form_value(now, before) {
  241. document.querySelector(".choose").childNodes[1].innerText = now;
  242. },
  243. form_need(now, before) {
  244. if(now){
  245. document.querySelector(".choose").childNodes[0].childNodes[0].style.display = "inline-block";
  246. }else {
  247. document.querySelector(".choose").childNodes[0].childNodes[0].style.display = "none";
  248. }
  249. },
  250. },
  251. methods: {
  252. goBack() {
  253. /**if (window.history.length <= 1) {
  254. this.$router.push(this.fun.getUrl('homeIndex', {}));
  255. } else {
  256. this.$router.go(-1);
  257. }*/
  258. window.history.back();
  259. },
  260. /**
  261. * px转换为mm
  262. * @param value
  263. * @returns {number}
  264. */
  265. pxConversionMm (value) {
  266. return value/2.8;
  267. },
  268. editText(type, pos_x, pos_y, dom) {
  269. if(dom) {
  270. this.pos_x = parseInt(pos_x)/this.scale;
  271. this.pos_y = parseInt(pos_y)/this.scale;
  272. this.pos_page = dom.getAttribute('page');
  273. this.textId = dom.getAttribute('textId');
  274. }
  275. let json = {};
  276. if(type == 1) {
  277. let is_require = 0;
  278. this.form_need ? is_require = 1 :is_require = 0;
  279. json = {
  280. id: this.textId,
  281. template_id: this.id,
  282. form_type: type,
  283. form_name: this.form_name,
  284. form_value: this.form_value,
  285. is_require: is_require,
  286. pos_x: this.pos_x,
  287. pos_y: this.pos_y,
  288. pdf_pos_x: this.pxConversionMm(this.pos_x),
  289. pdf_pos_y: this.pxConversionMm(this.pos_y),
  290. width: 190,
  291. height: 28,
  292. doc_page: this.pos_page
  293. };
  294. }else {
  295. json = {
  296. id: this.textId,
  297. template_id: this.id,
  298. form_type: type,
  299. form_name: this.seal_name,
  300. role_id: this.role_id,
  301. form_value: '',
  302. is_require: 0,
  303. pos_x: this.pos_x,
  304. pos_y: this.pos_y,
  305. width: 100,
  306. height: 100,
  307. doc_page: this.pos_page
  308. };
  309. }
  310. this.$http.post(document.getElementById("edit_form_url").value, json).then(response => {
  311. if (response.data.result === 1) {
  312. } else {
  313. this.$message.error(response.data.msg);
  314. }
  315. }).catch(err => {
  316. console.log(err);
  317. });
  318. },
  319. deleteText(dom) {
  320. this.textId = dom.getAttribute('textId');
  321. if(this.textId) {
  322. // 会引发鼠标抬起事件 延迟触发
  323. setTimeout(()=>{
  324. this.$http.post(document.getElementById("delete_form_url").value, {id: this.textId}).then(response => {
  325. if (response.data.result === 1) {
  326. } else {
  327. this.$message.error(response.data.msg);
  328. }
  329. }).catch(err => {
  330. console.log(err);
  331. });
  332. },500)
  333. }
  334. },
  335. setTemplate() {
  336. const that = this;
  337. console.log(this.commonStructsList)
  338. for (let i = 0; i < this.commonStructsList.length; i++) {
  339. if(that.commonStructsList[i].form_type == 1){
  340. let Element = document.querySelector(".componentArea").cloneNode(true);
  341. document.querySelector('#can'+ that.commonStructsList[i].doc_page).appendChild(Element);
  342. Element.style.left = that.commonStructsList[i].pos_x + "px";
  343. Element.style.top = that.commonStructsList[i].pos_y + "px";
  344. Element.style.width = that.commonStructsList[i].width + "px";
  345. Element.style.display = "flex";
  346. Element.classList.add("text_mark");
  347. Element.onmouseenter = that.TextMouseenter;
  348. Element.onmouseleave = that.TextMouseleave;
  349. Element.onclick = that.textClick;
  350. Element.onmousedown = that.moveTo;
  351. Element.setAttribute("page", that.commonStructsList[i].doc_page);
  352. Element.setAttribute('textId', that.commonStructsList[i].id);
  353. if(that.commonStructsList[i].is_require == 1){
  354. Element.childNodes[0].childNodes[0].style.display = "inline-block";
  355. }else {
  356. Element.childNodes[0].childNodes[0].style.display = "none";
  357. }
  358. Element.childNodes[0].childNodes[1].innerText = that.commonStructsList[i].form_name;
  359. Element.childNodes[1].innerText = that.commonStructsList[i].form_value;
  360. Element.childNodes[2].onblur = that.TextBlur;
  361. Element.childNodes[3].onclick = that.TextDeleteIt;
  362. Element.childNodes[4].onmousedown = that.TextWidthChange;
  363. } else if(that.commonStructsList[i].form_type == 2) {
  364. let Element = document.querySelector(".componentSign").cloneNode(true);
  365. document.querySelector('#can'+ that.commonStructsList[i].doc_page).appendChild(Element);
  366. Element.style.left = that.commonStructsList[i].pos_x + "px";
  367. Element.style.top = that.commonStructsList[i].pos_y + "px";
  368. Element.style.display = "flex";
  369. Element.classList.add("text_mark2");
  370. Element.onmouseenter = that.sealMouseenter;
  371. Element.onmouseleave = that.sealMouseleave;
  372. Element.onclick = that.sealClick;
  373. Element.onmousedown = that.sealMoveTo;
  374. Element.setAttribute("page", that.commonStructsList[i].doc_page);
  375. Element.setAttribute('textId', that.commonStructsList[i].id);
  376. Element.setAttribute('role_id',that.commonStructsList[i].role_id);
  377. Element.childNodes[0].childNodes[1].childNodes[1].childNodes[1].innerText = that.commonStructsList[i].form_name;
  378. if(that.commonStructsList[i].role_id == '1'){
  379. Element.childNodes[0].childNodes[1].childNodes[0].innerText = '甲方';
  380. }else if(that.commonStructsList[i].role_id == '2'){
  381. Element.childNodes[0].childNodes[1].childNodes[0].innerText = '乙方';
  382. }else if(that.commonStructsList[i].role_id == '3'){
  383. Element.childNodes[0].childNodes[1].childNodes[0].innerText = '丙方';
  384. }
  385. Element.childNodes[2].onclick = that.sealDeleteIt;
  386. }
  387. }
  388. let variable_data = [];
  389. if(this.Data.variable_data){
  390. variable_data = this.Data.variable_data;
  391. }
  392. console.log(variable_data)
  393. for (let i = 0; i < variable_data.length; i++) {
  394. if(variable_data[i].doc_page){
  395. let Element = document.querySelector(".variable-item").cloneNode(true);
  396. console.log(Element.childNodes);
  397. document.querySelector('#can'+ variable_data[i].doc_page).appendChild(Element);
  398. Element.style.left = variable_data[i].pos_x + "px";
  399. Element.style.top = variable_data[i].pos_y + "px";
  400. Element.style.position='absolute';
  401. Element.classList.add("text_mark3");
  402. Element.childNodes[0].innerText = variable_data[i].var_text;
  403. Element.childNodes[2].innerText = variable_data[i].var_text;
  404. Element.onmouseenter = that.VariableMouseenter;
  405. Element.onmouseleave = that.VariableMouseleave;
  406. Element.onmousedown = that.VariableMoveTo;
  407. Element.childNodes[1].onclick = that.TextDeleteIt;
  408. Element.setAttribute("page", variable_data[i].doc_page);
  409. Element.setAttribute("data-name", variable_data[i].var_name);
  410. }
  411. }
  412. },
  413. TextBlur(e) {
  414. e.currentTarget.value=e.currentTarget.value.replace(/\s+/g,'');
  415. if(e.currentTarget.parentNode.childNodes[0].childNodes[0].style.display == "inline-block" && e.currentTarget.value == '') {
  416. e.currentTarget.parentNode.classList.add("needFill");
  417. e.currentTarget.parentNode.childNodes[3].style.display = "flex";
  418. }else {
  419. e.currentTarget.parentNode.classList.remove("needFill");
  420. e.currentTarget.parentNode.childNodes[3].style.display = "none";
  421. }
  422. },
  423. submitForm() {
  424. let form_info = [];
  425. // 文本域
  426. document.querySelectorAll(".text_mark").forEach((item) => {
  427. let is_require = 0;
  428. if (item.childNodes[0].childNodes[0].style.display == 'none'){
  429. is_require = 0
  430. } else {
  431. is_require = 1
  432. }
  433. let json = {
  434. id: item.getAttribute('textId'),
  435. template_id: this.id,
  436. form_type: 1,
  437. form_name: item.childNodes[0].childNodes[1].innerText,
  438. form_value: item.childNodes[1].innerText,
  439. is_require: is_require,
  440. pos_x: parseInt(item.style.left)/this.scale,
  441. pos_y: parseInt(item.style.top)/this.scale,
  442. pdf_pos_x: this.pxConversionMm(parseInt(item.style.left)/this.scale),
  443. pdf_pos_y: this.pxConversionMm(parseInt(item.style.top)/this.scale),
  444. width: parseInt(item.offsetWidth)/this.scale,
  445. height: 28,
  446. doc_page: item.getAttribute("page")
  447. };
  448. form_info.push(json);
  449. });
  450. // 签署区
  451. document.querySelectorAll(".text_mark2").forEach((item) => {
  452. let json = {
  453. id: item.getAttribute('textId'),
  454. template_id: this.id,
  455. form_type: 2,
  456. form_name: item.childNodes[0].childNodes[1].childNodes[1].childNodes[1].innerText,
  457. role_id: item.getAttribute('role_id'),
  458. form_value: '',
  459. is_require: 0,
  460. pos_x: parseInt(item.style.left)/this.scale,
  461. pos_y: parseInt(item.style.top)/this.scale,
  462. width: 100,
  463. height: 100,
  464. doc_page: item.getAttribute("page")
  465. };
  466. form_info.push(json);
  467. });
  468. let variable_data = [];
  469. document.querySelectorAll(".text_mark3").forEach((item) => {
  470. let json = {
  471. var_name: item.getAttribute('data-name'),
  472. var_value: '',
  473. var_text:item.childNodes[0].innerText,
  474. pos_x: parseInt(item.style.left)/this.scale,
  475. pos_y: parseInt(item.style.top)/this.scale,
  476. pdf_pos_x: this.pxConversionMm(parseInt(item.style.left)/this.scale),
  477. pdf_pos_y: this.pxConversionMm(parseInt(item.style.top)/this.scale),
  478. doc_page: item.getAttribute("page")
  479. };
  480. if(json.doc_page){
  481. variable_data.push(json);
  482. }else{
  483. console.log(json);
  484. }
  485. });
  486. this.$http.post(document.getElementById("edit_step2_url").value, {id: this.id, pdfWidth: this.pdfWidth, pdfHeight: this.pdfHeight, form_info: form_info,variable_data: variable_data}).then(response => {
  487. if (response.data.result === 1) {
  488. window.location.href = document.getElementById("index_url").value;
  489. //this.$router.push(this.fun.getUrl("template_manage"));
  490. } else {
  491. this.$message.error(response.data.msg);
  492. }
  493. }).catch(err => {
  494. console.log(err);
  495. });
  496. },
  497. // 获取模版
  498. getData() {
  499. //this._loadFile("http://localhost:82/addons/yun_shop/static/yun-sign/template_wrapper.pdf");
  500. this.$http.post(document.getElementById("get_detail_url").value, {id: this.id}, "loading").then(response => {
  501. if (response.data.result === 1) {
  502. this.Data = response.data.data;
  503. this.pdfUrl = this.Data.contract_doc_remote_url;
  504. // this.pdfUrl = "/static/test.pdf";
  505. this._loadFile(this.pdfUrl);
  506. } else {
  507. // this.$router.go(-1);
  508. this.$message.error(response.msg);
  509. }
  510. }).catch(err => {
  511. console.log(err);
  512. });
  513. },
  514. // 获取模板所有文本域信息
  515. getTextData() {
  516. this.$http.post(document.getElementById("get_forms_url").value, {id: this.id}).then(response => {
  517. this.isShow = true;
  518. if (response.data.result === 1) {
  519. this.commonStructsList = response.data.data;
  520. this.setTemplate();
  521. } else {
  522. this.$message.error(response.msg);
  523. }
  524. }).catch(err => {
  525. this.isShow = true;
  526. console.log(err);
  527. });
  528. },
  529. getSidebarWidth(){
  530. let sidebarWidth = 0;
  531. let sidebarEle = document.querySelectorAll(".sidebar");
  532. sidebarWidth = sidebarEle[0].clientWidth + sidebarEle[1].clientWidth;
  533. return sidebarWidth;
  534. },
  535. signSeal(e) {
  536. let dom = document.querySelector(".componentSign").cloneNode(true);
  537. let sidebarWidth = this.getSidebarWidth();
  538. // dom.style.left = (this.getPos(e).x - 100 - sidebarWidth) + "px";
  539. // dom.style.top = (this.getPos(e).y - 65) + "px";
  540. // dom.className = "componentArea text_mark";
  541. document.onmousemove = e => {
  542. document.querySelector("#pageContent").appendChild(dom);
  543. let scrollTop = document.documentElement.scrollTop||document.body.scrollTop
  544. dom.style.display = 'flex';
  545. dom.style.left = (this.getPos(e).x - parseInt(dom.clientWidth / 2) - sidebarWidth) + "px";
  546. dom.style.top = (this.getPos(e).y - 100 + scrollTop) + "px";
  547. //console.log('top:'+dom.style.top+'left:'+dom.style.left)
  548. dom.className = "componentSign text_mark2";
  549. };
  550. // 鼠标抬开
  551. document.onmouseup = e => {
  552. let scrollTop = document.documentElement.scrollTop||document.body.scrollTop
  553. let left = (this.getPos(e).x + this.$refs.pdfBox.scrollLeft - parseInt(dom.clientWidth / 2) - document.querySelector(".pdf-box").offsetLeft - sidebarWidth);
  554. let top = (this.getPos(e).y + this.scrollTop - parseInt(dom.clientHeight / 2) - 160 + scrollTop);
  555. //限制区域
  556. if (left < 0) {
  557. document.onmousemove = null;
  558. document.onmouseup = null;
  559. document.querySelector("#pageContent").removeChild(dom);
  560. this.$message.error("请拖拽到合同区域");
  561. return;
  562. } else if (left > document.querySelector(".pdf-box").clientWidth - (100 * this.scale)) {
  563. document.onmousemove = null;
  564. document.onmouseup = null;
  565. document.querySelector("#pageContent").removeChild(dom);
  566. this.$message.error("控件位置超出了合同区域");
  567. return;
  568. }
  569. if (top < 0) {
  570. document.onmousemove = null;
  571. document.onmouseup = null;
  572. document.querySelector("#pageContent").removeChild(dom);
  573. this.$message.error("请拖拽到合同区域");
  574. return;
  575. } else if (top > document.querySelector(".pdf-box").clientHeight - (100 * this.scale)) {
  576. document.onmousemove = null;
  577. document.onmouseup = null;
  578. document.querySelector("#pageContent").removeChild(dom);
  579. this.$message.error("控件位置超出了合同区域");
  580. return;
  581. }
  582. let index = 0;
  583. if(top > this.pdfHeight*this.page_num){
  584. top = top - this.pdfHeight*this.page_num;
  585. index = this.page_num+1;
  586. }else {
  587. top = top - this.pdfHeight*(this.page_num-1);
  588. index = this.page_num;
  589. }
  590. // margin
  591. top = 10 + top - (index -1)*10;
  592. dom.style.left = left + "px";
  593. dom.style.top = top + "px";
  594. dom.style.height = 100 * this.scale + "px";
  595. dom.style.width = 100 * this.scale + "px";
  596. document.querySelector("#pageContent").removeChild(dom);
  597. document.querySelector('#can'+ index).appendChild(dom);
  598. document.onmousemove = null;
  599. document.onmouseup = null;
  600. dom.onclick = this.sealClick;
  601. dom.onmousedown = this.sealMoveTo;
  602. dom.onmouseenter = this.sealMouseenter;
  603. dom.onmouseleave = this.sealMouseleave;
  604. dom.childNodes[2].onclick = this.sealDeleteIt;
  605. dom.setAttribute("page", index);
  606. dom.setAttribute('role_id', 1);
  607. };
  608. },
  609. sealDeleteIt(e) {
  610. this.hasChoose2 = false;
  611. this.hasChoose = false;
  612. this.deleteText(e.currentTarget.parentNode);
  613. e.currentTarget.parentNode.parentNode.removeChild(e.currentTarget.parentNode);
  614. e.stopPropagation();
  615. e.preventDefault();
  616. return false;
  617. },
  618. sealClick(e) {
  619. this.$refs.input3.blur();
  620. const that = this;
  621. for (let i = 0; i < document.querySelectorAll('.text_mark').length; i++) {
  622. document.querySelectorAll(".text_mark")[i].childNodes[0].style.display = "none";
  623. document.querySelectorAll(".text_mark")[i].childNodes[3].style.display = "none";
  624. document.querySelectorAll(".text_mark")[i].onmouseleave = that.TextMouseleave;
  625. document.querySelectorAll(".text_mark")[i].classList.remove("choose");
  626. }
  627. for (let i = 0; i < document.querySelectorAll('.text_mark2').length; i++) {
  628. document.querySelectorAll(".text_mark2")[i].childNodes[0].style.display = "none";
  629. document.querySelectorAll(".text_mark2")[i].childNodes[2].style.display = "none";
  630. document.querySelectorAll(".text_mark2")[i].onmouseleave = that.sealMouseleave;
  631. document.querySelectorAll(".text_mark2")[i].classList.remove("choose2");
  632. }
  633. e.currentTarget.childNodes[0].style.display = "flex";
  634. e.currentTarget.childNodes[2].style.display = "block";
  635. e.currentTarget.classList.add("choose2");
  636. e.currentTarget.onmouseleave = null;
  637. this.seal_name = document.querySelector(".choose2").childNodes[0].childNodes[1].childNodes[1].childNodes[1].innerText;
  638. if(document.querySelector(".choose2").childNodes[0].childNodes[1].childNodes[0].innerText == '甲方'){
  639. this.role_id = '1';
  640. }else if(document.querySelector(".choose2").childNodes[0].childNodes[1].childNodes[0].innerText == '乙方'){
  641. this.role_id = '2';
  642. }else {
  643. this.role_id = '3';
  644. }
  645. this.hasChoose2 = true;
  646. this.hasChoose = false;
  647. if(key){
  648. // console.log('click');
  649. key = false;
  650. // this.editText(2, e.currentTarget.style.left, e.currentTarget.style.top, e.currentTarget);
  651. }
  652. e.stopPropagation();
  653. e.preventDefault();
  654. return false;
  655. },
  656. sealMouseenter(e) {
  657. e.currentTarget.childNodes[0].style.display = "flex";
  658. e.currentTarget.childNodes[2].style.display = "block";
  659. },
  660. sealMouseleave(e) {
  661. e.currentTarget.childNodes[0].style.display = "none";
  662. e.currentTarget.childNodes[2].style.display = "none";
  663. },
  664. sealMoveTo(e) {
  665. firstTime = new Date().getTime();
  666. // console.log('mouseDown');
  667. let that = this;
  668. let odiv = e.currentTarget; //获取目标元素
  669. //算出鼠标相对元素的位置
  670. let disX = e.clientX - odiv.offsetLeft;
  671. let disY = e.clientY - odiv.offsetTop;
  672. this.sealClick(e);
  673. document.onmousemove = e => {
  674. let left = e.clientX - disX;
  675. let top = e.clientY - disY;
  676. //限制区域
  677. if (left <= 0) {
  678. left = 0;
  679. } else if (left >= document.querySelector(".pdf-box").clientWidth - odiv.clientWidth) {
  680. left = document.querySelector(".pdf-box").clientWidth - odiv.clientWidth;
  681. }
  682. if (top <= 0) {
  683. top = 0;
  684. } else if (top >= this.pdfHeight - odiv.clientHeight) {
  685. top = this.pdfHeight - odiv.clientHeight;
  686. }
  687. //移动当前元素
  688. odiv.style.left = left + "px";
  689. odiv.style.top = top + "px";
  690. };
  691. document.onmouseup = e => {
  692. //鼠标抬起后 记录时间 超过400ms就是移动事件
  693. lastTime = new Date().getTime();
  694. if( (lastTime - firstTime) < 400){
  695. key = true;
  696. }else {
  697. // console.log('mouseUp');
  698. // that.editText(2, odiv.style.left, odiv.style.top, odiv);
  699. }
  700. document.onmousemove = null;
  701. document.onmouseup = null;
  702. };
  703. },
  704. clearAll() {
  705. const that = this;
  706. for (let i = 0; i < document.querySelectorAll('.text_mark').length; i++) {
  707. document.querySelectorAll(".text_mark")[i].childNodes[0].style.display = "none";
  708. document.querySelectorAll(".text_mark")[i].childNodes[3].style.display = "none";
  709. document.querySelectorAll(".text_mark")[i].childNodes[4].style.display = "none";
  710. document.querySelectorAll(".text_mark")[i].onmouseleave = that.TextMouseleave;
  711. document.querySelectorAll(".text_mark")[i].classList.remove("choose");
  712. }
  713. for (let i = 0; i < document.querySelectorAll('.text_mark2').length; i++) {
  714. document.querySelectorAll(".text_mark2")[i].childNodes[0].style.display = "none";
  715. document.querySelectorAll(".text_mark2")[i].childNodes[2].style.display = "none";
  716. document.querySelectorAll(".text_mark2")[i].onmouseleave = that.sealMouseleave;
  717. document.querySelectorAll(".text_mark2")[i].classList.remove("choose2");
  718. }
  719. this.hasChoose = false;
  720. this.hasChoose2 = false;
  721. },
  722. signVariable(e){
  723. let dom = e.currentTarget.cloneNode(true);
  724. //console.log(e.currentTarget.getAttribute('data-name'))
  725. let sidebarWidth = this.getSidebarWidth();
  726. //dom.style.left = (this.getPos(e).x - 100 - sidebarWidth) + "px";
  727. //dom.style.top = (this.getPos(e).y - 65) + "px";
  728. // dom.className = "componentArea text_mark";
  729. dom.classList.add("text_mark3");
  730. dom.style.position='absolute';
  731. document.onmousemove = e => {
  732. document.querySelector("#pageContent").appendChild(dom);
  733. // console.log('(this.getPos(e).x:'+this.getPos(e).x+'sidebarWidth:'+sidebarWidth)
  734. let scrollTop = document.documentElement.scrollTop||document.body.scrollTop
  735. dom.style.left = (this.getPos(e).x - parseInt(dom.clientWidth / 2) - sidebarWidth) + "px";
  736. dom.style.top = (this.getPos(e).y - 65 + scrollTop) + "px";
  737. // console.log('top:'+dom.style.top+'left:'+dom.style.left)
  738. dom.className = "variable-item text_mark3";
  739. };
  740. // 鼠标抬开
  741. document.onmouseup = e => {
  742. let scrollTop = document.documentElement.scrollTop||document.body.scrollTop
  743. let left = (this.getPos(e).x + this.$refs.pdfBox.scrollLeft - parseInt(dom.clientWidth / 2) - document.querySelector(".pdf-box").offsetLeft - sidebarWidth);
  744. let top = (this.getPos(e).y + this.scrollTop - parseInt(dom.clientHeight / 2) - 165 + scrollTop);
  745. //限制区域
  746. if (left < 0) {
  747. document.onmousemove = null;
  748. document.onmouseup = null;
  749. document.querySelector("#pageContent").removeChild(dom);
  750. this.$message.error("请拖拽到合同区域");
  751. return;
  752. } else if (left > document.querySelector(".pdf-box").clientWidth - (dom.clientWidth * this.scale)) {
  753. document.onmousemove = null;
  754. document.onmouseup = null;
  755. document.querySelector("#pageContent").removeChild(dom);
  756. this.$message.error("控件位置超出了合同区域");
  757. return;
  758. }
  759. if (top < 0) {
  760. document.onmousemove = null;
  761. document.onmouseup = null;
  762. document.querySelector("#pageContent").removeChild(dom);
  763. this.$message.error("请拖拽到合同区域");
  764. return;
  765. } else if (top > document.querySelector(".pdf-box").clientHeight - (28 * this.scale)) {
  766. document.onmousemove = null;
  767. document.onmouseup = null;
  768. document.querySelector("#pageContent").removeChild(dom);
  769. this.$message.error("控件位置超出了合同区域");
  770. return;
  771. }
  772. let index = 0;
  773. if(top > this.pdfHeight*this.page_num){
  774. top = top - this.pdfHeight*this.page_num;
  775. index = this.page_num+1;
  776. }else {
  777. top = top - this.pdfHeight*(this.page_num-1);
  778. index = this.page_num;
  779. }
  780. // margin
  781. top = 10 + top - (index -1)*10;
  782. dom.style.left = left + "px";
  783. dom.style.top = top + "px";
  784. dom.style.height = 28 * this.scale + "px";
  785. dom.style.width = dom.clientWidth * this.scale + "px";
  786. document.querySelector("#pageContent").removeChild(dom);
  787. document.querySelector('#can'+ index).appendChild(dom);
  788. document.onmousemove = null;
  789. document.onmouseup = null;
  790. //dom.childNodes[1].innerText = '文本';
  791. //dom.onclick = this.textClick;
  792. dom.onmousedown = this.VariableMoveTo;
  793. dom.onmouseenter = this.VariableMouseenter;
  794. dom.onmouseleave = this.VariableMouseleave;
  795. dom.childNodes[1].onclick = this.TextDeleteIt;
  796. dom.setAttribute("page", index);
  797. }
  798. },
  799. VariableDeleteIt(e) {
  800. //console.log('VariableDeleteIt');
  801. //this.hasChoose2 = false;
  802. //this.hasChoose = false;
  803. //this.deleteText(e.currentTarget.parentNode);
  804. e.currentTarget.parentNode.parentNode.removeChild(e.currentTarget.parentNode);
  805. e.stopPropagation();
  806. e.preventDefault();
  807. return false;
  808. },
  809. VariableMouseenter(e) {
  810. //e.currentTarget.childNodes[0].style.display = "flex";
  811. //console.log(e.currentTarget.childNodes);
  812. e.currentTarget.childNodes[1].style.display = "block";
  813. },
  814. VariableMouseleave(e) {
  815. e.currentTarget.childNodes[1].style.display = "none";
  816. // e.currentTarget.childNodes[2].style.display = "none";
  817. },
  818. VariableMoveTo(e) {
  819. firstTime = new Date().getTime();
  820. // console.log('mouseDown');
  821. let that = this;
  822. let odiv = e.currentTarget; //获取目标元素
  823. //算出鼠标相对元素的位置
  824. let disX = e.clientX - odiv.offsetLeft;
  825. let disY = e.clientY - odiv.offsetTop;
  826. //this.sealClick(e);
  827. document.onmousemove = e => {
  828. let left = e.clientX - disX;
  829. let top = e.clientY - disY;
  830. //限制区域
  831. if (left <= 0) {
  832. left = 0;
  833. } else if (left >= document.querySelector(".pdf-box").clientWidth - odiv.clientWidth) {
  834. left = document.querySelector(".pdf-box").clientWidth - odiv.clientWidth;
  835. }
  836. if (top <= 0) {
  837. top = 0;
  838. } else if (top >= this.pdfHeight - odiv.clientHeight) {
  839. top = this.pdfHeight - odiv.clientHeight;
  840. }
  841. //移动当前元素
  842. odiv.style.left = left + "px";
  843. odiv.style.top = top + "px";
  844. };
  845. document.onmouseup = e => {
  846. //鼠标抬起后 记录时间 超过400ms就是移动事件
  847. lastTime = new Date().getTime();
  848. if( (lastTime - firstTime) < 400){
  849. key = true;
  850. }else {
  851. // console.log('mouseUp');
  852. // that.editText(2, odiv.style.left, odiv.style.top, odiv);
  853. }
  854. document.onmousemove = null;
  855. document.onmouseup = null;
  856. };
  857. },
  858. signText(e) {
  859. let dom = e.currentTarget.cloneNode(true);
  860. let sidebarWidth = 0;
  861. if (document.querySelector("#app").clientWidth > 1026) {
  862. sidebarWidth = document.querySelector(".el-scrollbar__view").clientWidth;
  863. }
  864. // dom.style.left = (this.getPos(e).x - 100 - sidebarWidth) + "px";
  865. // dom.style.top = (this.getPos(e).y - 65) + "px";
  866. // dom.className = "componentArea text_mark";
  867. document.onmousemove = e => {
  868. document.querySelector("#pageContent").appendChild(dom);
  869. dom.style.left = (this.getPos(e).x - parseInt(dom.clientWidth / 2) - sidebarWidth) + "px";
  870. dom.style.top = (this.getPos(e).y - 65) + "px";
  871. dom.className = "componentArea text_mark";
  872. };
  873. // 鼠标抬开
  874. document.onmouseup = e => {
  875. let left = (this.getPos(e).x + this.$refs.pdfBox.scrollLeft - parseInt(dom.clientWidth / 2) - document.querySelector(".pdf-box").offsetLeft - sidebarWidth);
  876. let top = (this.getPos(e).y + this.scrollTop - parseInt(dom.clientHeight / 2) - 112);
  877. //限制区域
  878. if (left < 0) {
  879. document.onmousemove = null;
  880. document.onmouseup = null;
  881. document.querySelector("#pageContent").removeChild(dom);
  882. this.$message.error("请拖拽到合同区域");
  883. return;
  884. } else if (left > document.querySelector(".pdf-box").clientWidth - (dom.clientWidth * this.scale)) {
  885. document.onmousemove = null;
  886. document.onmouseup = null;
  887. document.querySelector("#pageContent").removeChild(dom);
  888. this.$message.error("控件位置超出了合同区域");
  889. return;
  890. }
  891. if (top < 0) {
  892. document.onmousemove = null;
  893. document.onmouseup = null;
  894. document.querySelector("#pageContent").removeChild(dom);
  895. this.$message.error("请拖拽到合同区域");
  896. return;
  897. } else if (top > document.querySelector(".pdf-box").clientHeight - (28 * this.scale)) {
  898. document.onmousemove = null;
  899. document.onmouseup = null;
  900. document.querySelector("#pageContent").removeChild(dom);
  901. this.$message.error("控件位置超出了合同区域");
  902. return;
  903. }
  904. let index = 0;
  905. if(top > this.pdfHeight*this.page_num){
  906. top = top - this.pdfHeight*this.page_num;
  907. index = this.page_num+1;
  908. }else {
  909. top = top - this.pdfHeight*(this.page_num-1);
  910. index = this.page_num;
  911. }
  912. // margin
  913. top = 10 + top - (index -1)*10;
  914. dom.style.left = left + "px";
  915. dom.style.top = top + "px";
  916. dom.style.height = 28 * this.scale + "px";
  917. dom.style.width = dom.clientWidth * this.scale + "px";
  918. document.querySelector("#pageContent").removeChild(dom);
  919. document.querySelector('#can'+ index).appendChild(dom);
  920. document.onmousemove = null;
  921. document.onmouseup = null;
  922. dom.childNodes[1].innerText = '文本';
  923. dom.onclick = this.textClick;
  924. dom.onmousedown = this.moveTo;
  925. dom.onmouseenter = this.TextMouseenter;
  926. dom.onmouseleave = this.TextMouseleave;
  927. dom.childNodes[3].onclick = this.TextDeleteIt;
  928. dom.childNodes[4].onmousedown = this.TextWidthChange;
  929. dom.setAttribute("page", index);
  930. };
  931. },
  932. TextWidthChange(e) {
  933. let odivParent = e.currentTarget.parentNode; //获取目标父元素
  934. let dx= e.clientX;//当你第一次单击的时候,存储x轴的坐标。
  935. let dw= odivParent.offsetWidth;//存储默认的div的宽度。
  936. document.onmousemove = e => {
  937. odivParent.style.width=dw+(e.clientX-dx)+'px';
  938. if(odivParent.offsetWidth <= 100){//当盒子缩小到一定范围内的时候,让他保持一个固定值,不再继续改变
  939. odivParent.style.width='100px';
  940. }
  941. if(odivParent.offsetWidth + odivParent.offsetLeft >= this.pdfWidth){
  942. odivParent.style.width = this.pdfWidth - odivParent.offsetLeft + 'px';
  943. }
  944. };
  945. document.onmouseup = e => {
  946. document.onmousemove = null;
  947. document.onmouseup = null;
  948. };
  949. e.stopPropagation();
  950. e.preventDefault();
  951. return false;
  952. },
  953. TextDeleteIt(e) {
  954. this.hasChoose2 = false;
  955. this.hasChoose = false;
  956. this.deleteText(e.currentTarget.parentNode);
  957. e.currentTarget.parentNode.parentNode.removeChild(e.currentTarget.parentNode);
  958. e.stopPropagation();
  959. e.preventDefault();
  960. return false;
  961. },
  962. textClick(e) {
  963. this.$refs.input1.blur();
  964. this.$refs.input2.blur();
  965. const that = this;
  966. for (let i = 0; i < document.querySelectorAll('.text_mark').length; i++) {
  967. document.querySelectorAll(".text_mark")[i].childNodes[0].style.display = "none";
  968. document.querySelectorAll(".text_mark")[i].childNodes[3].style.display = "none";
  969. document.querySelectorAll(".text_mark")[i].childNodes[4].style.display = "none";
  970. document.querySelectorAll(".text_mark")[i].onmouseleave = that.TextMouseleave;
  971. document.querySelectorAll(".text_mark")[i].classList.remove("choose");
  972. }
  973. for (let i = 0; i < document.querySelectorAll('.text_mark2').length; i++) {
  974. document.querySelectorAll(".text_mark2")[i].childNodes[0].style.display = "none";
  975. document.querySelectorAll(".text_mark2")[i].childNodes[2].style.display = "none";
  976. document.querySelectorAll(".text_mark2")[i].onmouseleave = that.sealMouseleave;
  977. document.querySelectorAll(".text_mark2")[i].classList.remove("choose2");
  978. }
  979. e.currentTarget.childNodes[0].style.display = "flex";
  980. e.currentTarget.childNodes[3].style.display = "block";
  981. e.currentTarget.childNodes[4].style.display = "block";
  982. e.currentTarget.classList.add("choose");
  983. e.currentTarget.onmouseleave = null;
  984. this.form_name = document.querySelector(".choose").childNodes[0].childNodes[1].innerText;
  985. this.form_value = document.querySelector(".choose").childNodes[1].innerText;
  986. if (document.querySelector(".choose").childNodes[0].childNodes[0].style.display == 'none'){
  987. this.form_need = false
  988. } else {
  989. this.form_need = true
  990. }
  991. this.hasChoose = true;
  992. this.hasChoose2 = false;
  993. if(key){
  994. // console.log('click');
  995. key = false;
  996. // this.editText(1, e.currentTarget.style.left, e.currentTarget.style.top, e.currentTarget);
  997. }
  998. e.stopPropagation();
  999. e.preventDefault();
  1000. return false;
  1001. },
  1002. TextMouseenter(e) {
  1003. e.currentTarget.childNodes[0].style.display = "flex";
  1004. e.currentTarget.childNodes[3].style.display = "block";
  1005. },
  1006. TextMouseleave(e) {
  1007. e.currentTarget.childNodes[0].style.display = "none";
  1008. e.currentTarget.childNodes[3].style.display = "none";
  1009. },
  1010. moveTo(e) {
  1011. firstTime = new Date().getTime();
  1012. // console.log('mouseDown');
  1013. let that = this;
  1014. let odiv = e.currentTarget; //获取目标元素
  1015. //算出鼠标相对元素的位置
  1016. let disX = e.clientX - odiv.offsetLeft;
  1017. let disY = e.clientY - odiv.offsetTop;
  1018. this.textClick(e);
  1019. document.onmousemove = e => {
  1020. let left = e.clientX - disX;
  1021. let top = e.clientY - disY;
  1022. //限制区域
  1023. if (left <= 0) {
  1024. left = 0;
  1025. } else if (left >= document.querySelector(".pdf-box").clientWidth - odiv.clientWidth) {
  1026. left = document.querySelector(".pdf-box").clientWidth - odiv.clientWidth;
  1027. }
  1028. if (top <= 0) {
  1029. top = 0;
  1030. } else if (top >= this.pdfHeight - odiv.clientHeight) {
  1031. top = this.pdfHeight - odiv.clientHeight;
  1032. }
  1033. //移动当前元素
  1034. odiv.style.left = left + "px";
  1035. odiv.style.top = top + "px";
  1036. };
  1037. document.onmouseup = e => {
  1038. //鼠标抬起后 记录时间 超过400ms就是移动事件
  1039. lastTime = new Date().getTime();
  1040. if( (lastTime - firstTime) < 400){
  1041. key = true;
  1042. }else {
  1043. // console.log('mouseUp');
  1044. // that.editText(1, odiv.style.left, odiv.style.top, odiv);
  1045. }
  1046. document.onmousemove = null;
  1047. document.onmouseup = null;
  1048. };
  1049. },
  1050. getPos(ev) {
  1051. return { x: ev.clientX, y: ev.clientY };
  1052. },
  1053. toGetReal() {
  1054. this.$router.push({
  1055. path: "/accredited_institution",
  1056. query: { productId: this.$route.query.productId, order_sn: this.$route.query.order_sn }
  1057. });
  1058. },
  1059. // tab点击事件
  1060. handleClick(tab, event) {
  1061. // console.log(this.activeName,"activeName")
  1062. },
  1063. handleChange(val) {
  1064. this.scale = val;
  1065. this.queueRenderPage(this.pageNum);
  1066. },
  1067. handleScroll(el) {
  1068. this.scrollTop = this.$refs.pdfBox.scrollTop;
  1069. let _pdfs = document.querySelectorAll(".pdfPage_1yRne");
  1070. let arr = [];
  1071. _pdfs.forEach((item, index) => {
  1072. if (this.scrollTop >= item.offsetTop) {
  1073. arr.push(index);
  1074. }
  1075. });
  1076. this.page_num = Math.max.apply(null, arr) + 1;
  1077. },
  1078. jump() {
  1079. let that = this;
  1080. let index = this.page_num - 1;
  1081. if (index > this.page_count) {
  1082. this.$message.error("请输入有效范围内的数字");
  1083. return;
  1084. }
  1085. // 用 class="pdfPage_1yRne" 添加锚点
  1086. let jump = document.querySelectorAll(".pdfPage_1yRne");
  1087. let total = jump[index].offsetTop;
  1088. // console.log('纵坐标', total)
  1089. let distance = this.scrollTop;
  1090. //平滑滚动,时长500ms,每10ms一跳,共50跳
  1091. let step = total / 30 >> 0;
  1092. if (total > distance) {
  1093. smoothDown();
  1094. } else {
  1095. let newTotal = distance - total;
  1096. step = newTotal / 30 >> 0;
  1097. smoothUp();
  1098. }
  1099. function smoothDown() {
  1100. if (distance < total) {
  1101. distance += step;
  1102. that.$refs.pdfBox.scrollTop = distance;
  1103. setTimeout(smoothDown, 10);
  1104. } else {
  1105. that.$refs.pdfBox.scrollTop = total;
  1106. }
  1107. }
  1108. function smoothUp() {
  1109. if (distance > total) {
  1110. distance -= step;
  1111. that.$refs.pdfBox.scrollTop = distance;
  1112. setTimeout(smoothUp, 10);
  1113. } else {
  1114. that.$refs.pdfBox.scrollTop = total;
  1115. }
  1116. }
  1117. },
  1118. _renderPage(num) {
  1119. this.pdfDoc.getPage(num).then((page) => {
  1120. let canvas = document.getElementById("the-canvas" + num);
  1121. let ctx = canvas.getContext("2d");
  1122. let viewport = page.getViewport(this.scale);
  1123. // alert(vm.canvas.height)
  1124. this.pdfHeight = canvas.height = viewport.height;
  1125. this.pdfWidth = canvas.width = viewport.width;
  1126. // Render PDF page into canvas context
  1127. let renderContext = {
  1128. canvasContext: ctx,
  1129. viewport: viewport
  1130. };
  1131. page.render(renderContext);
  1132. if (this.page_count > num) {
  1133. this._renderPage(num + 1);
  1134. }
  1135. });
  1136. this.page_num = this.pageNum;
  1137. },
  1138. _loadFile(url) {
  1139. const CMAP_URL = 'https://cdn.jsdelivr.net/npm/pdfjs-dist@2.0.943/cmaps/';
  1140. pdfjsLib.getDocument({url:url,cMapUrl: CMAP_URL,cMapPacked: true}).then((pdf) => {
  1141. this.pdfDoc = pdf;
  1142. this.page_count = this.pdfDoc.numPages;
  1143. this.$nextTick(() => {
  1144. this._renderPage(1);
  1145. this.getTextData();
  1146. });
  1147. this.pageNum = 1;
  1148. });
  1149. },
  1150. queueRenderPage(num) {
  1151. this._renderPage(num);
  1152. },
  1153. downpdf() {//下载pdf
  1154. window.open(this.pdfUrl);
  1155. }
  1156. }
  1157. })
  1158. function formcheck(){
  1159. }
  1160. </script>
  1161. <style>
  1162. @charset "UTF-8";
  1163. .pageContent_2lAGg {
  1164. display: flex;
  1165. /*max-width: 1200px;*/
  1166. height: 93vh;
  1167. /*margin: 10px auto 0 auto;*/
  1168. user-select: none;
  1169. /*firefox浏览器*/
  1170. -moz-user-select: none;
  1171. /*safari、chrome浏览器*/
  1172. -webkit-user-select: none;
  1173. /*Safari中不支持该属性值,只能使用none或者text,或者是在html的标签属性中使用*/
  1174. }
  1175. .pageContent_2lAGg .sign-img {
  1176. position: absolute;
  1177. cursor: move;
  1178. z-index: 7;
  1179. background-repeat: no-repeat;
  1180. background-size: cover;
  1181. background-image: url("https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1584116150977&di=8c196ff505f980e30039a8794ead2dad&imgtype=0&src=http%3A%2F%2Fbpic.588ku.com%2Felement_origin_min_pic%2F20%2F16%2F01%2F3156adf74e970a9.jpg");
  1182. }
  1183. .pageContent_2lAGg .componentSign {
  1184. display: none;
  1185. flex-direction: row;
  1186. justify-content: space-between;
  1187. align-items: center;
  1188. width: 100px;
  1189. height: 100px;
  1190. padding: 0 10px;
  1191. border: 1px dashed rgba(0, 0, 0, 0.3);
  1192. background: rgba(255, 255, 255, 0.85);
  1193. font-size: 12px;
  1194. cursor: grab;
  1195. position: absolute;
  1196. top: 95px;
  1197. left: 56px;
  1198. }
  1199. .pageContent_2lAGg .sealCompInfo_3v9iQ {
  1200. min-width: 100%;
  1201. line-height: 1;
  1202. position: absolute;
  1203. height: 20px;
  1204. top: -21px;
  1205. left: -1px;
  1206. padding: 4px 8px;
  1207. white-space: nowrap;
  1208. text-align: center;
  1209. cursor: grab;
  1210. color: #fff;
  1211. font-size: 12px;
  1212. background: rgba(92, 162, 232, 0.6);
  1213. z-index: 10;
  1214. display: none;
  1215. }
  1216. .pageContent_2lAGg .sealCompInfo_3v9iQ .need {
  1217. font-size: 16px;
  1218. margin-top: 2px;
  1219. margin-right: 4px;
  1220. display: inline-block;
  1221. }
  1222. .pageContent_2lAGg .itemConentStyle_2MWEL {
  1223. position: absolute;
  1224. top: 0;
  1225. left: 0;
  1226. bottom: 0;
  1227. right: 0;
  1228. }
  1229. .pageContent_2lAGg .infoMsg_3NkPg {
  1230. position: absolute;
  1231. top: 41px;
  1232. width: 100%;
  1233. text-align: center;
  1234. }
  1235. .pageContent_2lAGg .componentSign-show {
  1236. display: flex;
  1237. flex-direction: row;
  1238. justify-content: space-between;
  1239. align-items: center;
  1240. width: 190px;
  1241. height: 28px;
  1242. padding: 0 10px;
  1243. border: 1px dashed rgba(0, 0, 0, 0.3);
  1244. background: rgba(255, 255, 255, 0.85);
  1245. font-size: 12px;
  1246. cursor: grab;
  1247. position: absolute;
  1248. top: 55px;
  1249. left: 12px;
  1250. }
  1251. .pageContent_2lAGg .componentSign-show p {
  1252. margin: 0;
  1253. }
  1254. .pageContent_2lAGg .componentVariable-text {
  1255. font-size: 12px;
  1256. cursor: grab;
  1257. position: absolute;
  1258. top: 95px;
  1259. left: 12px;
  1260. }
  1261. .pageContent_2lAGg .componentVariable-text .title_3vpva{
  1262. padding-left:0;
  1263. margin-bottom:0;
  1264. }
  1265. .pageContent_2lAGg .componentVariable-text .tips_2oKGU{
  1266. margin-left:0;
  1267. }
  1268. .pageContent_2lAGg .componentVariable {
  1269. padding: 0;
  1270. font-size: 12px;
  1271. margin-top: 100px;
  1272. display: flex;
  1273. flex-wrap: wrap;
  1274. justify-content: space-between;
  1275. }
  1276. .pageContent_2lAGg .variable-item{
  1277. cursor: pointer;
  1278. width:92px;
  1279. height:28px;
  1280. line-height:28px;
  1281. text-align:center;
  1282. border: 1px dashed rgba(0, 0, 0, 0.3);
  1283. background: rgba(255, 255, 255, 0.85);
  1284. cursor: grab;
  1285. /* margin-left:10px; */
  1286. margin-bottom:10px;
  1287. position:relative;
  1288. display:inline-block;
  1289. font-size:12px;
  1290. }
  1291. .pageContent_2lAGg .variable-item p {
  1292. overflow: hidden;
  1293. text-overflow:ellipsis;
  1294. white-space: nowrap;
  1295. }
  1296. .pageContent_2lAGg .variable-item .sealCompInfo_text {
  1297. display: none;
  1298. }
  1299. .pageContent_2lAGg .text_mark3{
  1300. display: flex;
  1301. }
  1302. .pageContent_2lAGg .text_mark3 p {
  1303. width: 100%;
  1304. text-align: center;
  1305. align-self: center;
  1306. justify-items: center;
  1307. margin: 0;
  1308. overflow: hidden;
  1309. text-overflow:ellipsis;
  1310. white-space: nowrap;
  1311. }
  1312. .pageContent_2lAGg .text_mark3 .sealCompInfo_text {
  1313. position: absolute;
  1314. line-height: 1;
  1315. left: -2px;
  1316. text-align: left;
  1317. top: -22px;
  1318. min-width: 100%;
  1319. height: 20px;
  1320. padding: 4px 8px;
  1321. white-space: nowrap;
  1322. cursor: grab;
  1323. color: #fff;
  1324. font-size: 12px;
  1325. background: rgba(92, 162, 232, 0.6);
  1326. z-index: 10;
  1327. display: block;
  1328. }
  1329. .pageContent_2lAGg .variable_delete {
  1330. width: 100%;
  1331. line-height: 18px;
  1332. position: absolute;
  1333. bottom: -18px;
  1334. left: 0;
  1335. text-align: center;
  1336. color: #fff;
  1337. padding: 1px 0;
  1338. font-size: 12px;
  1339. background-color: rgba(10, 10, 10, 0.6);
  1340. cursor: pointer;
  1341. display: none;
  1342. }
  1343. .pageContent_2lAGg .delete {
  1344. width: 100%;
  1345. position: absolute;
  1346. bottom: -15px;
  1347. text-align: center;
  1348. color: #fff;
  1349. font-size: 15px;
  1350. background-color: rgba(10, 10, 10, 0.6);
  1351. cursor: pointer;
  1352. display: none;
  1353. }
  1354. .pageContent_2lAGg .componentArea {
  1355. display: flex;
  1356. flex-direction: row;
  1357. justify-content: space-between;
  1358. align-items: center;
  1359. width: 190px;
  1360. height: 28px;
  1361. padding: 0 10px;
  1362. border: 1px dashed rgba(0, 0, 0, 0.3);
  1363. background: rgba(255, 255, 255, 0.85);
  1364. font-size: 12px;
  1365. cursor: grab;
  1366. position: absolute;
  1367. top: 55px;
  1368. left: 12px;
  1369. }
  1370. .pageContent_2lAGg .itemConentStyle {
  1371. position: absolute;
  1372. height: 20px;
  1373. top: -21px;
  1374. left: -1px;
  1375. padding: 4px 8px;
  1376. white-space: nowrap;
  1377. text-align: center;
  1378. cursor: grab;
  1379. color: #fff;
  1380. font-size: 12px;
  1381. background: rgba(92, 162, 232, 0.6);
  1382. z-index: 10;
  1383. display: none;
  1384. }
  1385. .pageContent_2lAGg .itemConentStyle .need {
  1386. font-size: 16px;
  1387. margin-top: 2px;
  1388. margin-right: 4px;
  1389. display: inline-block;
  1390. }
  1391. .pageContent_2lAGg .text_delete {
  1392. width: 100%;
  1393. line-height: 16px;
  1394. position: absolute;
  1395. bottom: -22px;
  1396. left: 0;
  1397. text-align: center;
  1398. color: #fff;
  1399. padding: 3px 0;
  1400. font-size: 12px;
  1401. background-color: rgba(10, 10, 10, 0.6);
  1402. cursor: pointer;
  1403. display: none;
  1404. }
  1405. .pageContent_2lAGg .move-icon {
  1406. display: none;
  1407. position: absolute;
  1408. top: 50%;
  1409. right: -8px;
  1410. z-index: 10;
  1411. width: 14px;
  1412. height: 14px;
  1413. margin-top: -7px;
  1414. cursor: col-resize;
  1415. }
  1416. .pageContent_2lAGg .move-icon img {
  1417. width: 100%;
  1418. height: 100%;
  1419. }
  1420. .pageContent_2lAGg .icon-pm_auction_success {
  1421. color: #409EFF;
  1422. display: none;
  1423. }
  1424. .pageContent_2lAGg .choose {
  1425. border: 1px solid #409EFF;
  1426. }
  1427. .pageContent_2lAGg .choose .icon-pm_auction_success {
  1428. display: inline-block;
  1429. }
  1430. .pageContent_2lAGg .choose2 {
  1431. border: 1px solid #409EFF;
  1432. }
  1433. .pageContent_2lAGg .choose2 .icon-pm_auction_success {
  1434. display: inline-block;
  1435. position: absolute;
  1436. right: 0;
  1437. }
  1438. .leftContent_2NoKi {
  1439. display: flex;
  1440. flex-direction: column;
  1441. flex: 0 0 240px;
  1442. width: 240px;
  1443. height: 100%;
  1444. }
  1445. .leftContent_2NoKi .doc-list-title {
  1446. font-size: 14px;
  1447. font-weight: 800;
  1448. color: #333;
  1449. line-height: 40px;
  1450. height: 40px;
  1451. width: 100%;
  1452. border-bottom: 1px solid #eaeaea;
  1453. }
  1454. .leftContent_2NoKi .doc-list-title span {
  1455. color: #777;
  1456. font-size: 12px;
  1457. line-height: 40px;
  1458. font-weight: normal;
  1459. }
  1460. .leftContent_2NoKi .doc-list-context {
  1461. height: 100%;
  1462. width: 240px;
  1463. display: inline-block;
  1464. padding: 0 15px;
  1465. }
  1466. .leftContent_2NoKi .doc-list {
  1467. overflow-y: auto;
  1468. width: 100%;
  1469. height: calc(100% - 51px);
  1470. padding-top: 10px;
  1471. }
  1472. .leftContent_2NoKi .doc-list::-webkit-scrollbar {
  1473. display: none;
  1474. }
  1475. .leftContent_2NoKi .doc-item {
  1476. margin: 0;
  1477. padding: 20px 45px 0 45px;
  1478. cursor: pointer;
  1479. }
  1480. .leftContent_2NoKi .doc-img {
  1481. border: 1px solid #333;
  1482. position: relative;
  1483. width: 121px;
  1484. height: 161px;
  1485. margin-bottom: 5px;
  1486. }
  1487. .leftContent_2NoKi .doc-img img {
  1488. width: 100%;
  1489. height: 100%;
  1490. }
  1491. .leftContent_2NoKi .doc-page-num {
  1492. z-index: 100;
  1493. position: absolute;
  1494. bottom: 0;
  1495. right: 0;
  1496. width: 20px;
  1497. height: 20px;
  1498. line-height: 20px;
  1499. font-size: 12px;
  1500. text-align: center;
  1501. background-color: #333333;
  1502. color: #fff;
  1503. }
  1504. .leftContent_2NoKi .doc-name {
  1505. color: #333;
  1506. font-size: 12px;
  1507. line-height: 20px;
  1508. word-break: break-all;
  1509. }
  1510. .leftContent_2NoKi .componentsList_1OIrB {
  1511. display: flex;
  1512. flex-direction: column;
  1513. align-items: flex-start;
  1514. width: 100%;
  1515. margin-top: 50px;
  1516. position: relative;
  1517. }
  1518. .leftContent_2NoKi .title_3vpva {
  1519. font-size: 14px;
  1520. font-weight: 500;
  1521. line-height: 22px;
  1522. padding-left: 16px;
  1523. margin-bottom: 4px;
  1524. }
  1525. .leftContent_2NoKi .tips_2oKGU {
  1526. margin: 0 14px;
  1527. font-size: 12px;
  1528. line-height: 20px;
  1529. color: #999;
  1530. vertical-align: baseline;
  1531. }
  1532. .pdfContent_1PW2f {
  1533. flex: 1;
  1534. display: flex;
  1535. flex-direction: column;
  1536. height: 100%;
  1537. overflow: auto;
  1538. background: #f5f5f5;
  1539. }
  1540. .pdfContent_1PW2f .pdf-header {
  1541. /*position: fixed;*/
  1542. top: 55px;
  1543. left: 240px;
  1544. right: 240px;
  1545. height: 40px;
  1546. border-bottom: 1px solid #eee;
  1547. background-color: #fff;
  1548. z-index: 100;
  1549. text-align: center;
  1550. display: flex;
  1551. }
  1552. .pdfContent_1PW2f .pdf-header .block {
  1553. flex: 1;
  1554. display: flex;
  1555. }
  1556. .pdfContent_1PW2f .pdf-header .block .demonstration, .pdfContent_1PW2f .pdf-header .block .slider {
  1557. flex: 0 0 150px;
  1558. line-height: 40px;
  1559. width: 150px;
  1560. text-align: right;
  1561. }
  1562. .pdfContent_1PW2f .pdf-header .block .demonstration {
  1563. flex: 1;
  1564. margin-right: 20px;
  1565. }
  1566. .pdfContent_1PW2f .pdf-header .input {
  1567. flex: 1;
  1568. text-align: left;
  1569. line-height: 40px;
  1570. margin-left: 20px;
  1571. }
  1572. .pdfContent_1PW2f .pdf-header .input .input-text {
  1573. border: none;
  1574. outline: none;
  1575. border-bottom: 1px solid #e4e7ed;
  1576. margin-left: 10px;
  1577. height: 25px;
  1578. width: 25px;
  1579. text-align: center;
  1580. }
  1581. .pdfContent_1PW2f .pdf-container {
  1582. display: inline-block;
  1583. overflow: auto;
  1584. height: 100%;
  1585. width: 100%;
  1586. }
  1587. .pdfContent_1PW2f .pdf-container .pdf-box {
  1588. position: relative;
  1589. overflow: auto;
  1590. margin: 0 auto;
  1591. }
  1592. .pdfContent_1PW2f .pdf-container .pdf-box .sign-img {
  1593. z-index: 4;
  1594. }
  1595. .pdfContent_1PW2f .pdfPage_1yRne {
  1596. position: relative;
  1597. margin: 10px 0;
  1598. }
  1599. .pdfContent_1PW2f .dragLayer_3ccsq {
  1600. position: absolute;
  1601. left: 0;
  1602. top: 0;
  1603. right: 0;
  1604. bottom: 0;
  1605. }
  1606. .taskInfoArea_3ThxW {
  1607. display: flex;
  1608. flex-direction: column;
  1609. flex: 0 0 240px;
  1610. width: 240px;
  1611. height: 100%;
  1612. }
  1613. .taskInfoArea_3ThxW .tab-bar {
  1614. width: 100%;
  1615. padding: 0 15px;
  1616. height: 40px;
  1617. font-size: 14px;
  1618. line-height: 38px;
  1619. display: flex;
  1620. border-bottom: 1px solid #eaeaea;
  1621. color: #999;
  1622. overflow: hidden;
  1623. justify-content: space-around;
  1624. }
  1625. .taskInfoArea_3ThxW .tab-context {
  1626. padding: 0 15px;
  1627. height: calc(100% - 51px);
  1628. overflow-y: auto;
  1629. overflow-x: hidden;
  1630. text-align: center;
  1631. font-weight: bold;
  1632. }
  1633. .taskInfoArea_3ThxW .real .gray {
  1634. color: #999999;
  1635. font-weight: normal;
  1636. margin: 10px 0;
  1637. display: block;
  1638. }
  1639. .taskInfoArea_3ThxW .item {
  1640. margin-top: 25px;
  1641. }
  1642. .taskInfoArea_3ThxW .title {
  1643. margin: 10px 0;
  1644. }
  1645. .taskInfoArea_3ThxW .seal-wrapper-item {
  1646. padding: 20px 10px;
  1647. margin: 0 auto;
  1648. height: 140px;
  1649. width: 120px;
  1650. cursor: move;
  1651. border: 1px dotted #e1e1e1;
  1652. }
  1653. .taskInfoArea_3ThxW .finish-img {
  1654. width: 100px;
  1655. height: 100px;
  1656. }
  1657. .taskInfoArea_3ThxW .item-box {
  1658. width: 100%;
  1659. margin-bottom: 20px;
  1660. }
  1661. .taskInfoArea_3ThxW .testSetting_8FNRp {
  1662. width: 100%;
  1663. display: flex;
  1664. flex-direction: column;
  1665. justify-content: flex-start;
  1666. align-items: flex-start;
  1667. text-align: left;
  1668. }
  1669. .taskInfoArea_3ThxW .titleh2_3zdht {
  1670. margin-bottom: 5px;
  1671. font-size: 12px;
  1672. font-weight: 500;
  1673. line-height: 22px;
  1674. color: #333;
  1675. }
  1676. .taskInfoArea_3ThxW .emptyStyle_wctx0 {
  1677. display: flex;
  1678. flex-direction: column;
  1679. justify-content: flex-start;
  1680. align-items: center;
  1681. width: 100%;
  1682. margin-top: 200px;
  1683. }
  1684. .taskInfoArea_3ThxW .emptyP_2N3sX {
  1685. width: 196px;
  1686. font-size: 12px;
  1687. color: #333;
  1688. line-height: 22px;
  1689. font-weight: 500;
  1690. text-align: center;
  1691. }
  1692. </style>
  1693. @endsection