index.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955
  1. <template>
  2. <div class="app-container">
  3. <el-form
  4. :model="queryParams"
  5. ref="queryForm"
  6. :inline="true"
  7. v-show="showSearch"
  8. label-width="68px"
  9. >
  10. <el-form-item prop="deptName">
  11. <el-input
  12. placeholder="请输入单位"
  13. v-model="queryParams.deptName"
  14. @input="handleQuery"
  15. />
  16. </el-form-item>
  17. <el-form-item label="" prop="kind">
  18. <el-select
  19. v-model="queryParams.kind"
  20. placeholder="请选择分类"
  21. clearable
  22. size="small"
  23. @change="secrecy"
  24. >
  25. <el-option
  26. :label="item.dictLabel"
  27. :value="item.dictLabel"
  28. v-for="(item, i) in ziDian"
  29. :key="i"
  30. class="input_xiala"
  31. />
  32. </el-select>
  33. </el-form-item>
  34. <el-form-item prop="confidential">
  35. <el-input
  36. v-model="queryParams.confidential"
  37. placeholder="请输入密级"
  38. clearable
  39. size="small"
  40. @input="handleQuery"
  41. />
  42. </el-form-item>
  43. <el-form-item>
  44. <el-button size="btr" @click="resetQuery">重置</el-button>
  45. </el-form-item>
  46. </el-form>
  47. <el-row :gutter="10" class="mb8">
  48. <el-col :span="1.5">
  49. <el-button
  50. type="primary"
  51. plain
  52. icon="el-icon-plus"
  53. size="mini"
  54. @click="handleAdd"
  55. v-hasPermi="['grassrootsregistration:bdglsecrecy:add']"
  56. >新增</el-button
  57. >
  58. </el-col>
  59. <!-- <el-col :span="1.5">
  60. <el-button
  61. type="success"
  62. plain
  63. icon="el-icon-edit"
  64. size="mini"
  65. :disabled="single"
  66. @click="handleUpdate"
  67. v-hasPermi="['grassrootsregistration:bdglsecrecy:edit']"
  68. >修改</el-button
  69. >
  70. </el-col>
  71. <el-col :span="1.5">
  72. <el-button
  73. type="danger"
  74. plain
  75. icon="el-icon-delete"
  76. size="mini"
  77. :disabled="multiple"
  78. @click="handleDelete"
  79. v-hasPermi="['grassrootsregistration:bdglsecrecy:remove']"
  80. >删除</el-button
  81. >
  82. </el-col>
  83. <el-col :span="1.5">
  84. <el-button
  85. type="warning"
  86. plain
  87. icon="el-icon-download"
  88. size="mini"
  89. :loading="exportLoading"
  90. @click="handleExport"
  91. v-hasPermi="['grassrootsregistration:bdglsecrecy:export']"
  92. >导出</el-button
  93. >
  94. </el-col> -->
  95. </el-row>
  96. <el-table
  97. v-loading="loading"
  98. :data="bdglsecrecyList"
  99. @selection-change="handleSelectionChange"
  100. :header-cell-style="{ background: '#003C69', color: 'white' }"
  101. style="width: 100%"
  102. >
  103. <el-table-column type="selection" width="55" align="center" />
  104. <!-- <el-table-column label="序号" align="center" prop="id" /> -->
  105. <el-table-column label="序号" type="index" width="50" align="center">
  106. <template scope="scope">
  107. <span>{{
  108. (queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1
  109. }}</span>
  110. </template>
  111. </el-table-column>
  112. <el-table-column
  113. label="单位"
  114. align="center"
  115. prop="deptName"
  116. width="150"
  117. />
  118. <el-table-column label="分类" align="center" prop="kind" />
  119. <el-table-column label="编号" align="center" prop="number" />
  120. <el-table-column label="密级" align="center" prop="confidential" />
  121. <el-table-column label="责任人" align="center" prop="peopleName" />
  122. <el-table-column label="使用人" align="center" prop="people1Name" />
  123. <el-table-column label="批准人" align="center" prop="people2Name" />
  124. <el-table-column
  125. label="起用时间"
  126. align="center"
  127. prop="startTime"
  128. width="160"
  129. >
  130. <template slot-scope="scope">
  131. <span>{{ parseTime(scope.row.startTime, "{y}-{m}-{d}") }}</span>
  132. </template>
  133. </el-table-column>
  134. <el-table-column
  135. label="停用时间"
  136. align="center"
  137. prop="endTime"
  138. width="160"
  139. >
  140. <template slot-scope="scope">
  141. <span>{{ parseTime(scope.row.endTime, "{y}-{m}-{d}") }}</span>
  142. </template>
  143. </el-table-column>
  144. <el-table-column
  145. label="移交时间"
  146. align="center"
  147. prop="hindOverTime"
  148. width="160"
  149. >
  150. <template slot-scope="scope">
  151. <span>{{ parseTime(scope.row.hindOverTime, "{y}-{m}-{d}") }}</span>
  152. </template>
  153. </el-table-column>
  154. <el-table-column
  155. label="操作"
  156. align="center"
  157. class-name="small-padding fixed-width"
  158. width="200"
  159. >
  160. <template slot-scope="scope">
  161. <el-button
  162. size="btk"
  163. type="text"
  164. @click="handleChakan(scope.row)"
  165. v-hasPermi="['grassrootsregistration:bdgldiary:edit']"
  166. ><span class="chakan">查看</span></el-button
  167. >
  168. <el-button
  169. size="btu"
  170. type="text"
  171. @click="handleUpdate(scope.row)"
  172. v-hasPermi="['grassrootsregistration:bdglsecrecy:edit']"
  173. ><span class="edit">修改</span></el-button
  174. >
  175. <el-button
  176. size="btd"
  177. type="text"
  178. @click="handleDelete(scope.row)"
  179. v-hasPermi="['grassrootsregistration:bdglsecrecy:remove']"
  180. ><span class="delete">删除</span></el-button
  181. >
  182. </template>
  183. </el-table-column>
  184. </el-table>
  185. <pagination
  186. v-show="total > 0"
  187. :total="total"
  188. :page.sync="queryParams.pageNum"
  189. :limit.sync="queryParams.pageSize"
  190. @pagination="getList"
  191. />
  192. <!-- 添加或修改网络/手机/涉密载体登记本对话框 -->
  193. <el-dialog
  194. :title="title"
  195. :visible.sync="open"
  196. width="1016px"
  197. append-to-body
  198. :close-on-click-modal="false"
  199. >
  200. <div class="jiben">基本信息</div>
  201. <el-form
  202. ref="form"
  203. :model="form"
  204. :rules="rules"
  205. label-width="80px"
  206. :inline="true"
  207. >
  208. <el-form-item label="单位" prop="unitId">
  209. <treeselect
  210. v-model="form.unitId"
  211. :options="deptOptions"
  212. placeholder="请选择单位"
  213. @select="selectPeo"
  214. @open="blurSelect"
  215. />
  216. </el-form-item>
  217. <el-form-item label="种类" prop="kind">
  218. <el-select v-model="form.kind" placeholder="请选择种类">
  219. <el-option
  220. v-for="(item, i) in ziDian"
  221. :label="item.bb"
  222. :key="i"
  223. :value="item.dictLabel"
  224. class="input_xiala"
  225. >
  226. </el-option>
  227. </el-select>
  228. </el-form-item>
  229. <el-form-item label="编号" prop="number">
  230. <el-input v-model="form.number" placeholder="请输入编号" />
  231. </el-form-item>
  232. <el-form-item label="型号" prop="version">
  233. <el-input v-model="form.version" placeholder="请输入型号" />
  234. </el-form-item>
  235. <el-form-item label="密级" prop="confidential">
  236. <el-input v-model="form.confidential" placeholder="请输入密级" />
  237. </el-form-item>
  238. <el-form-item label="责任人" prop="peopleId">
  239. <el-select v-model="form.peopleId" placeholder="请选择负责人">
  240. <el-option
  241. v-for="(item, i) in renYuan"
  242. :key="i"
  243. :label="item.name"
  244. :value="item.id"
  245. @click.native="zheRenRe(item.name)"
  246. class="input_xiala"
  247. >
  248. </el-option>
  249. </el-select>
  250. </el-form-item>
  251. <el-form-item label="使用人" prop="peopleId1">
  252. <el-select
  253. ref="aa"
  254. v-model="form.peopleId1"
  255. placeholder="请选择使用人"
  256. >
  257. <el-option
  258. v-for="(item, i) in renYuan"
  259. :key="i"
  260. :label="item.name"
  261. :value="item.id"
  262. @click.native="shiYongRen(item.name)"
  263. class="input_xiala"
  264. >
  265. </el-option>
  266. </el-select>
  267. </el-form-item>
  268. <el-form-item label="批准人" prop="peopleId2">
  269. <el-select v-model="form.peopleId2" placeholder="请选择批准人">
  270. <el-option
  271. v-for="(item, i) in renYuan"
  272. :key="i"
  273. :label="item.name"
  274. :value="item.id"
  275. @click.native="piZhuiRen(item.name)"
  276. class="input_xiala"
  277. >
  278. </el-option>
  279. </el-select>
  280. </el-form-item>
  281. <el-form-item label="起用时间" prop="startTime">
  282. <el-date-picker
  283. clearable
  284. size="small"
  285. v-model="form.startTime"
  286. type="date"
  287. :editable="false"
  288. value-format="yyyy-MM-dd"
  289. placeholder="请选择起用时间"
  290. @change="timeDay"
  291. >
  292. </el-date-picker>
  293. </el-form-item>
  294. <el-form-item label="停用时间" prop="endTime">
  295. <el-date-picker
  296. ref="bb"
  297. clearable
  298. size="small"
  299. v-model="form.endTime"
  300. type="date"
  301. :editable="false"
  302. value-format="yyyy-MM-dd"
  303. placeholder="请选择停用时间"
  304. >
  305. </el-date-picker>
  306. </el-form-item>
  307. <el-form-item label="移交时间" prop="hindOverTime">
  308. <el-date-picker
  309. clearable
  310. size="small"
  311. v-model="form.hindOverTime"
  312. type="date"
  313. :editable="false"
  314. value-format="yyyy-MM-dd"
  315. placeholder="请选择移交时间"
  316. >
  317. </el-date-picker>
  318. </el-form-item>
  319. </el-form>
  320. <div slot="footer" class="dialog-footer">
  321. <el-button type="primary" @click="submitForm(1)">确 定</el-button>
  322. <el-button @click="cancel" size="btn">取消</el-button>
  323. </div>
  324. </el-dialog>
  325. <div class="fff">
  326. <el-dialog
  327. :visible.sync="menuRoleVisible"
  328. :title="title"
  329. append-to-body
  330. id="chakan"
  331. :close-on-click-modal="false"
  332. >
  333. <bdglsecrecy
  334. v-if="menuRoleVisible"
  335. ref="menuRole"
  336. :message="wordInfo"
  337. ></bdglsecrecy>
  338. </el-dialog>
  339. </div>
  340. </div>
  341. </template>
  342. <script>
  343. import bdglsecrecy from "@/components/look_word/bdglsecrecy.vue";
  344. import {
  345. listBdglsecrecy,
  346. getBdglsecrecy,
  347. delBdglsecrecy,
  348. addBdglsecrecy,
  349. updateBdglsecrecy,
  350. exportBdglsecrecy,
  351. units,
  352. } from "@/api/grassrootsregistration/bdglsecrecy";
  353. import Treeselect from "@riophae/vue-treeselect";
  354. import "@riophae/vue-treeselect/dist/vue-treeselect.css";
  355. import { getDicts } from "@/api/system/dict/data";
  356. import {
  357. getZhuChiRen,
  358. getDept,
  359. } from "@/api/grassrootsregistration/bdglmeeting";
  360. import { jieZhiList } from "@/api/grassrootsregistration/bdgldiary";
  361. export default {
  362. name: "Bdglsecrecy",
  363. components: { Treeselect, bdglsecrecy },
  364. data() {
  365. return {
  366. //查看页面
  367. menuRoleVisible: false,
  368. wordInfo: [],
  369. //判断关闭
  370. style: "2",
  371. // 遮罩层
  372. loading: true,
  373. // 导出遮罩层
  374. exportLoading: false,
  375. // 选中数组
  376. ids: [],
  377. // 非单个禁用
  378. single: true,
  379. // 非多个禁用
  380. multiple: true,
  381. // 显示搜索条件
  382. showSearch: true,
  383. // 总条数
  384. total: 0,
  385. // 网络/手机/涉密载体登记本表格数据
  386. bdglsecrecyList: [],
  387. // 弹出层标题
  388. title: "",
  389. // 是否显示弹出层
  390. open: false,
  391. // 查询参数
  392. queryParams: {
  393. pageNum: 1,
  394. pageSize: 10,
  395. secrecyType: null,
  396. number: null,
  397. name: null,
  398. kind: null,
  399. version: null,
  400. confidential: null,
  401. peopleId: null,
  402. peopleId1: null,
  403. peopleId2: null,
  404. startTime: null,
  405. endTime: null,
  406. hindOverTime: null,
  407. unitId: null,
  408. },
  409. // 表单参数
  410. form: {},
  411. // 表单校验
  412. rules: {
  413. unitId: [
  414. { required: true, message: "单位名称不能为空", trigger: "blur" },
  415. ],
  416. kind: [{ required: true, message: "种类不能为空", trigger: "blur" }],
  417. confidential: [
  418. { required: true, message: "密级不能为空", trigger: "blur" },
  419. ],
  420. peopleId: [
  421. { required: true, message: "责任人不能为空", trigger: "blur" },
  422. ],
  423. peopleId1: [
  424. { required: true, message: "使用人不能为空", trigger: "blur" },
  425. ],
  426. peopleId2: [
  427. { required: true, message: "批准人不能为空", trigger: "blur" },
  428. ],
  429. startTime: [
  430. { required: true, message: "起用时间不能为空", trigger: "blur" },
  431. ],
  432. },
  433. //下拉
  434. options: [],
  435. // 部门树结构
  436. deptOptions: [],
  437. // 查询字典
  438. dictType: {
  439. dictType: "electronic",
  440. },
  441. // 字典列表
  442. ziDian: [],
  443. // 人员列表
  444. renYuan: [],
  445. // 树形配置对象
  446. defaultProps: {
  447. children: "children",
  448. label: "label",
  449. },
  450. form1: {},
  451. // 当月日期
  452. current_month: [],
  453. // 下月日期
  454. current_month1: [],
  455. // 日期开关状态
  456. dayTime: null,
  457. };
  458. },
  459. created() {
  460. this.getList();
  461. this.getdict();
  462. this.getYear();
  463. // 获取当月
  464. this.getDay();
  465. // 获取下月
  466. this.getDayX();
  467. jieZhiList().then((res) => {
  468. this.dayTime = res.rows[0].time;
  469. });
  470. },
  471. methods: {
  472. // 获取当月日期
  473. getDay() {
  474. // 获取标准时间
  475. let now = new Date();
  476. // 年
  477. var year = new Date().getFullYear();
  478. // 月
  479. var month = new Date().getMonth() + 1;
  480. // 日
  481. var day = new Date(year, month, 0).getDate();
  482. // console.log(now);
  483. let current_month_num = day;
  484. this.current_month = [];
  485. for (let i = 1; i <= current_month_num; i++) {
  486. let day = now.setDate(i);
  487. let date = new Date(day); //时间戳为10位需*1000,时间戳为13位的话不需乘1000
  488. let Y = date.getFullYear() + "-";
  489. let M =
  490. (date.getMonth() + 1 < 10
  491. ? "0" + (date.getMonth() + 1)
  492. : date.getMonth() + 1) + "-";
  493. let D =
  494. (date.getDate() < 10 ? "0" + date.getDate() : date.getDate()) + "";
  495. this.current_month.push(Y + M + D);
  496. // console.log(this.current_month);
  497. }
  498. },
  499. // 获取下个月日期
  500. getDayX() {
  501. // 获取标准时间
  502. let now = new Date();
  503. // 年
  504. var year = new Date().getFullYear();
  505. // 月
  506. var month = new Date().getMonth() + 2;
  507. // 日
  508. var day = new Date(year, month, 0).getDate();
  509. let current_month_num1 = day;
  510. for (let i = 1; i <= current_month_num1; i++) {
  511. let day = now.setDate(i);
  512. let date = new Date(day); //时间戳为10位需*1000,时间戳为13位的话不需乘1000
  513. let Y = date.getFullYear() + "-";
  514. let M =
  515. (date.getMonth() + 2 < 10
  516. ? "0" + (date.getMonth() + 2)
  517. : date.getMonth() + 2) + "-";
  518. let D =
  519. (date.getDate() < 10 ? "0" + date.getDate() : date.getDate()) + "";
  520. this.current_month.push(Y + M + D);
  521. }
  522. },
  523. timeDay(val) {
  524. var date1 = Math.round(new Date(val) / 1000);
  525. // 当月时间
  526. this.current_month.forEach((element) => {
  527. // 十号之前是1675987200
  528. var date2 = Math.round(new Date(element) / 1000);
  529. if (date1 > 1675987200 && this.dayTime == 1) {
  530. this.$confirm("请在规定时间内填写", "提示", {
  531. confirmButtonText: "确定",
  532. cancelButtonText: "取消",
  533. type: "warning",
  534. })
  535. .then(() => {
  536. this.form.startTime = null;
  537. })
  538. .catch(() => {
  539. this.form.startTime = null;
  540. });
  541. }
  542. if (date1 < 1672501850 && this.dayTime == 1) {
  543. this.$confirm("请在规定时间内填写", "提示", {
  544. confirmButtonText: "确定",
  545. cancelButtonText: "取消",
  546. type: "warning",
  547. })
  548. .then(() => {
  549. this.form.startTime = null;
  550. })
  551. .catch(() => {
  552. this.form.startTime = null;
  553. });
  554. }
  555. });
  556. },
  557. // 获取当前年
  558. getYear() {
  559. var myDate = new Date();
  560. var tYear = myDate.getFullYear();
  561. this.form1.year = tYear;
  562. },
  563. // 种类选择触发
  564. // zhongLei() {
  565. // this.planName();
  566. // },
  567. // 计划编号
  568. planName() {
  569. let date = new Date();
  570. let year = date.getFullYear();
  571. let month =
  572. date.getMonth() + 1 <= 9
  573. ? "0" + (date.getMonth() + 1)
  574. : date.getMonth() + 1;
  575. let day = date.getDate();
  576. let hour = date.getHours() <= 9 ? "0" + date.getHours() : date.getHours();
  577. let minute =
  578. date.getMinutes <= 9 ? "0" + date.getMinutes() : date.getMinutes();
  579. this.form.number = year + month + day + hour + minute;
  580. },
  581. // 重置表单人员
  582. ChongZhiRen() {
  583. // 批准人
  584. (this.form.peopleId2 = null),
  585. // 使用人
  586. (this.form.peopleId1 = null),
  587. // 责任人
  588. (this.form.peopleId = null);
  589. },
  590. // 获取主持人
  591. getZhuChi(id) {
  592. getZhuChiRen(id).then((res) => {
  593. this.renYuan = res.data;
  594. });
  595. },
  596. // 单位选择触发
  597. selectPeo(val) {
  598. this.ChongZhiRen();
  599. this.form.unitId = val.id;
  600. // 获取人员
  601. this.getZhuChi(this.form.unitId);
  602. },
  603. /** 查询网络/手机/涉密载体登记本列表 */
  604. getList() {
  605. this.loading = true;
  606. listBdglsecrecy(this.queryParams).then((response) => {
  607. this.bdglsecrecyList = response.rows;
  608. this.total = response.total;
  609. this.loading = false;
  610. });
  611. },
  612. /** 查询部门下拉树结构 */
  613. getTreeselect() {
  614. getDept().then((response) => {
  615. this.deptOptions = response.data;
  616. });
  617. },
  618. // 查询电子产品
  619. getdict() {
  620. getDicts(this.dictType.dictType).then((res) => {
  621. this.ziDian = res.data;
  622. });
  623. },
  624. // 选中添加部门单位触发
  625. department() {
  626. getZhuChiRen(this.form.unitId).then((res) => {
  627. this.renYuan = res.data;
  628. });
  629. },
  630. // 选中责任人触发
  631. zheRenRe(name) {
  632. // this.form.peopleId = val.id;
  633. this.form.peopleName = name;
  634. },
  635. // 选中使用人触发
  636. shiYongRen(name) {
  637. this.form.people1Name = name;
  638. },
  639. // 选中批准人触发
  640. piZhuiRen(name) {
  641. // this.form.peopleId2 = val.id;
  642. this.form.people2Name = name;
  643. },
  644. // 搜索选中分类触发
  645. secrecy() {
  646. this.getList();
  647. },
  648. // 取消按钮
  649. cancel() {
  650. this.open = false;
  651. this.reset();
  652. },
  653. // 表单重置
  654. reset() {
  655. this.form = {
  656. id: null,
  657. secrecyType: null,
  658. number: null,
  659. name: null,
  660. kind: null,
  661. version: null,
  662. confidential: null,
  663. peopleId: null,
  664. peopleId1: null,
  665. peopleId2: null,
  666. startTime: null,
  667. endTime: null,
  668. hindOverTime: null,
  669. unitId: null,
  670. };
  671. this.resetForm("form");
  672. },
  673. /** 搜索按钮操作 */
  674. handleQuery() {
  675. this.queryParams.pageNum = 1;
  676. this.getList();
  677. },
  678. /** 重置按钮操作 */
  679. resetQuery() {
  680. this.reset();
  681. this.resetForm("queryForm");
  682. this.handleQuery();
  683. },
  684. /** 对话框重置按钮操作 */
  685. resertwo() {
  686. this.reset();
  687. },
  688. // 让select失去焦点
  689. blurSelect() {
  690. this.$refs.aa.blur();
  691. this.$refs.bb.blur();
  692. },
  693. // 多选框选中数据
  694. handleSelectionChange(selection) {
  695. this.ids = selection.map((item) => item.id);
  696. this.single = selection.length !== 1;
  697. this.multiple = !selection.length;
  698. },
  699. /** 新增按钮操作 */
  700. handleAdd() {
  701. // 人员列表
  702. (this.renYuan = []),
  703. // 获取分类
  704. this.reset();
  705. this.getTreeselect();
  706. // 查询字典
  707. this.getdict();
  708. this.style = 2;
  709. this.open = true;
  710. this.title = "添加网络/手机/涉密载体登记本";
  711. },
  712. /** 修改按钮操作 */
  713. handleUpdate(row) {
  714. // 获取分类
  715. this.getdict();
  716. this.form.unitId = row.unitId;
  717. this.getZhuChi(this.form.unitId);
  718. this.reset();
  719. this.getTreeselect();
  720. const id = row.id || this.ids;
  721. getBdglsecrecy(id).then((response) => {
  722. this.form = response.data;
  723. this.open = true;
  724. this.title = "修改网络/手机/涉密载体登记本";
  725. });
  726. },
  727. //查看按钮操作
  728. handleChakan(row) {
  729. this.form1.unitid = row.unitId;
  730. // 是否隐藏按钮
  731. this.opens = false;
  732. const id = row.id || this.ids;
  733. units(this.form1).then((response) => {
  734. this.wordInfo = response.data;
  735. this.title = "查看网络/手机/涉密载体登记本";
  736. this.menuRoleVisible = true;
  737. });
  738. },
  739. /** 提交按钮 */
  740. submitForm(style) {
  741. this.style = style;
  742. this.$refs["form"].validate((valid) => {
  743. if (valid) {
  744. if (this.form.id != null) {
  745. updateBdglsecrecy(this.form).then((response) => {
  746. this.$modal.msgSuccess("修改成功");
  747. this.open = false;
  748. this.getList();
  749. });
  750. } else {
  751. addBdglsecrecy(this.form).then((response) => {
  752. this.$modal.msgSuccess("新增成功");
  753. this.open = false;
  754. this.getList();
  755. });
  756. }
  757. }
  758. });
  759. },
  760. /** 删除按钮操作 */
  761. handleDelete(row) {
  762. const ids = row.id || this.ids;
  763. this.$modal
  764. // .confirm(
  765. // '是否确认删除网络/手机/涉密载体登记本编号为"' + ids + '"的数据项?'
  766. // )
  767. .confirm("是否确认删除该数据?")
  768. .then(function () {
  769. return delBdglsecrecy(ids);
  770. })
  771. .then(() => {
  772. this.getList();
  773. this.$modal.msgSuccess("删除成功");
  774. })
  775. .catch(() => {});
  776. },
  777. /** 导出按钮操作 */
  778. handleExport() {
  779. const queryParams = this.queryParams;
  780. this.$modal
  781. .confirm("是否确认导出所有网络/手机/涉密载体登记本数据项?")
  782. .then(() => {
  783. this.exportLoading = true;
  784. return exportBdglsecrecy(queryParams);
  785. })
  786. .then((response) => {
  787. this.$download.name(response.msg);
  788. this.exportLoading = false;
  789. })
  790. .catch(() => {});
  791. },
  792. },
  793. };
  794. </script>
  795. <style scoped>
  796. /* 对话框背景颜色 */
  797. ::v-deep .el-dialog {
  798. background: #004d86 !important;
  799. }
  800. ::v-deep .el-textarea__inner {
  801. width: 882px;
  802. height: 104px;
  803. }
  804. ::v-deep .el-dialog__header {
  805. border-bottom: 1px solid #718a9d;
  806. }
  807. ::v-deep .el-dialog__title {
  808. color: #fff;
  809. font: 18px;
  810. }
  811. ::v-deep .el-dialog__headerbtn .el-dialog__close {
  812. color: #fff;
  813. }
  814. ::v-deep .el-form-item__label {
  815. font: 16px;
  816. color: #fff;
  817. width: 100px !important;
  818. }
  819. ::v-deep .el-input__inner {
  820. /* width: 200px !important;
  821. height: 36px; */
  822. background: transparent;
  823. color: #fff;
  824. border: 1px solid white !important;
  825. border-color: #fff !important;
  826. }
  827. /* 单位框背景颜色 */
  828. ::v-deep .vue-treeselect__control {
  829. background: #004d86 !important;
  830. }
  831. /* 基本信息背景 */
  832. .jiben {
  833. width: 920px;
  834. height: 32px;
  835. background-image: url(../../../images/小标题底.png);
  836. margin-bottom: 25px;
  837. color: #fff;
  838. padding-left: 16px;
  839. line-height: 32px;
  840. }
  841. ::v-deep .el-dialog__body {
  842. margin: 10px 30px 20px 50px;
  843. padding-top: 20px !important;
  844. box-sizing: border-box;
  845. /* padding: 30px 12px 30px 28px; */
  846. }
  847. /*调整表单间距 */
  848. ::v-deep .el-form-item__content {
  849. width: 200px;
  850. }
  851. .contents {
  852. padding: 0px 40px !important;
  853. }
  854. /* 下拉菜单 */
  855. .el-dropdown-link {
  856. cursor: pointer;
  857. color: #409eff;
  858. }
  859. .el-icon-arrow-down {
  860. font-size: 12px;
  861. }
  862. /* 刷新图标 */
  863. /* .el-icon-refresh {
  864. width: 76px;
  865. height: 36px;
  866. color: #fff;
  867. background-color: #1d96ff !important;
  868. border-radius: 4px;
  869. border: none;
  870. margin-left: 20px;
  871. font-size: 14px;
  872. } */
  873. /* 下拉菜单字体/背景颜色 */
  874. .el-select-dropdown__item.hover,
  875. .el-select-dropdown__item:hover {
  876. background-color: #004d86;
  877. color: #fff;
  878. }
  879. .el-select-dropdown__item {
  880. color: #fff;
  881. }
  882. /* 时间选择 */
  883. ::v-deep .el-input--small .el-input__inner {
  884. width: 200px;
  885. height: 36px;
  886. line-height: 36px;
  887. }
  888. .el-date-editor.el-input {
  889. width: 200px;
  890. height: 36px;
  891. line-height: 36px;
  892. }
  893. ::v-deep .el-date-editor.el-input .el-input__inner {
  894. height: 36px;
  895. line-height: 36px;
  896. }
  897. /* 单位框背景颜色 */
  898. ::v-deep .vue-treeselect__control {
  899. background: #004d86 !important;
  900. color: #fff;
  901. }
  902. /* 单位下拉菜单选中字体颜色 */
  903. ::v-deep .vue-treeselect__single-value {
  904. color: #fff !important;
  905. }
  906. /* 分页按钮 */
  907. ::v-deep .el-pagination.is-background .el-pager li {
  908. background-color: #004d86;
  909. color: #fff;
  910. }
  911. ::v-deep .el-pagination.is-background .btn-next {
  912. background-color: #004d86;
  913. color: #fff;
  914. }
  915. ::v-deep .el-input__inner {
  916. cursor: pointer !important;
  917. }
  918. /* 底部确定取消按钮 */
  919. ::v-deep .el-dialog__footer {
  920. padding: 18px 40px 30px 0px;
  921. margin-right: 32px;
  922. }
  923. /* 增加按钮弹框 */
  924. ::v-deep .el-dialog {
  925. width: 1060px !important;
  926. }
  927. ::v-deep .el-dialog__body {
  928. padding: none !important;
  929. }
  930. /* 文件编号背景颜色 */
  931. ::v-deep .el-input.is-disabled .el-input__inner {
  932. background: transparent !important;
  933. }
  934. /* 调整输入框提示文字颜色 */
  935. ::v-deep .vue-treeselect__placeholder {
  936. color: #bdbdbd4f !important;
  937. }
  938. ::v-deep input::-webkit-input-placeholder {
  939. color: #bdbdbd4f !important;
  940. }
  941. ::v-deep input:-moz-placeholder {
  942. color: #bdbdbd4f !important;
  943. }
  944. #chakan /deep/ .el-dialog__body {
  945. padding: 30px 0px 30px 15px;
  946. }
  947. </style>