knowledgeManagement.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988
  1. <template>
  2. <fullscreen :fullscreen.sync="fullscreen" class="container">
  3. <div class="container-box">
  4. <toolList @iconCli="iconCli" :tooltit="tooltit"></toolList>
  5. <el-row :gutter="20" style="height: 100%">
  6. <el-col :span="4" style="height: 100%">
  7. <el-input
  8. style="margin-top: 20px"
  9. placeholder="输入关键字进行过滤"
  10. v-model="filterText"
  11. >
  12. </el-input>
  13. <div class="choice-style">
  14. <div class="ant-alert-info ant-alert">
  15. <i style="color: #1890ff" class="el-icon-warning"></i>当前选择:{{
  16. actionName || "无"
  17. }}
  18. <div class="canel-style" @click="canelChoice" v-show="actionName">
  19. 取消选择
  20. </div>
  21. </div>
  22. </div>
  23. <div class="tree-box">
  24. <el-tree
  25. class="filter-tree"
  26. :data="treeData"
  27. node-key="id"
  28. :props="defaultProps"
  29. default-expand-all
  30. :filter-node-method="filterNode"
  31. @node-click="checkNode"
  32. ref="tree"
  33. ><span class="custom-tree-node" slot-scope="{ node }">
  34. <span>
  35. <span style="color: #009cff" class="iconfont icon-wenjianjia"></span>
  36. <!-- <span
  37. v-if="
  38. node.data.hasOwnProperty('children') &&
  39. node.data.children.length > 0
  40. "
  41. style="color: #009cff"
  42. class="iconfont icon-wenjianjia"
  43. ></span> -->
  44. <!-- <span
  45. v-else
  46. style="color: #fdb441"
  47. class="iconfont icon-wenjian"
  48. ></span> -->
  49. <span
  50. :style="
  51. node.data.hasOwnProperty('parent')
  52. ? 'font-size:14px;padding-left:5px'
  53. : 'font-size:12px;padding-left:5px'
  54. "
  55. >{{ node.data.title }}</span
  56. >
  57. </span>
  58. </span>
  59. </el-tree>
  60. </div>
  61. </el-col>
  62. <el-col :span="20" style="height: 100%">
  63. <div class="search">
  64. <mySearch
  65. :searchList="searchList"
  66. @searchInfo="searchInfo"
  67. ></mySearch>
  68. <el-button
  69. class="btn-check"
  70. size="medium"
  71. type="primary"
  72. @click="dialogCheck(1)"
  73. >添加
  74. </el-button>
  75. </div>
  76. <div class="tabbox">
  77. <el-table
  78. height="calc(100% - 40px)"
  79. class="com-table"
  80. ref="multipleTable"
  81. :data="tableData"
  82. tooltip-effect="dark"
  83. size="small"
  84. border
  85. style="width: 100%"
  86. v-loading="loading"
  87. @sort-change="sortChange"
  88. >
  89. <el-table-column prop="title" show-overflow-tooltip label="标题">
  90. </el-table-column>
  91. <el-table-column label="发布工号">
  92. <template slot-scope="scope">
  93. <span class="">{{ scope.row.handlerId }}</span>
  94. </template>
  95. </el-table-column>
  96. <el-table-column label="发布姓名">
  97. <template slot-scope="scope">
  98. <span>{{ $desensitization(scope.row.handler, 1) }}</span>
  99. </template>
  100. </el-table-column>
  101. <el-table-column
  102. prop="orgName"
  103. show-overflow-tooltip
  104. label="发布部门"
  105. >
  106. </el-table-column>
  107. <el-table-column prop="typeName" label="发布类型">
  108. </el-table-column>
  109. <el-table-column
  110. prop="catalogName"
  111. show-overflow-tooltip
  112. label="归属目录"
  113. >
  114. </el-table-column>
  115. <el-table-column
  116. prop="createTime"
  117. show-overflow-tooltip
  118. label="发布时间"
  119. width="140"
  120. >
  121. </el-table-column>
  122. <!-- <el-table-column prop="stsDesc" label="状态"> </el-table-column> -->
  123. <el-table-column
  124. prop="hits"
  125. width="90"
  126. label="点击量"
  127. sortable="custom"
  128. >
  129. </el-table-column>
  130. <el-table-column label="操作" width="250px" align="center">
  131. <template slot-scope="scope">
  132. <el-button
  133. size="mini"
  134. type="success"
  135. @click="collectionHandle(scope.row)"
  136. plain
  137. >{{
  138. scope.row.collection == "0" ? "点击收藏" : "取消收藏"
  139. }}</el-button
  140. >
  141. <el-button
  142. size="mini"
  143. type="primary"
  144. plain
  145. @click="dialogCheck(2, scope.row)"
  146. >查看</el-button
  147. >
  148. <el-button
  149. size="mini"
  150. v-if="scope.row.sts != 1"
  151. type="primary"
  152. plain
  153. @click="dialogCheck(3, scope.row)"
  154. >修改</el-button
  155. >
  156. <el-button
  157. size="mini"
  158. v-if="scope.row.sts != 1"
  159. type="danger"
  160. plain
  161. @click="delLine(scope.row)"
  162. >
  163. 删除</el-button
  164. >
  165. </template>
  166. </el-table-column>
  167. </el-table>
  168. <el-pagination
  169. class="pageBox"
  170. @current-change="currchange"
  171. layout="prev, pager, next"
  172. background
  173. :total="total"
  174. >
  175. </el-pagination></div
  176. ></el-col>
  177. </el-row>
  178. <el-dialog
  179. :title="titname + '知识'"
  180. :visible.sync="dialogStatus"
  181. width="50%"
  182. :close-on-press-escape="false"
  183. :show-close="true"
  184. :fullscreen="fullscreen"
  185. :before-close="closedia"
  186. :destroy-on-close="true"
  187. :modal-append-to-body="false"
  188. :close-on-click-modal="false"
  189. >
  190. <div slot="title">
  191. <div>
  192. {{ titname + "知识"
  193. }}<i
  194. class="el-icon-full-screen"
  195. style="float: right; margin-right: 30px"
  196. @click="
  197. () => {
  198. fullscreen = !fullscreen;
  199. }
  200. "
  201. ></i>
  202. </div>
  203. </div>
  204. <div v-loading="loadinged">
  205. <el-form
  206. v-if="titname != '查看'"
  207. :model="infolist"
  208. :style="fullscreen ? '' : 'height: 50vh; overflow-y: scroll'"
  209. ref="infolist"
  210. :rules="rules"
  211. >
  212. <div class="info-line">
  213. <el-form-item prop="title">
  214. <span>标题</span>
  215. <el-input v-model="infolist.title" placeholder="标题">
  216. </el-input>
  217. </el-form-item>
  218. <el-form-item prop="type">
  219. <span>发布类型</span>
  220. <el-select
  221. :popper-append-to-body="false"
  222. v-model="infolist.type"
  223. placeholder="发布类型"
  224. clearable
  225. @change="verifcheck(1)"
  226. >
  227. <el-option
  228. v-for="item in knowledge.type.options"
  229. :key="item.dataCode"
  230. :label="item.dataName"
  231. :value="item.dataCode"
  232. >
  233. </el-option>
  234. </el-select>
  235. </el-form-item>
  236. </div>
  237. <el-form-item prop="catalogName" class="info-line online">
  238. <span>目录</span>
  239. <div class="treebox">
  240. <el-select
  241. v-model="infolist.catalogName"
  242. placeholder="请选择报表路径"
  243. ref="selectReport"
  244. >
  245. <el-option
  246. style="height:auto;background-color:#fff"
  247. :value="infolist.catalogName"
  248. :label="infolist.catalogName"
  249. >
  250. <el-tree
  251. :data="treeData"
  252. :props="defaultProps"
  253. @node-click="nodeClick"
  254. ></el-tree>
  255. </el-option>
  256. </el-select>
  257. </div>
  258. <!-- <div class="treebox tree">
  259. <p style="padding-left: 10px">
  260. 当前选择: <span>{{ infolist.catalogName }}</span>
  261. </p>
  262. <el-tree
  263. class="tree"
  264. :data="treeData"
  265. node-key="id"
  266. :props="defaultProps"
  267. @node-click="nodeClick"
  268. ></el-tree>
  269. </div> -->
  270. </el-form-item>
  271. <el-form-item class="info-line online" prop="text">
  272. <span>内容</span>
  273. <p-editor-tiny
  274. imgType="upload"
  275. v-model="infolist.text"
  276. ></p-editor-tiny>
  277. </el-form-item>
  278. <div style="padding-left: 80px">
  279. <myUpload
  280. @uploadBack="uploadBack"
  281. :fileInfo="fileInfo"
  282. :fileList="fileInfo.fileList"
  283. >
  284. </myUpload>
  285. </div>
  286. </el-form>
  287. <div v-loading="loadinged" v-else>
  288. <h3 style="text-align: center; margin: 10px 0">
  289. {{ infolist.title }}
  290. </h3>
  291. <div style="font-size: 12px; color: grey; margin: 10px 0">
  292. 发布时间:{{ infolist.createTime || "暂无" }} 发布人:{{
  293. infolist.handler || "暂无"
  294. }}
  295. </div>
  296. <div v-html="infolist.text"></div>
  297. <div style="margin: 10px 0">
  298. 附件:
  299. <uploadDown
  300. :datalist="datalist"
  301. :dialogStatus="uploadstatus"
  302. ></uploadDown>
  303. </div>
  304. </div>
  305. <div class="dialog-footer myfooter">
  306. <el-button
  307. type="primary"
  308. v-if="titname != '查看'"
  309. @click="dialogCli(1)"
  310. >保 存</el-button
  311. >
  312. <el-button @click="dialogCli(2)">取 消</el-button>
  313. </div>
  314. </div>
  315. </el-dialog>
  316. <myMessage
  317. :messTit="messTit"
  318. @closeMessage="closeMessage"
  319. :centerDialogVisible="centerDialogVisible"
  320. v-if="centerDialogVisible"
  321. ></myMessage>
  322. </div>
  323. </fullscreen>
  324. </template>
  325. <script>
  326. import myUpload from "../../../components/upload";
  327. import uploadDown from "../../../components/uploadDown";
  328. import mySearch from "../../../components/search";
  329. import toolList from "../../../components/toolList";
  330. import myMessage from "../../../components/myMessage.vue";
  331. export default {
  332. components: {
  333. myMessage,
  334. myUpload,
  335. uploadDown,
  336. mySearch,
  337. toolList,
  338. PEditorTiny: () =>
  339. import(
  340. /* webpackChunkName: "peditor-tiny" */ "../../../components/p-editor-tiny"
  341. ),
  342. },
  343. data() {
  344. const catalogName = (rule, value, callback) => {
  345. if (!this.infolist.catalogName) {
  346. callback(new Error("不能为空"));
  347. } else {
  348. callback();
  349. }
  350. };
  351. return {
  352. actionName: "",
  353. htmlS: "",
  354. filterText: "",
  355. choiceName: "", // 点击树提示当前选择项
  356. treeData: [], // 目录树数据
  357. defaultProps: {
  358. children: "children",
  359. label: "title",
  360. },
  361. fullscreen: false, // 是否全屏控制按钮
  362. rules: {
  363. type: [
  364. {
  365. required: true,
  366. trigger: "change",
  367. message: "请选择类型",
  368. },
  369. ],
  370. title: [
  371. {
  372. required: true,
  373. trigger: "blur",
  374. message: "请输入标题",
  375. },
  376. ],
  377. text: [
  378. {
  379. required: true,
  380. trigger: "blur",
  381. message: "请输入内容",
  382. },
  383. ],
  384. catalogName: [
  385. {
  386. required: true,
  387. trigger: "blur",
  388. message: "请选择目录",
  389. validator: catalogName,
  390. },
  391. ],
  392. },
  393. tooltit: "知识库管理",
  394. fileInfo: {
  395. limit: 5,
  396. url: "/market/cknowledgeatt/upload",
  397. fileList: [],
  398. },
  399. total: 0,
  400. pageSize: 1,
  401. knowledge: {
  402. type: {
  403. options: [],
  404. },
  405. },
  406. tableData: [], // 表格数据源
  407. dialogStatus: false, // 弹窗开启关闭
  408. infolist: {}, // 提交表单数据源
  409. typeOptions: [], // 类型数据源
  410. titname: "", // 操作名称 -- 新增、修改、查看
  411. fileList: [], // 回显附件数据源
  412. attList: [], // 修改附件数据源
  413. uploadstatus: false,
  414. userInfo: {}, // 登录用户信息
  415. searchList: [
  416. {
  417. type: "sel",
  418. tit: "类型",
  419. value: "",
  420. width: "100%",
  421. options: [],
  422. },
  423. {
  424. type: "input",
  425. tit: "标题",
  426. value: "",
  427. width: "100%",
  428. },
  429. {
  430. type: "sel",
  431. tit: "状态",
  432. value: "",
  433. width: "100%",
  434. options: [
  435. {
  436. dataCode: "0",
  437. dataName: "未收藏",
  438. },
  439. {
  440. dataCode: "1",
  441. dataName: "已收藏",
  442. },
  443. ],
  444. },
  445. ],
  446. params: {},
  447. centerDialogVisible: false,
  448. messTit: "",
  449. dataId: "",
  450. loading: false,
  451. loadinged: false,
  452. datalist: {
  453. url: "/market/compatt/downfile",
  454. type: 2,
  455. },
  456. };
  457. },
  458. methods: {
  459. canelChoice() {
  460. this.params.catalogId = "";
  461. this.actionName = "";
  462. this.getList(this.params, this.pageSize);
  463. },
  464. collectionHandle(val) {
  465. this.$http({
  466. url: "/market/cnewknowledgenet/collection",
  467. method: "post",
  468. headers: {
  469. "Content-Type": "application/json",
  470. },
  471. data: {
  472. id: val.id,
  473. collection: val.collection == "0" ? "1" : "0",
  474. },
  475. }).then((res) => {
  476. if (res.data.result === 1) {
  477. this.$message({
  478. message: res.data.desc,
  479. type: "error",
  480. });
  481. } else {
  482. this.$message({
  483. message: "成功",
  484. type: "success",
  485. });
  486. this.getList(this.params, this.pageSize);
  487. }
  488. });
  489. },
  490. sortChange(val) {
  491. if (val.prop == "hits") {
  492. this.params.hits = val.order;
  493. }
  494. this.getList(this.params, this.pageSize);
  495. },
  496. checkNode(index, data, node) {
  497. this.actionName = data.label;
  498. this.searchList.map((item) => {
  499. item.value = "";
  500. });
  501. this.params.type = "";
  502. this.params.title = "";
  503. this.params.collection = "";
  504. this.params.catalogId = data.key;
  505. this.getList(this.params, this.pageSize);
  506. },
  507. // 树筛选
  508. filterNode(value, data) {
  509. if (!value) return true;
  510. return data.title.indexOf(value) !== -1;
  511. },
  512. // 树点击
  513. nodeClick(index, data, node) {
  514. this.infolist.catalogName = data.data.title;
  515. this.infolist.catalogId = data.data.id;
  516. this.$forceUpdate();
  517. },
  518. // 获取树
  519. getTreeData() {
  520. this.$http({
  521. url: "/market/mkKnowledgeCatalogNet/queryList",
  522. method: "post",
  523. headers: {
  524. "Content-Type": "application/json",
  525. },
  526. data: {},
  527. }).then((res) => {
  528. this.treeData = res.data;
  529. });
  530. },
  531. // 关闭弹窗
  532. closedia() {
  533. this.fullscreen = false;
  534. this.infolist = {};
  535. this.dialogStatus = false;
  536. this.fileInfo.fileList = [];
  537. this.getList(this.params, this.pageSize);
  538. },
  539. // 上传回调
  540. uploadBack(v) {
  541. this.attList = v;
  542. },
  543. //搜索数据
  544. searchInfo(v) {
  545. this.params = {};
  546. v[0] ? (this.params.type = v[0]) : "";
  547. v[1] ? (this.params.title = v[1]) : "";
  548. v[2] ? (this.params.collection = v[2]) : "";
  549. this.getList(this.params, this.pageSize);
  550. },
  551. //获取列表
  552. getList(v, n) {
  553. this.pageSize = n;
  554. this.loading = true;
  555. this.tableData = [];
  556. this.$http({
  557. url: "/market/mkNewknowledgeNet/queryPage",
  558. method: "post",
  559. headers: {
  560. "Content-Type": "application/json",
  561. page: '{"pageNo":"' + n + '","pageSize":"10"}',
  562. },
  563. data: v,
  564. }).then((res) => {
  565. this.tableData = res.data.data;
  566. this.total = res.data.totalRecord;
  567. this.loading = false;
  568. });
  569. },
  570. //字典类型
  571. getListype(v) {
  572. this.$http({
  573. url: "/market/mkKnowledgePubMsgTypeNet/queryList",
  574. method: "post",
  575. headers: {
  576. "Content-Type": "application/json",
  577. },
  578. data: {
  579. dictCode: "pubType",
  580. },
  581. }).then((res) => {
  582. let listopt = [];
  583. res.data.forEach((item) => {
  584. listopt.push({
  585. dataCode: item.id,
  586. dataName: item.pubType,
  587. });
  588. });
  589. this.searchList[0].options = listopt;
  590. this.knowledge.type.options = listopt;
  591. });
  592. },
  593. //功能栏
  594. iconCli(v) {
  595. if (v === 1) {
  596. this.getList(this.params, this.pageSize);
  597. }
  598. if (v === 2) {
  599. this.fullscreen = !this.fullscreen;
  600. // let isFullscreen =
  601. // document.body.scrollHeight == window.screen.height &&
  602. // document.body.scrollWidth == window.screen.width;
  603. // if (!isFullscreen) {
  604. // this.requestFullscreen();
  605. // } else {
  606. // this.exitFullscreen();
  607. // }
  608. }
  609. },
  610. // 全屏
  611. requestFullscreen() {
  612. const element = element || document.documentElement;
  613. if (element.requestFullscreen) {
  614. element.requestFullscreen();
  615. } else if (element.msRequestFullscreen) {
  616. element.msRequestFullscreen();
  617. } else if (element.mozRequestFullScreen) {
  618. element.mozRequestFullScreen();
  619. } else if (element.webkitRequestFullscreen) {
  620. element.webkitRequestFullscreen();
  621. }
  622. },
  623. // 退出全屏
  624. exitFullscreen() {
  625. const element = element || document.documentElement;
  626. if (document.exitFullscreen) {
  627. document.exitFullscreen();
  628. } else if (document.msExitFullscreen) {
  629. document.msExitFullscreen();
  630. } else if (document.mozCancelFullScreen) {
  631. document.mozCancelFullScreen();
  632. } else if (document.webkitCancelFullScreen) {
  633. document.webkitCancelFullScreen();
  634. }
  635. },
  636. // 分页
  637. currchange(v) {
  638. this.pageSize = v;
  639. this.getList(this.params, this.pageSize);
  640. },
  641. //查看 修改 新增
  642. dialogCheck(v, n) {
  643. this.dialogStatus = true;
  644. this.infolist = {};
  645. if (v === 1) {
  646. this.titname = "新建";
  647. this.infolist = {};
  648. this.getUser();
  649. return;
  650. } else if (v === 2) {
  651. this.titname = "查看";
  652. this.loadinged = true;
  653. } else if (v === 3) {
  654. this.titname = "修改";
  655. this.loadinged = true;
  656. }
  657. this.$http({
  658. url: "/market/cnewknowledgenet/queryInfo",
  659. method: "post",
  660. headers: {
  661. "Content-Type": "application/json",
  662. },
  663. data: {
  664. id: n.id,
  665. },
  666. }).then((res) => {
  667. this.datalist.attList = res.data.attList;
  668. this.uploadstatus = true;
  669. this.infolist = res.data;
  670. this.fileInfo.fileList = [];
  671. this.attList = [];
  672. res.data.attList.forEach((item) => {
  673. this.fileInfo.fileList.push({
  674. name: item.fileName,
  675. url: "",
  676. id: item.id,
  677. fileName: item.fileName,
  678. fileCode: item.fileCode,
  679. opName: item.opName,
  680. opNo: item.opNo,
  681. opTime: item.opTime,
  682. });
  683. this.attList.push({
  684. name: item.fileName,
  685. url: "",
  686. id: item.id,
  687. fileName: item.fileName,
  688. fileCode: item.fileCode,
  689. opName: item.opName,
  690. opNo: item.opNo,
  691. opTime: item.opTime,
  692. });
  693. });
  694. this.loadinged = false;
  695. });
  696. },
  697. //添加 修改
  698. dialogCli(v) {
  699. this.uploadstatus = false;
  700. this.fileInfo.fileList = [];
  701. if (v === 2) {
  702. this.getUser();
  703. this.dialogStatus = false;
  704. this.getList(this.params, this.pageSize);
  705. return;
  706. }
  707. if (this.titname === "新建") {
  708. this.submitInfo("/market/cnewknowledgenet/addSave", v);
  709. } else if (this.titname === "修改") {
  710. this.submitInfo("/market/cnewknowledgenet/update ", v);
  711. }
  712. },
  713. submitInfo(u, v) {
  714. this.$refs.infolist.validate((valid) => {
  715. if (valid) {
  716. let attList = [];
  717. for (let i = 0; i < this.attList.length; i++) {
  718. attList.push({
  719. id: this.attList[i].id,
  720. fileCode: this.attList[i].fileCode,
  721. fileName: this.attList[i].fileName,
  722. opName: this.attList[i].opName,
  723. opNo: this.attList[i].opNo,
  724. opTime: this.attList[i].opTime,
  725. });
  726. }
  727. this.loadinged = true;
  728. this.$http({
  729. url: u,
  730. method: "post",
  731. headers: {
  732. "Content-Type": "application/json",
  733. },
  734. data: {
  735. newKnowleDge: this.infolist,
  736. attList: attList,
  737. },
  738. }).then((res) => {
  739. this.loadinged = false;
  740. if (res.data.result === 1) {
  741. this.$message({
  742. message: res.data.desc,
  743. type: "error",
  744. });
  745. } else {
  746. this.$message({
  747. message: "成功",
  748. type: "success",
  749. });
  750. this.fileInfo.fileList = [];
  751. this.infolist = {};
  752. this.dialogStatus = false;
  753. this.getList(this.params, this.pageSize);
  754. }
  755. });
  756. }
  757. });
  758. },
  759. //处理所需数据
  760. verifcheck(v) {
  761. if (v === 1) {
  762. for (let i = 0; i < this.knowledge.type.options.length; i++) {
  763. if (this.knowledge.type.options[i].dataCode == this.infolist.type) {
  764. this.infolist.typeName = this.knowledge.type.options[i].dataName;
  765. }
  766. }
  767. }
  768. },
  769. //删除
  770. delLine(val) {
  771. this.centerDialogVisible = true;
  772. this.messTit = "即将删除此条数据, 是否删除?";
  773. this.dataId = val.id;
  774. },
  775. closeMessage(v) {
  776. this.centerDialogVisible = false;
  777. if (v === 1) {
  778. this.$http({
  779. url: "/market/cnewknowledgenet/delete",
  780. method: "post",
  781. headers: {
  782. "Content-Type": "application/json",
  783. },
  784. data: { id: this.dataId },
  785. }).then((res) => {
  786. this.$message({
  787. message: "删除成功",
  788. type: "success",
  789. });
  790. this.getList(this.params, this.pageSize);
  791. });
  792. }
  793. },
  794. getUser() {
  795. this.userInfo = JSON.parse(window.sessionStorage.userInfo);
  796. this.infolist = {};
  797. this.infolist.handler = this.userInfo.loginNo;
  798. this.infolist.orgId = this.userInfo.groupId;
  799. this.infolist.orgName = this.userInfo.groupName;
  800. this.infolist.handlerId = this.userInfo.loginName;
  801. },
  802. },
  803. watch: {
  804. filterText(val) {
  805. this.$refs.tree.filter(val);
  806. },
  807. },
  808. mounted() {
  809. this.getList(this.params, this.pageSize);
  810. this.getListype();
  811. this.getUser();
  812. this.getTreeData();
  813. },
  814. created() {},
  815. };
  816. </script>
  817. <style>
  818. .el-select-dropdown__item {
  819. /* padding: 0 !important; */
  820. }
  821. </style>
  822. <style scoped lang="scss">
  823. @import "../../../assets/style";
  824. // .iconfont {
  825. // font-size: 42px;
  826. // }
  827. .icon-excel {
  828. color: #67db63;
  829. }
  830. .icon-word {
  831. color: #ff654e;
  832. }
  833. .icon-ppt {
  834. color: #ff8943;
  835. }
  836. .icon-wenjian {
  837. color: #ccc;
  838. }
  839. .tinymce-editor {
  840. width: calc(100% - 100px) !important;
  841. }
  842. .el-icon-picture {
  843. font-size: 36px;
  844. color: #ccc;
  845. background: #fff;
  846. padding: 4px 2px;
  847. margin-bottom: 2px;
  848. }
  849. .el-icon-full-screen {
  850. cursor: pointer;
  851. }
  852. .back-box {
  853. margin-top: 20px;
  854. background: #f2f2f2;
  855. padding: 20px;
  856. div {
  857. display: inline-block;
  858. text-align: center;
  859. margin-right: 20px;
  860. cursor: pointer;
  861. span {
  862. display: block;
  863. width: 80px;
  864. overflow: hidden;
  865. padding-top: 10px;
  866. margin: 0 10px;
  867. overflow: hidden;
  868. text-overflow: ellipsis;
  869. display: -webkit-box;
  870. /* 将对象作为弹性伸缩盒子模型显示 */
  871. -webkit-line-clamp: 1;
  872. /* 控制最多显示几行 */
  873. -webkit-box-orient: vertical;
  874. /* 设置或检索伸缩盒对象的子元素的排列方式 */
  875. }
  876. }
  877. }
  878. .tree-box {
  879. height: calc(100% - 170px);
  880. overflow: auto;
  881. border: 1px solid #dcdfe6;
  882. border-top: none;
  883. }
  884. .titbox {
  885. div {
  886. float: right;
  887. i {
  888. font-size: 22px;
  889. margin-left: 20px;
  890. cursor: pointer;
  891. }
  892. }
  893. }
  894. .tabbox {
  895. margin-top: 15px;
  896. }
  897. .pageBox {
  898. text-align: right;
  899. margin-top: 10px;
  900. }
  901. .info-line {
  902. width: 100%;
  903. display: block;
  904. padding-left: 20px;
  905. div {
  906. width: 50%;
  907. display: inline-block;
  908. }
  909. span {
  910. width: 80px;
  911. display: inline-block;
  912. text-align: left;
  913. i {
  914. color: red;
  915. display: inline-block;
  916. padding-right: 5px;
  917. }
  918. }
  919. .el-select,
  920. .el-input {
  921. width: calc(100% - 100px);
  922. }
  923. .tree {
  924. width: calc(100% - 100px);
  925. }
  926. }
  927. .online {
  928. width: 100%;
  929. .el-select {
  930. width: calc(100% - 100px);
  931. }
  932. span {
  933. vertical-align: top;
  934. }
  935. .el-textarea {
  936. width: calc(100% - 100px);
  937. }
  938. }
  939. .choice-style {
  940. background: rgb(255, 255, 255);
  941. }
  942. .ant-alert-info {
  943. background-color: #e6f7ff;
  944. border: 1px solid #91d5ff;
  945. }
  946. .ant-alert {
  947. box-sizing: border-box;
  948. margin: 0;
  949. padding: 0;
  950. color: rgb(0, 0, 0);
  951. font-size: 14px;
  952. font-variant: tabular-nums;
  953. line-height: 1.5;
  954. list-style: none;
  955. font-feature-settings: "tnum";
  956. position: relative;
  957. padding: 5px 0;
  958. word-wrap: break-word;
  959. border-radius: 4px;
  960. }
  961. .canel-style {
  962. color: #1890ff;
  963. cursor: pointer;
  964. padding-left: 10px;
  965. }
  966. </style>