More2View.vue 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979
  1. <template>
  2. <div class="containe">
  3. <div class="main">
  4. <div class="app-container">
  5. <el-row :gutter="20">
  6. <!--文件数据-->
  7. <el-col :span="20" :xs="24" class="main-right">
  8. <p>发送的文档</p>
  9. <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"
  10. label-width="75px" class="main-right-top">
  11. <el-form-item label="文件名称" prop="docName">
  12. <el-input v-model="queryParams.docName" placeholder="请输入文件名称" clearable
  13. @keyup.enter.native="handleQuery" />
  14. </el-form-item>
  15. <el-form-item>
  16. <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
  17. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery" class="reset1">重置</el-button>
  18. </el-form-item>
  19. </el-form>
  20. <el-table v-loading="loading" :data="tableData1" @selection-change="handleSelectionChange"
  21. class="main-right-table" height="calc(100vh * (700 / 1080))" align="left"
  22. :header-cell-style="{ 'text-align': 'center' }">
  23. <el-table-column type="selection" width="55" align="center" />
  24. <el-table-column label="文件名称" align="left" prop="docName" />
  25. <el-table-column label="发件人" align="center" prop="user" width="100" />
  26. <el-table-column label="收到时间" align="center" prop="createTime" />
  27. <el-table-column label="文件类型" align="center" prop="docType" />
  28. <el-table-column prop="docLevel" label="文件级别" width="80" :formatter="fileLevelData">
  29. </el-table-column>
  30. <el-table-column label="标签" align="center" prop="tagName" width="250">
  31. <template slot-scope="scope">
  32. <div v-if="scope.row.tagList != []">
  33. <el-tag v-for="item in scope.row.tagList" :key="item.tagId">
  34. {{ item.tagName }}
  35. </el-tag>
  36. </div>
  37. </template>
  38. </el-table-column>
  39. <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
  40. <template slot-scope="scope">
  41. <el-button size="mini" type="text" icon="el-icon-view" @click="handlePreview(scope.row)"
  42. v-if="checkLevel(scope.row, 'view')">预览</el-button>
  43. <!-- <el-dropdown size="mini">
  44. <el-button size="mini" type="text" icon="el-icon-d-arrow-right">更多</el-button>
  45. <el-dropdown-menu slot="dropdown">
  46. <el-dropdown-item icon="el-icon-view" @click.native="handleShare(scope.row)"
  47. v-if="checkLevel(scope.row, 'share')">分享</el-dropdown-item>
  48. <el-dropdown-item icon="el-icon-view" @click.native="handleDownload(scope.row)"
  49. v-if="checkLevel(scope.row, 'download')">下载</el-dropdown-item>
  50. <el-dropdown-item icon="el-icon-view" @click.native="handleEdit(scope.row)"
  51. v-if="checkLevel(scope.row, 'edit')">在线编辑</el-dropdown-item>
  52. <el-dropdown-item icon="el-icon-edit" @click.native="handleUpdate(scope.row)"
  53. v-if="checkLevel(scope.row, 'modify')" v-hasPermi="['doc:info:edit']">修改</el-dropdown-item>
  54. <el-dropdown-item icon="el-icon-delete" @click.native="handleDelete(scope.row)"
  55. v-if="checkLevel(scope.row, 'del')" v-hasPermi="['doc:info:remove']">删除</el-dropdown-item>
  56. </el-dropdown-menu>
  57. </el-dropdown> -->
  58. </template>
  59. </el-table-column>
  60. </el-table>
  61. <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
  62. :limit.sync="queryParams.pageSize" @pagination="getList" />
  63. </el-col>
  64. </el-row>
  65. <!-- 添加或修改文件基本信息对话框 -->
  66. <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body custom-class="el-dialog5">
  67. <el-form ref="form" :model="form" :rules="rules" label-width="80px">
  68. <el-form-item label="" prop="docPath">
  69. <!-- <el-input v-model="form.docPath" placeholder="请输入文件路径" /> -->
  70. <file-upload v-model="form.docPath" />
  71. </el-form-item>
  72. <el-form-item label="文件目录" prop="dirId">
  73. <treeselect v-model="form.dirId" :options="dirList" :normalizer="normalizer" placeholder="请选择文件目录" />
  74. </el-form-item>
  75. <el-form-item label="文件名称" prop="docName">
  76. <el-input v-model="form.docName" placeholder="请输入文件名称" />
  77. </el-form-item>
  78. <el-form-item label="文件级别" prop="docLevel">
  79. <el-select v-model="form.docLevel" placeholder="请选择文件级别">
  80. <el-option v-for="item in levelOptions" :key="item.levelId" :label="item.levelName"
  81. :value="item.levelId"></el-option>
  82. </el-select>
  83. </el-form-item>
  84. <el-form-item label="选择标签(最多5个)" prop="tagName" color="red">
  85. <el-tag :key="tag" v-for="tag in dynamicTags" closable :disable-transitions="false"
  86. @close="handleClose(tag)">
  87. {{ tag }}
  88. </el-tag>
  89. <el-input class="input-new-tag" v-if="inputVisible" v-model="inputValue" ref="saveTagInput" size="small"
  90. @keyup.enter.native="handleInputConfirm" @blur="handleInputConfirm" maxlength="5" placeholder="最多输入五个字">
  91. </el-input>
  92. <el-button v-else class="button-new-tag" size="small" @click="showInput">添加标签</el-button>
  93. </el-form-item>
  94. <el-form-item label="文件标签" color="red">
  95. <el-tag v-for="tag in tags" :key="tag.tagName" :type="tag.type" @click="handleInputConfirm1(tag)">
  96. {{ tag.tagName }}
  97. </el-tag>
  98. </el-form-item>
  99. <el-form-item label="文件描述">
  100. <el-input v-model="form.docDesc" type="textarea" placeholder="请输入内容" />
  101. </el-form-item>
  102. </el-form>
  103. <div slot="footer" class="dialog-footer">
  104. <el-button type="primary" @click="submitForm">确 定</el-button>
  105. <el-button @click="cancel">取 消</el-button>
  106. </div>
  107. </el-dialog>
  108. <!-- 预览对话框 -->
  109. <div class="dhk" v-if="preview">
  110. <video :src="vid" controls v-if="vid1"></video>
  111. <audio :src="aud" controls v-if="aud1"></audio>
  112. <div class="image-container" v-if="img1">
  113. <el-image :src="imgg" ref="imageRef" style="max-width: 100%" @mousewheel.prevent="gunlun" />
  114. <el-button-group>
  115. <el-button icon="el-icon-refresh-left" @click="rotate(-90)" title="向左旋转"></el-button>
  116. <el-button icon="el-icon-refresh-right" @click="rotate(90)" title="向右旋转"></el-button>
  117. <el-button icon="el-icon-zoom-in" @click="scale(0.1)" title="放大"></el-button>
  118. <el-button icon="el-icon-zoom-out" @click="scale(-0.1)" title="缩小"></el-button>
  119. </el-button-group>
  120. </div>
  121. <el-button class="gb" icon="el-icon-close" circle @click="gb" />
  122. </div>
  123. </div>
  124. </div>
  125. </div>
  126. </template>
  127. <script>
  128. import "@/styles1/element-ui1.scss";
  129. import Cookies from "js-cookie";
  130. import {
  131. delShare2
  132. } from "@/api/doc/share1";
  133. import {
  134. listTag
  135. } from "@/api/doc/tag.js";
  136. import {
  137. listInfo,
  138. getInfo,
  139. delInfo,
  140. addInfo,
  141. updateInfo,
  142. officeType
  143. } from "@/api/doc/info";
  144. import {
  145. listDir,
  146. getDir,
  147. delDir,
  148. addDir,
  149. updateDir,
  150. personalList,
  151. } from "@/api/doc/dir";
  152. import {
  153. listLevel
  154. } from "@/api/doc/level";
  155. import Treeselect from "@riophae/vue-treeselect";
  156. import "@riophae/vue-treeselect/dist/vue-treeselect.css";
  157. export default {
  158. name: "Info",
  159. components: {
  160. Treeselect,
  161. },
  162. data() {
  163. return {
  164. //预览图片的旋转缩放
  165. scalePercentage: 1,
  166. rotationAngle: 0,
  167. // 预览界面
  168. preview: false,
  169. //视频路径和显示
  170. vid: "",
  171. vid1: false,
  172. //音频路径和显示
  173. aud: "",
  174. aud1: false,
  175. //图片路径和显示
  176. imgg: "",
  177. img1: false,
  178. //文件等级数据
  179. levelOptions: [],
  180. //底部左边表格数据
  181. tableData1: [],
  182. //标签列表
  183. tags: [],
  184. //选择标签
  185. dynamicTags: [],
  186. inputVisible: false,
  187. inputValue: "",
  188. // 遮罩层
  189. loading: true,
  190. // 选中数组
  191. ids: [],
  192. // 非单个禁用
  193. single: true,
  194. // 非多个禁用
  195. multiple: true,
  196. // 显示搜索条件
  197. showSearch: true,
  198. // 总条数
  199. total: 0,
  200. // 文件基本信息表格数据
  201. infoList: [],
  202. //目录ID
  203. dirId: undefined,
  204. //目录数据
  205. dirList: undefined,
  206. //文件等级数据
  207. levelOptions: [],
  208. // 弹出层标题
  209. title: "",
  210. // 是否显示弹出层
  211. open: false,
  212. // 查询参数
  213. queryParams: {
  214. pageNum: 1,
  215. pageSize: 10,
  216. docName: null,
  217. docLevel: null,
  218. createYear: null,
  219. params: {
  220. tagId: null,
  221. },
  222. },
  223. // 表单参数
  224. form: {},
  225. defaultProps: {
  226. children: "children",
  227. label: "dirName",
  228. id: "dirId",
  229. },
  230. // 表单校验
  231. rules: {
  232. docName: [{
  233. required: true,
  234. message: "文件名称不能为空",
  235. trigger: "blur",
  236. }, ],
  237. dirId: [{
  238. required: true,
  239. message: "文件目录不能为空",
  240. trigger: "blur",
  241. }, ],
  242. docLevel: [{
  243. required: true,
  244. message: "文件级别不能为空",
  245. trigger: "blur",
  246. }, ],
  247. },
  248. };
  249. },
  250. created() {
  251. this.dirTree();
  252. },
  253. mounted() {
  254. this.getLists();
  255. },
  256. watch: {
  257. "form.docPath": function(path, old) {
  258. if (path && path.lastIndexOf("/") > -1) {
  259. let name = path.slice(path.lastIndexOf("/") + 1);
  260. this.form.docName = name.split("_")[0];
  261. }
  262. },
  263. },
  264. methods: {
  265. //底部表格数据
  266. getLists() {
  267. //左边表格
  268. delShare2(this.queryParams).then((response) => {
  269. // 给定义的列表空数组赋值
  270. this.tableData1 = response.rows;
  271. });
  272. },
  273. // 滚轮滑动放大缩小
  274. gunlun(e) {
  275. const image = this.$refs.imageRef.$el.querySelector("img");
  276. if (e.deltaY > 0) {
  277. // console.log("鼠标向下滚动,图片缩小");
  278. this.scalePercentage -= 0.1;
  279. image.style.transform = `scale(${this.scalePercentage})`;
  280. } else {
  281. // console.log("鼠标向上滚动,图片放大");
  282. this.scalePercentage += 0.1;
  283. image.style.transform = `scale(${this.scalePercentage})`;
  284. }
  285. },
  286. //预览图片的旋转
  287. rotate(angle) {
  288. this.rotationAngle += angle;
  289. const image = this.$refs.imageRef.$el.querySelector("img");
  290. image.style.transform = `rotate(${this.rotationAngle}deg)`;
  291. console.log(image.style.transform);
  292. },
  293. //预览图片的缩放
  294. scale(delta) {
  295. this.scalePercentage += delta;
  296. const image = this.$refs.imageRef.$el.querySelector("img");
  297. image.style.transform = `scale(${this.scalePercentage})`;
  298. },
  299. // 预览关闭
  300. gb() {
  301. this.preview = false;
  302. },
  303. //选择标签关闭
  304. handleClose(tag) {
  305. this.form.tagList.map((i, index) => {
  306. if (tag == i.tagName) {
  307. this.form.tagList.splice(index, 1);
  308. }
  309. });
  310. this.dynamicTags.splice(this.dynamicTags.indexOf(tag), 1);
  311. },
  312. showInput() {
  313. if (this.dynamicTags.length >= 5) {
  314. this.inputVisible = false;
  315. alert("标签数不允许超过五个");
  316. } else {
  317. this.inputVisible = true;
  318. this.$nextTick((_) => {
  319. this.$refs.saveTagInput.$refs.input.focus();
  320. });
  321. }
  322. },
  323. //固定的标签
  324. handleInputConfirm1(tag) {
  325. if (this.dynamicTags.indexOf(tag.tagName) == -1) {
  326. this.dynamicTags.push(tag.tagName);
  327. this.form.tagList.push({
  328. tagId: tag.tagId,
  329. tagName: tag.tagName,
  330. });
  331. }
  332. if (this.dynamicTags.length > 5) {
  333. alert("标签数不允许超过五个");
  334. this.dynamicTags.pop();
  335. }
  336. },
  337. //自定义标签
  338. handleInputConfirm() {
  339. let inputValue = this.inputValue;
  340. //查询输入的标签在固定标签里是否存在
  341. var Newtags = this.tags.find((value) => value.tagName == inputValue);
  342. // console.log(a);
  343. //删除标签
  344. if (this.dynamicTags.indexOf(inputValue) != -1) {
  345. this.dynamicTags.pop();
  346. this.form.tagList.pop();
  347. }
  348. if (inputValue) {
  349. this.dynamicTags.push(inputValue);
  350. }
  351. this.inputVisible = false;
  352. this.inputValue = "";
  353. //判断输入的标签在固定标签里是否存在,存在则换成固定标签
  354. if (Newtags) {
  355. this.form.tagList.push({
  356. tagId: Newtags.tagId,
  357. tagName: Newtags.tagName,
  358. });
  359. } else {
  360. this.form.tagList.push({
  361. tagName: inputValue,
  362. });
  363. }
  364. // console.log(this.form);
  365. if (this.dynamicTags.length > 5) {
  366. alert("标签数不允许超过五个");
  367. this.dynamicTags.pop();
  368. }
  369. },
  370. /** 转换目录信息数据结构 */
  371. normalizer(node) {
  372. if (node.children && !node.children.length) {
  373. delete node.children;
  374. }
  375. return {
  376. id: node.dirId,
  377. label: node.dirName,
  378. children: node.children,
  379. };
  380. },
  381. // 节点单击事件
  382. handleNodeClick(data) {
  383. this.dirId = data.dirId;
  384. this.queryParams.dirId = this.dirId;
  385. this.queryParams.searchValue = this.spaceId;
  386. this.handleQuery();
  387. },
  388. //分享
  389. handleShare(row) {
  390. this.$router.push("/home/file/individual/share/user/" + row.docId);
  391. },
  392. /**下载按钮操作*/
  393. handleDownload(row) {
  394. location.href = row.docPath;
  395. },
  396. // 检验关闭
  397. gb1() {
  398. this.check = false;
  399. },
  400. // 是否机密
  401. // isSecretRole(row) {
  402. // // console.log(`row=${row}`);
  403. // if (row.isSecret == "是") {
  404. // this.check = true;
  405. // this.currentRow = row;
  406. // }
  407. // },
  408. //预览
  409. handlePreview(row) {
  410. // console.log(row);
  411. // console.log( this.$route.meta.title);
  412. // row.isEdit = false;
  413. // this.$tab.openPage(
  414. // // "文件[" + row.docName + "]预览",
  415. // document.title = row.docName,
  416. // // window.open("/individual/Pre/user/" + row.docId, '_blank'),
  417. // // row
  418. // );
  419. //图片后缀名
  420. var pictures = ['jpeg', 'tiff', 'raw', 'bmp', 'gif', 'png', 'jpg'];
  421. //音频后缀名
  422. var audios = ['mid', 'mp3', 'wav', 'wma', 'ra', 'ogg', 'flac', 'aac', 'ape'];
  423. //视频后缀名
  424. var videos = ['asf', 'avi', 'mp4', 'ogm', 'ifo', 'mpg', 'mov', 'mpeg', 'mpg', 'vob', 'wmv', 'rm', 'rmvb'];
  425. //判断后缀名
  426. if (videos.some(item => item == row.docType)) {
  427. this.preview = true;
  428. this.vid1 = true;
  429. this.aud1 = false;
  430. this.img1 = false;
  431. this.vid = row.docPath;
  432. } else if (audios.some(item => item == row.docType)) {
  433. this.preview = true;
  434. this.aud1 = true;
  435. this.vid1 = false;
  436. this.img1 = false;
  437. this.aud = row.docPath;
  438. } else if (pictures.some(item => item == row.docType)) {
  439. this.preview = true;
  440. this.aud1 = false;
  441. this.vid1 = false;
  442. this.img1 = true;
  443. this.imgg = row.docPath;
  444. } else if (officeType.some(item => item == row.docType)) {
  445. row.isEdit = false;
  446. this.$tab.openPage(
  447. window.open('/individual/Pre/user/' + row.docId + "?row=" + JSON.stringify(row),
  448. '_blank'),
  449. // window.open("/individual/Pre/user/" + row.docId +"/title/"+ row.docName, '_blank'),
  450. );
  451. // console.log(111);
  452. } else {
  453. this.$modal.msgWarning("该文件不支持预览");
  454. }
  455. // console.log(row.docPath);
  456. // console.log(vid);
  457. },
  458. //在线编辑
  459. handleEdit(row) {
  460. row.isEdit = true;
  461. this.$tab.openPage(
  462. window.open('/individual/Pre/user/' + row.docId + "?row=" + JSON.stringify(row),
  463. '_blank')
  464. );
  465. },
  466. //先获取左边目录树,拿到目录ID和spaceId才能查询
  467. dirTree() {
  468. this.loading = true;
  469. personalList().then((response) => {
  470. this.dirId = response.data[0].dirId;
  471. this.spaceId = response.data[0].spaceId;
  472. this.dirList = this.handleTree(response.data, "dirId");
  473. this.queryParams.dirId = this.dirId;
  474. this.queryParams.searchValue = this.spaceId;
  475. this.getList();
  476. //获取文件级别数据
  477. listLevel().then((response) => {
  478. this.levelOptions = response.rows;
  479. });
  480. this.loading = false;
  481. //标签数据
  482. listTag().then((res) => {
  483. this.tags = res.rows;
  484. });
  485. });
  486. },
  487. /**处理文档级别数据*/
  488. fileLevelData(row, col, value) {
  489. try {
  490. const obj = this.levelOptions.find((item) => item.levelId == value);
  491. return obj.levelName;
  492. } catch (e) {}
  493. },
  494. /**根据文档级别显示数据*/
  495. checkLevel(row, role) {
  496. try {
  497. const obj = this.levelOptions.find(
  498. (item) => item.levelId == row.docLevel
  499. );
  500. if (obj.levelRole.indexOf(role) != -1) {
  501. return true;
  502. } else {
  503. return false;
  504. }
  505. } catch (e) {}
  506. },
  507. /** 查询文件基本信息列表 */
  508. getList() {
  509. this.loading = true;
  510. console.log(this.queryParams);
  511. delShare2(this.queryParams).then((response) => {
  512. this.tableData1 = response.rows;
  513. this.total = response.total;
  514. this.loading = false;
  515. });
  516. },
  517. // 取消按钮
  518. cancel() {
  519. this.open = false;
  520. this.reset();
  521. },
  522. // 表单重置
  523. reset() {
  524. this.form = {
  525. docId: null,
  526. dirId: this.dirId,
  527. docName: null,
  528. docType: null,
  529. docSize: null,
  530. classifyId: null,
  531. docDesc: null,
  532. docPath: null,
  533. docLevel: null,
  534. allowEdit: null,
  535. docOf: null,
  536. owner: null,
  537. createYear: null,
  538. createBy: null,
  539. createTime: null,
  540. updateBy: null,
  541. updateTime: null,
  542. remark: null,
  543. isDel: null,
  544. searchValue: this.spaceId,
  545. tagList: [],
  546. };
  547. this.resetForm("form");
  548. this.dynamicTags = [];
  549. },
  550. /** 搜索按钮操作 */
  551. handleQuery() {
  552. this.queryParams.pageNum = 1;
  553. this.getList();
  554. },
  555. /** 重置按钮操作 */
  556. resetQuery() {
  557. this.resetForm("queryForm");
  558. this.queryParams.dirId = this.dirId;
  559. this.queryParams.searchValue = this.spaceId;
  560. this.queryParams.params.tagId = null;
  561. this.handleQuery();
  562. },
  563. // 多选框选中数据
  564. handleSelectionChange(selection) {
  565. this.ids = selection.map((item) => item.docId);
  566. this.single = selection.length !== 1;
  567. this.multiple = !selection.length;
  568. },
  569. /** 新增按钮操作 */
  570. handleAdd() {
  571. this.reset();
  572. this.open = true;
  573. this.title = "添加文件基本信息";
  574. // this.dynamicTags=[];
  575. // console.log(this.dynamicTags);
  576. },
  577. /** 修改按钮操作 */
  578. handleUpdate(row) {
  579. this.reset();
  580. const docId = row.docId || this.ids;
  581. getInfo(docId, row.docYear).then((response) => {
  582. this.form = response.data;
  583. this.open = true;
  584. this.title = "修改文件基本信息";
  585. this.dynamicTags = this.form.tagList.map((item) => item.tagName);
  586. // console.log(this.dynamicTags);
  587. // console.log(this.form);
  588. });
  589. },
  590. /** 提交按钮 */
  591. submitForm() {
  592. this.$refs["form"].validate((valid) => {
  593. if (valid) {
  594. if (this.form.docId != null) {
  595. updateInfo(this.form).then((response) => {
  596. this.$modal.msgSuccess("修改成功");
  597. this.open = false;
  598. this.getList();
  599. });
  600. } else {
  601. addInfo(this.form).then((response) => {
  602. this.$modal.msgSuccess("新增成功");
  603. this.open = false;
  604. this.getList();
  605. });
  606. }
  607. }
  608. });
  609. // console.log(this.dynamicTags.length);
  610. // console.log(this.form);
  611. // console.log(this.dynamicTags);
  612. },
  613. /** 删除按钮操作 */
  614. handleDelete(row) {
  615. const docIds = row.docId || this.ids;
  616. this.$modal
  617. .confirm('是否确认删除文件基本信息编号为"' + docIds + '"的数据项?')
  618. .then(function() {
  619. return delInfo(docIds);
  620. })
  621. .then(() => {
  622. this.getList();
  623. this.$modal.msgSuccess("删除成功");
  624. })
  625. .catch(() => {});
  626. },
  627. /** 导出按钮操作 */
  628. handleExport() {
  629. this.download(
  630. "doc/info/export", {
  631. ...this.queryParams,
  632. },
  633. `info_${new Date().getTime()}.xlsx`
  634. );
  635. },
  636. /**格式化文件大小数据*/
  637. fileSizeData(row, col, value) {
  638. const KB = 1;
  639. const MB = KB * 1024;
  640. const GB = MB * 1024;
  641. if (value < MB) {
  642. return `${(value / KB).toFixed(2)} KB`;
  643. } else if (value < GB) {
  644. return `${(value / MB).toFixed(2)} MB`;
  645. } else {
  646. return `${(value / GB).toFixed(2)} GB`;
  647. }
  648. },
  649. },
  650. };
  651. </script>
  652. <style scoped lang='scss'>
  653. .containe {
  654. color: #7ea4c8;
  655. font-size: 0.14rem;
  656. font-family: PingFang SC-Medium, PingFang SC;
  657. font-weight: 500;
  658. padding-left: calc(100vw * (20 / 1920));
  659. .main {
  660. width: calc(100vw * (1880 / 1920));
  661. height: calc(100vh * (950 / 1080));
  662. margin-top: calc(100vh * (30 / 1080));
  663. .app-container {
  664. width: calc(100vw * (1880 / 1920));
  665. height: calc(100vh * (950 / 1080));
  666. padding: 0;
  667. }
  668. .main-right {
  669. width: calc(100vw * (1880 / 1920));
  670. height: calc(100vh * (950 / 1080));
  671. background: url(../../../assets/img/Group-610.png);
  672. background-size: calc(100vw * (1880 / 1920)) calc(100vh * (950 / 1080));
  673. margin-left: calc(100vw * (10 / 1920));
  674. p {
  675. color: #ffffffff;
  676. font-size: 0.16rem;
  677. padding-left: calc(100vw * (15 / 1920));
  678. padding-top: calc(100vh * (20 / 1080));
  679. }
  680. .main-right-top {
  681. height: calc(100vh * (60 / 1080));
  682. margin-top: calc(100vw * (25 / 1920));
  683. margin-bottom: calc(100vw * (20 / 1920));
  684. margin-left: calc(100vw * (10 / 1920));
  685. .reset1 {
  686. color: #2e8aecff;
  687. background: transparent;
  688. border: 1px solid #2e8aecff;
  689. }
  690. }
  691. .main-right-table {
  692. width: calc(100vw * (1840 / 1920));
  693. height: calc(100vh * (930 / 1080));
  694. margin-left: calc(100vw * (8 / 1920));
  695. background: transparent;
  696. color: #7ea4c8ff;
  697. overflow: auto;
  698. }
  699. //表格底部
  700. .pagination-container {
  701. width: calc(100vw * (1810 / 1920));
  702. height: calc(100vh * (50 / 1080));
  703. background: transparent;
  704. padding: 0 !important;
  705. margin: 0;
  706. margin-left: calc(100vw * (20 / 1920));
  707. margin-top: calc(100vh * (10 / 1080));
  708. }
  709. }
  710. }
  711. //预览弹窗
  712. .dhk {
  713. width: calc(100vw * (1200 / 1920));
  714. height: calc(100vh * (850 / 1080));
  715. // background: salmon;
  716. background: #0F1540FF;
  717. position: absolute;
  718. top: 10%;
  719. left: 20%;
  720. z-index: 99;
  721. display: flex;
  722. justify-content: center;
  723. align-items: center;
  724. .gb {
  725. position: absolute;
  726. top: 0;
  727. right: 0;
  728. }
  729. video {
  730. width: calc(100vw * (1440 / 1920));
  731. height: calc(100vh * (810 / 1080));
  732. }
  733. .el-image {
  734. width: calc(100vw * (960 / 1920));
  735. height: calc(100vh * (720 / 1080));
  736. }
  737. .el-button-group {
  738. position: absolute;
  739. bottom: 0;
  740. left: 35%;
  741. }
  742. }
  743. //机密验证界面
  744. // .jm {
  745. // width: calc(100vw * (530 / 1920));
  746. // height: calc(100vh * (370 / 1080));
  747. // // background: salmon;
  748. // background: url(../../../assets/img/Group-585.png);
  749. // background-size: calc(100vw * (530 / 1920)) calc(100vh * (370 / 1080));
  750. // padding-top: calc(100vw * (50 / 1920));
  751. // position: absolute;
  752. // top: 25%;
  753. // left: 35%;
  754. // z-index: 99;
  755. // display: flex;
  756. // // justify-content: center;
  757. // align-items: center;
  758. // .gb1 {
  759. // position: absolute;
  760. // top: 10%;
  761. // right: 8%;
  762. // }
  763. // .el-button-group {
  764. // position: absolute;
  765. // top: 10%;
  766. // right: 1%;
  767. // }
  768. // }
  769. }
  770. //标签按钮
  771. ::v-deep .el-tag {
  772. color: #df9439ff;
  773. border: 1px solid #ff9839ff;
  774. background: #bba99240;
  775. margin-left: 3px;
  776. margin-bottom: 3px;
  777. height: calc(100vh * (35 / 1080));
  778. line-height: calc(100vh * (35 / 1080));
  779. }
  780. //右边顶部字体样式
  781. ::v-deep .el-form-item__label {
  782. color: #2e8aecff;
  783. }
  784. //右边顶部搜索框样式
  785. ::v-deep .el-input__inner {
  786. background-color: transparent;
  787. border: 1px solid #01d1ffff;
  788. color: #ffffffcc;
  789. }
  790. ::v-deep .el-form-item--small .el-form-item__content {
  791. width: calc(100vw * (220 / 1920));
  792. }
  793. //右边顶部标签搜索
  794. ::v-deep .el-select>.el-input {
  795. width: calc(100vw * (180 / 1920));
  796. }
  797. //右边表格线条隐藏
  798. ::v-deep .el-table::before {
  799. height: 0;
  800. }
  801. //table样式
  802. ::v-deep .el-table th {
  803. background: #016c9aa6;
  804. color: #2e8aec;
  805. }
  806. ::v-deep .el-table tr {
  807. background: transparent;
  808. }
  809. ::v-deep .el-table tbody tr:hover>td {
  810. background-color: #016c9a78 !important;
  811. }
  812. ::v-deep .el-table td.el-table__cell {
  813. border-bottom: 1px solid #006c9aff;
  814. }
  815. ::v-deep .el-table th.el-table__cell.is-leaf {
  816. border-bottom: 1px solid #006c9aff;
  817. }
  818. //按钮的样式
  819. ::v-deep .el-button--primary.is-plain,
  820. .el-button--success.is-plain.is-disabled,
  821. .el-button--danger.is-plain.is-disabled,
  822. .el-button--warning.is-plain,
  823. .el-button--success.is-plain,
  824. .el-button--danger.is-plain {
  825. background-color: #002a5cff;
  826. border: none;
  827. color: #2e8aec;
  828. }
  829. //新增/修改弹窗样式
  830. ::v-deep .el-dialog__title {
  831. color: white;
  832. }
  833. ::v-deep .el-dialog .el-form-item {
  834. margin-top: calc(100vw * (30 / 1920));
  835. }
  836. ::v-deep .el-upload-list__item:hover {
  837. background: #002659ff;
  838. }
  839. //建议框样式
  840. ::v-deep .el-textarea__inner {
  841. background: transparent;
  842. resize: none;
  843. }
  844. //传文件的内容颜色
  845. ::v-deep .el-link.el-link--default {
  846. color: #006c9aff;
  847. }
  848. //上传弹窗位置高度
  849. ::v-deep .el-dialog:not(.is-fullscreen) {
  850. margin-top: 1vh !important;
  851. }
  852. //弹窗
  853. ::v-deep .el-dialog5 {
  854. width: calc(100vw * (800 / 1920)) !important;
  855. height: calc(100vh * (1050 / 1080)) !important;
  856. background: url(../../../assets/img/Group-585.png);
  857. background-size: calc(100vw * (800 / 1920)) calc(100vh * (1050 / 1080));
  858. //弹窗中间内容
  859. .el-dialog__body {
  860. // width: calc(100vw * (620 / 1920)) ;
  861. height: calc(100vh * (780 / 1080));
  862. margin-top: calc(100vh * (50 / 1080));
  863. margin-bottom: calc(100vh * (20 / 1080));
  864. padding-right: 50px;
  865. overflow: auto;
  866. // background: salmon;
  867. }
  868. .el-dialog__header {
  869. padding-bottom: 0;
  870. }
  871. .el-upload__tip {
  872. font-size: 12px;
  873. color: #006c9aff;
  874. margin-top: 0px;
  875. }
  876. .el-upload-list__item {
  877. margin: 0;
  878. }
  879. .el-tag+.el-tag {
  880. margin-left: 10px;
  881. }
  882. .button-new-tag {
  883. margin-left: 10px;
  884. height: 32px;
  885. line-height: 30px;
  886. padding-top: 0;
  887. padding-bottom: 0;
  888. }
  889. .input-new-tag {
  890. width: 90px;
  891. margin-left: 10px;
  892. vertical-align: bottom;
  893. }
  894. }
  895. </style>