sheet.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864
  1. <!--
  2. * @Author : yuanrunwei
  3. * @Date : 2021-12-04 14:23:58
  4. * @LastEditors: Please set LastEditors
  5. * @LastEditTime: 2022-01-14 16:12:41
  6. * @FilePath : \spfm-market-front\src\pages\main\performance\components\sheet.vue
  7. -->
  8. <template>
  9. <div class="sheet-container">
  10. <div class="flex-justify-align-end margin-bottom-20">
  11. <el-button
  12. type="primary"
  13. @click="handleVisible"
  14. v-if="['template'].includes(attribute)"
  15. >权限设置</el-button
  16. >
  17. <el-button type="primary" @click="handleDownload">导出</el-button>
  18. <el-button type="primary" @click="handleFullscreen()">全屏显示</el-button>
  19. <template v-if="['edit'].includes(type)">
  20. <el-upload
  21. v-if="!id"
  22. class="margin-right-10 margin-left-10"
  23. action
  24. :on-change="handleChange"
  25. :show-file-list="false"
  26. >
  27. <el-button type="primary">上传</el-button>
  28. </el-upload>
  29. <el-button
  30. v-if="addFlag === '0'"
  31. type="primary"
  32. @click="handleSave"
  33. :disabled="handleForbid()"
  34. ><span>{{ id ? "提交" : "新增" }}</span
  35. ><span>{{
  36. handleForbid() ? `(请先设置权限)` : ""
  37. }}</span></el-button
  38. >
  39. </template>
  40. </div>
  41. <div id="luckysheet" class="sheet-container-block"></div>
  42. <simple-dialog
  43. title="权限设置"
  44. :visible="visible"
  45. :modal="false"
  46. width="1400px"
  47. @confirm="handleAuth"
  48. @cancel="handleVisible"
  49. >
  50. <el-form ref="form" :model="form" label-width="80px">
  51. <el-radio-group v-model="form.permission_type">
  52. <el-form-item>
  53. <el-radio :label="0"><span>无特殊权限</span></el-radio>
  54. <div>
  55. <span class="form-content">负责人</span>
  56. <el-select
  57. v-model="form.person"
  58. multiple
  59. placeholder="请选择负责人"
  60. >
  61. <el-option
  62. v-for="({ label, value }, index) in charge_list"
  63. :key="index"
  64. :label="label"
  65. :value="value"
  66. ></el-option>
  67. </el-select>
  68. </div>
  69. <!-- <div class="form-input">
  70. <span class="form-content"> 可编辑行:从</span>
  71. <el-input v-model="form.col_start" />
  72. <span class="form-content">到</span
  73. ><el-input v-model="form.col_end" />
  74. </div>
  75. <div class="form-input">
  76. <span class="form-content">可编辑列:从</span>
  77. <el-input v-model="form.row_start" />
  78. <span class="form-content">到</span>
  79. <el-input v-model="form.row_end" />
  80. </div> -->
  81. </el-form-item>
  82. <el-form-item>
  83. <el-radio :label="1"><span>特殊权限:</span></el-radio>
  84. <el-form-item
  85. label="负责人"
  86. prop="charge"
  87. v-for="(item, index) in form.charge"
  88. :key="index"
  89. :rules="{
  90. required: true,
  91. message: '负责人不能为空',
  92. trigger: 'blur',
  93. }"
  94. >
  95. <div class="flex">
  96. <el-select
  97. class="margin-bottom-20 margin-right-10"
  98. placeholder="请选择负责人"
  99. v-model="item.person"
  100. filterable
  101. >
  102. <el-option
  103. v-for="({ label, value }, index) in charge_list"
  104. :key="index"
  105. :label="label"
  106. :value="value"
  107. ></el-option>
  108. </el-select>
  109. <div class="form-select">
  110. <span class="form-content">可编辑行:从</span>
  111. <el-input v-model="item.col_start" />
  112. <span class="form-content">到</span>
  113. <el-input v-model="item.col_end" />
  114. </div>
  115. <div class="form-select">
  116. <span class="form-content">可编辑列:从</span>
  117. <el-input v-model="item.row_start" />
  118. <span class="form-content">到</span>
  119. <el-input v-model="item.row_end" />
  120. </div>
  121. </div>
  122. </el-form-item>
  123. <div>
  124. <el-button @click.prevent="handleCharge('add')">添加</el-button>
  125. <el-button
  126. v-if="form.charge.length - 1"
  127. @click.prevent="handleCharge('delete')"
  128. >删除</el-button
  129. >
  130. </div>
  131. </el-form-item>
  132. </el-radio-group>
  133. <!-- <el-form-item
  134. label="可编辑列"
  135. prop="array"
  136. ><el-select
  137. v-model="form.array"
  138. placeholder="可编辑列"
  139. multiple
  140. >
  141. <el-option
  142. v-for="(value, index) in 10"
  143. :key="index"
  144. :label="index + 1"
  145. :value="index + 1"
  146. >
  147. </el-option> </el-select
  148. ></el-form-item>
  149. <el-form-item
  150. label="权限规则"
  151. prop="type"
  152. :rules="{
  153. required: true,
  154. message: '权限规则不能为空',
  155. trigger: 'change',
  156. }"
  157. >
  158. <el-select v-model="form.type">
  159. <el-option
  160. v-for="item in type_options"
  161. :key="item.value"
  162. :label="item.label"
  163. :value="item.value"
  164. ></el-option> </el-select
  165. ></el-form-item>
  166. <el-form-item
  167. label="负责人"
  168. prop="charge"
  169. :rules="{
  170. required: true,
  171. message: '负责人不能为空',
  172. trigger: 'blur',
  173. }"
  174. >
  175. <div
  176. class="flex-justify-start"
  177. v-for="(item, index) in form.charge"
  178. :key="index"
  179. >
  180. <el-select
  181. v-model="item.key"
  182. class="margin-bottom-20 margin-right-10 flex-1"
  183. placeholder="请选择指定列/行"
  184. multiple
  185. >
  186. <el-option
  187. v-for="(value, index) in 10"
  188. :key="index"
  189. :label="index + 1"
  190. :value="index + 1"
  191. >
  192. </el-option>
  193. </el-select>
  194. <el-select
  195. class="margin-bottom-20"
  196. placeholder="请选择负责人"
  197. v-model="item.value"
  198. filterable
  199. >
  200. <el-option
  201. v-for="({ label, value }, index) in charge_list"
  202. :key="index"
  203. :label="label"
  204. :value="value"
  205. ></el-option>
  206. </el-select>
  207. </div>
  208. <div>
  209. <el-button @click.prevent="handleCharge('add')"
  210. >添加</el-button
  211. >
  212. <el-button
  213. v-if="form.charge.length - 1"
  214. @click.prevent="handleCharge('delete')"
  215. >删除</el-button
  216. >
  217. </div>
  218. </el-form-item> -->
  219. </el-form>
  220. <template v-if="id" v-slot:footer><div></div></template>
  221. </simple-dialog>
  222. <simpleDialog
  223. title="审批"
  224. :visible="manager_approve"
  225. :modal="false"
  226. @cancel="handleApprove"
  227. >
  228. <template v-slot:footer>
  229. <div>
  230. <el-button @click.prevent="handleApprove('1')">结束</el-button>
  231. <el-button @click.prevent="handleApprove('4')" type="primary"
  232. >转副总审批</el-button
  233. >
  234. <el-button @click.prevent="handleApprove('3')" type="primary"
  235. >转总经理审批</el-button
  236. >
  237. </div>
  238. </template>
  239. </simpleDialog>
  240. </div>
  241. </template>
  242. <script>
  243. import luckyexcel from "luckyexcel";
  244. import { exportExcel } from "../common/export";
  245. import simpleDialog from "./dialog.vue";
  246. export default {
  247. components: {
  248. simpleDialog,
  249. },
  250. props: {
  251. type: {
  252. type: String,
  253. default: "view", // view 查看 edit 编辑
  254. },
  255. attribute: {
  256. type: String,
  257. default: "template", // template 模板 order 工单 file 文件
  258. },
  259. id: {
  260. default: null,
  261. },
  262. },
  263. data() {
  264. return {
  265. form: {
  266. charge: [
  267. {
  268. person: [],
  269. col_start: "",
  270. col_end: "",
  271. row_start: "",
  272. row_end: "",
  273. },
  274. ],
  275. array: [],
  276. type: null,
  277. permission_type: null,
  278. col_start: "",
  279. col_end: "",
  280. row_start: "",
  281. row_end: "",
  282. },
  283. // 可提交标志
  284. addFlag: "0",
  285. isDisable: true,
  286. issued_id: null,
  287. template_id: null,
  288. visible: false,
  289. manager_approve: false,
  290. row_list: [],
  291. column_list: [],
  292. charge_list: [],
  293. type_options: [
  294. {
  295. value: 1,
  296. label: "按行",
  297. },
  298. // {
  299. // value: 2,
  300. // label: "按列",
  301. // },
  302. ],
  303. };
  304. },
  305. methods: {
  306. handleInit() {
  307. if (this.id) {
  308. this.handleQuery();
  309. } else {
  310. this.handleCreate();
  311. }
  312. },
  313. // // 权限选择
  314. // handleRadio(e){
  315. // console.log(e,'e');
  316. // },
  317. handleAllow({ row, column }) {
  318. return (
  319. (!this.form.permission_type && this.type === "edit") ||
  320. (this.row_list.includes(row) && this.column_list.includes(column))
  321. );
  322. },
  323. async handleQuery() {
  324. let url = "";
  325. let key = "";
  326. switch (this.attribute) {
  327. case "template":
  328. url = "/market/CMKFileTemplate/QueryCMKFileTemplateById";
  329. key = "templateId";
  330. break;
  331. case "order":
  332. url = "/market/CMKIssued/CMKQueryIssuedById";
  333. key = "id";
  334. break;
  335. case "file":
  336. url = "/market/CMKIssued/CMKIssuedProcessByUser";
  337. key = "id";
  338. break;
  339. }
  340. const {
  341. data: {
  342. templateContent,
  343. templateName,
  344. issuedId,
  345. templateId,
  346. list,
  347. addFlag,
  348. },
  349. } = await this.$http({
  350. url,
  351. method: "post",
  352. headers: {
  353. "Content-Type": "application/json",
  354. },
  355. data: {
  356. [key]: this.id,
  357. },
  358. });
  359. this.template_id = templateId;
  360. this.issued_id = issuedId;
  361. this.addFlag = addFlag;
  362. console.log(addFlag, "addFlag");
  363. if (list && list.length) {
  364. const { type } = list[0];
  365. if (type === "1") {
  366. // 公共权限
  367. // const { allowEditingColumns, rowNum } = list[0];
  368. this.form = {
  369. permission_type: Number(type) - 1,
  370. person: list.map((el) => {
  371. return `${el.principalId},${el.principalName}`;
  372. }),
  373. charge: [
  374. {
  375. person: "",
  376. col_start: "",
  377. col_end: "",
  378. row_start: "",
  379. row_end: "",
  380. },
  381. ],
  382. };
  383. } else {
  384. // 特殊权限
  385. this.form = {
  386. permission_type: Number(type) - 1,
  387. col_start: "",
  388. col_end: "",
  389. row_start: "",
  390. row_end: "",
  391. charge: list.map((el) => ({
  392. person: el.principalId + "," + el.principalName,
  393. col_start: el.allowEditingColumns.split(",")[0],
  394. col_end:
  395. el.allowEditingColumns.split(",")[
  396. el.allowEditingColumns.split(",").length - 1
  397. ],
  398. row_start: el.rowNum.split(",")[0],
  399. row_end: el.rowNum.split(",")[el.rowNum.split(",").length - 1],
  400. })),
  401. };
  402. }
  403. // this.form = {
  404. // ...this.form,
  405. // type: type,
  406. // array: allowEditingColumns ? allowEditingColumns.split(",") : [],
  407. // charge: list.map(({ principalId, principalName, rowNum }) => ({
  408. // value: `${principalId},${principalName}`,
  409. // key: rowNum.split(","),
  410. // })),
  411. // };
  412. // this.form = {};
  413. this.row_list =
  414. this.type === "edit" && list[0].rowNum
  415. ? list[0].rowNum
  416. .split(",")
  417. .map((element) => JSON.parse(element) - 1)
  418. : [];
  419. this.column_list =
  420. this.type === "edit" && list[0].allowEditingColumns
  421. ? list[0].allowEditingColumns
  422. .split(",")
  423. .map((element) => JSON.parse(element) - 1)
  424. : [];
  425. }
  426. this.handleCreate({
  427. json: templateContent ? JSON.parse(templateContent) : {},
  428. name: templateName,
  429. type: "json",
  430. });
  431. },
  432. handleForbid() {
  433. // const object = {};
  434. const { permission_type } = this.form;
  435. if (permission_type === 0) {
  436. // 公共权限 暂时不用可编辑行和列
  437. const { person } = this.form;
  438. if (person.length) {
  439. return false;
  440. }
  441. return true;
  442. } else if (permission_type === 1) {
  443. // 特殊权限
  444. let flag = 1;
  445. const { charge } = this.form;
  446. charge.forEach((el) => {
  447. if (
  448. Object.values(el).filter((v) => {
  449. return v !== "";
  450. }).length === 5
  451. ) {
  452. flag = flag * 1;
  453. } else {
  454. flag = flag * 0;
  455. }
  456. });
  457. return !flag;
  458. } else {
  459. return true;
  460. }
  461. // form: {
  462. // charge: [
  463. // {
  464. // person: "",
  465. // col_start: "",
  466. // col_End: "",
  467. // row_start: "",
  468. // row_end: "",
  469. // },
  470. // ],
  471. // array: [],
  472. // type: null,
  473. // permission_type: 0,
  474. // col_start: "",
  475. // col_end: "",
  476. // row_start: "",
  477. // row_end: "",
  478. // },
  479. // charge.map(({ key }) => {
  480. // console.log(key);
  481. // // if (key && value) {
  482. // // object[key] = value;
  483. // // }
  484. // });
  485. // return !(Object.keys(object).length && type);
  486. },
  487. async handleCreate({ file, json, type, name } = {}) {
  488. let that = this;
  489. const options = {
  490. container: "luckysheet",
  491. lang: "zh",
  492. showsheetbar: false,
  493. hook: {
  494. cellEditBefore: function ([
  495. { row_focus: row, column_focus: column },
  496. ]) {
  497. if (!that.handleAllow({ row, column })) {
  498. that.$message.error("您没有编辑权限");
  499. }
  500. },
  501. cellUpdateBefore: function (row, column) {
  502. if (!that.handleAllow({ row, column })) {
  503. return false;
  504. }
  505. },
  506. cellRenderAfter: function (cell, position) {
  507. const { r: row, c: column } = position;
  508. if (cell) {
  509. if (!that.handleAllow({ row, column })) {
  510. cell.bg = "#d5d5d5";
  511. } else {
  512. cell.bg = "#ffffff";
  513. }
  514. }
  515. },
  516. },
  517. };
  518. switch (type) {
  519. case "file":
  520. if (file) {
  521. await new Promise((resolve) => {
  522. luckyexcel.transformExcelToLucky(file, (export_json) => {
  523. options.data = [
  524. ...export_json.sheets.map((element) => ({
  525. ...element,
  526. zoomRatio: 0.75,
  527. })),
  528. ];
  529. options.title = export_json.info.name;
  530. resolve();
  531. });
  532. });
  533. }
  534. break;
  535. case "json":
  536. if (json) {
  537. options.data = [
  538. {
  539. ...json,
  540. zoomRatio: 0.75,
  541. },
  542. ];
  543. options.title = name;
  544. }
  545. break;
  546. }
  547. window.luckysheet.create(options);
  548. let clock = setInterval(() => {
  549. if (window.luckysheet) {
  550. window.luckysheet.refresh();
  551. clearInterval(clock);
  552. }
  553. }, 1000);
  554. },
  555. async handleChange(response) {
  556. this.handleCreate({ file: response.raw, type: "file" });
  557. },
  558. handleDownload() {
  559. exportExcel(
  560. window.luckysheet.getAllSheets(),
  561. window.luckysheet.getWorkbookName()
  562. );
  563. },
  564. async handleAddAuth({ id }) {
  565. // const object = {};
  566. const { permission_type } = this.form;
  567. console.log(id, permission_type);
  568. let reqdata = {
  569. templateId: id,
  570. type: permission_type ? 2 : 1,
  571. };
  572. if (!permission_type) {
  573. // 公共权限
  574. const { person } = this.form;
  575. const principalId = [];
  576. const principalName = [];
  577. person.forEach((el) => {
  578. principalId.push(el.split(",")[0]);
  579. principalName.push(el.split(",")[1]);
  580. });
  581. reqdata.principalId = principalId.join(",");
  582. reqdata.principalName = principalName.join(",");
  583. } else {
  584. const { charge } = this.form;
  585. // 特殊权限
  586. reqdata.specialAuth = charge.map((el) =>
  587. JSON.stringify({
  588. allowEditingColumns: this.paramsArr(el.col_start, el.col_end),
  589. rowNum: this.paramsArr(el.row_start, el.row_end),
  590. principalId: el.person.split(",")[0],
  591. principalName: el.person.split(",")[1],
  592. })
  593. );
  594. }
  595. await this.$http({
  596. url: this.id
  597. ? "/market/CMKFileTemplateAuthority/CMKFileTemplateAuthorityUpdate"
  598. : "/market/CMKFileTemplateAuthority/CMKFileTemplateAuthorityAdd",
  599. method: "post",
  600. headers: {
  601. "Content-Type": "application/json",
  602. },
  603. data: reqdata,
  604. });
  605. this.$message.success("操作成功");
  606. },
  607. async handleSave() {
  608. let edit_url = "";
  609. switch (this.attribute) {
  610. case "template":
  611. edit_url = "";
  612. break;
  613. case "order":
  614. edit_url = "";
  615. break;
  616. case "file":
  617. edit_url = "/market/CMKIssued/CMKIssuedSubmit";
  618. break;
  619. }
  620. const sheet_name = window.luckysheet.getSheet().name;
  621. const data = window.luckysheet.getSheet(sheet_name);
  622. const workbook_name = window.luckysheet.getWorkbookName();
  623. if (!this.id) {
  624. // 新增时添加权限
  625. const {
  626. data: { body },
  627. } = await this.$http({
  628. url: "/market/CMKFileTemplate/CMKFileTemplateAdd", // 新增
  629. method: "post",
  630. headers: {
  631. "Content-Type": "application/json",
  632. },
  633. data: {
  634. id: this.template_id,
  635. templateContent: JSON.stringify(data),
  636. templateName: workbook_name,
  637. issuedId: this.issued_id,
  638. },
  639. });
  640. this.handleAddAuth({ id: body });
  641. this.$emit("save");
  642. } else {
  643. // 职位
  644. let duty = JSON.parse(sessionStorage.userInfo).duty;
  645. if (duty === "7") {
  646. this.manager_approve = true;
  647. } else {
  648. // 员工提交
  649. await this.$http({
  650. url: edit_url, // 新增
  651. method: "post",
  652. headers: {
  653. "Content-Type": "application/json",
  654. },
  655. data: {
  656. id: this.template_id,
  657. templateContent: JSON.stringify(data),
  658. templateName: workbook_name,
  659. issuedId: this.issued_id,
  660. },
  661. });
  662. this.$emit("save");
  663. }
  664. }
  665. },
  666. handleAuth() {
  667. this.$refs["form"].validate((valid) => {
  668. if (valid) {
  669. if (this.handleForbid()) {
  670. this.$message.error("请完善可编辑信息");
  671. return false;
  672. }
  673. this.handleVisible();
  674. if (this.id) {
  675. this.handleAddAuth({ id: this.id });
  676. } else {
  677. this.$message.success("设置成功");
  678. }
  679. }
  680. });
  681. },
  682. // 通用方法用于转化全局
  683. paramsArr(start, end) {
  684. const arr = [];
  685. console.log(start, end);
  686. for (let i = Number(start); i <= Number(end); i++) {
  687. arr.push(i);
  688. }
  689. return arr.join(",");
  690. },
  691. filterName(id, arr) {
  692. return arr.filter((el) => el.secLeaderLogin === id)[0].secLeaderName;
  693. },
  694. handleCharge(type) {
  695. switch (type) {
  696. case "add":
  697. this.form.charge.push({
  698. person: "",
  699. });
  700. this.handleForbid();
  701. break;
  702. case "delete":
  703. this.form.charge.pop();
  704. this.handleForbid();
  705. break;
  706. }
  707. },
  708. handleVisible() {
  709. console.log(this.form, "aada");
  710. this.visible = !this.visible;
  711. },
  712. async handleApprove(type) {
  713. if (type) {
  714. const sheet_name = window.luckysheet.getSheet().name;
  715. const data = window.luckysheet.getSheet(sheet_name);
  716. const workbook_name = window.luckysheet.getWorkbookName();
  717. await this.$http({
  718. url: "/market/CMKIssued/CMKIssuedSubmit", // 新增
  719. method: "post",
  720. headers: {
  721. "Content-Type": "application/json",
  722. },
  723. data: {
  724. id: this.template_id,
  725. templateContent: JSON.stringify(data),
  726. templateName: workbook_name,
  727. issuedId: this.issued_id,
  728. },
  729. });
  730. let params = { id: this.issued_id };
  731. switch (type) {
  732. case "1":
  733. params = {
  734. ...params,
  735. operateName: "结束",
  736. status: 3,
  737. };
  738. break;
  739. case "4":
  740. params = {
  741. ...params,
  742. operateName: "转副总审批",
  743. reviewType: 2,
  744. };
  745. break;
  746. case "3":
  747. params = {
  748. ...params,
  749. operateName: "转总经理审批",
  750. reviewType: 3,
  751. };
  752. break;
  753. }
  754. await this.$http({
  755. url: "/market/CMKIssued/CMKIssuedCheck", // 新增
  756. method: "post",
  757. headers: {
  758. "Content-Type": "application/json",
  759. },
  760. data: params,
  761. });
  762. this.$message({
  763. type: "success",
  764. message: "审批成功",
  765. });
  766. this.manager_approve = false;
  767. this.$emit("save");
  768. } else {
  769. this.manager_approve = false;
  770. }
  771. },
  772. handleFullscreen() {
  773. const element = document.body;
  774. const is_fullscreen =
  775. document.fullScreen ||
  776. document.mozFullScreen ||
  777. document.webkitIsFullScreen;
  778. if (!is_fullscreen) {
  779. //进入全屏,多重短路表达式
  780. (element.requestFullscreen && element.requestFullscreen()) ||
  781. (element.mozRequestFullScreen && element.mozRequestFullScreen()) ||
  782. (element.webkitRequestFullscreen &&
  783. element.webkitRequestFullscreen()) ||
  784. (element.msRequestFullscreen && element.msRequestFullscreen());
  785. } else {
  786. //退出全屏,三目运算符
  787. document.exitFullscreen
  788. ? document.exitFullscreen()
  789. : document.mozCancelFullScreen
  790. ? document.mozCancelFullScreen()
  791. : document.webkitExitFullscreen
  792. ? document.webkitExitFullscreen()
  793. : "";
  794. }
  795. },
  796. handleChargeList() {
  797. this.$http({
  798. url: "/market/techcentergj/queryLeaderList",
  799. method: "post",
  800. headers: {
  801. "Content-Type": "application/json",
  802. },
  803. data: {},
  804. }).then((response) => {
  805. this.charge_list = response.data.map((element) => ({
  806. label: `${element.ou} ${element.secLeaderName}`,
  807. value: `${element.secLeaderLogin},${element.secLeaderName}`,
  808. }));
  809. });
  810. },
  811. },
  812. mounted() {
  813. this.handleInit();
  814. this.handleChargeList();
  815. },
  816. };
  817. </script>
  818. <style lang="scss" scope>
  819. .sheet-container {
  820. position: fixed;
  821. width: calc(100% - 40px);
  822. height: 100%;
  823. &-block {
  824. overflow: hidden;
  825. position: absolute;
  826. width: 100%;
  827. height: 75%;
  828. }
  829. }
  830. .form {
  831. &-input {
  832. margin-top: 5px;
  833. .el-input {
  834. width: 150px;
  835. .el-input__inner {
  836. height: 30px !important;
  837. line-height: 30px !important;
  838. }
  839. }
  840. }
  841. &-content {
  842. margin: 0px 10px;
  843. }
  844. &-select {
  845. .el-input {
  846. width: 100px;
  847. .el-input__inner {
  848. height: 30px !important;
  849. line-height: 30px !important;
  850. }
  851. }
  852. }
  853. }
  854. </style>