UploadInfor.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850
  1. <template>
  2. <div class="upload_infor">
  3. <form>
  4. <div class="dataName">
  5. <span>资料名称</span
  6. ><input
  7. type="text"
  8. class="inputStyle focusStyle"
  9. v-model="inforName"
  10. @focus="hideTip"
  11. @blur="checkName()"
  12. />
  13. <p v-show="tipFlag">{{ tipText }}</p>
  14. </div>
  15. <div class="inforDes">
  16. <span>资料描述</span
  17. ><textarea
  18. name="inforDes"
  19. cols="40"
  20. rows="4"
  21. class="focusStyle"
  22. v-model="inforDes"
  23. ></textarea>
  24. </div>
  25. <div class="selectType">
  26. <p>选择类型</p>
  27. <div>
  28. <span>素材时间</span>
  29. <input
  30. type="month"
  31. :min="localMonth"
  32. class="inputStyle"
  33. v-model="materialTime"
  34. @change="materialTimeChange"
  35. />
  36. <span style="margin-left: 30px">经销商范围</span>
  37. <select class="selectStyle" v-model="scope" autocomplete="off">
  38. <option value="1">共通</option>
  39. <option value="0">部分</option>
  40. </select>
  41. </div>
  42. </div>
  43. <div v-show="scope === '0'">
  44. <p>权限设置</p>
  45. <div class="addByArea">
  46. <span>按区域添加</span>
  47. <div v-for="(item, index) in areaList" :key="index">
  48. <input
  49. type="checkbox"
  50. :value="item"
  51. v-model="checkedBoxList"
  52. @click="clickCheckbox(index)"
  53. /><span>{{ item }}</span>
  54. </div>
  55. <button @click.prevent="addByArea">添加</button>
  56. </div>
  57. <div class="addByCustomize">
  58. <span>自定义添加</span>
  59. <input
  60. id="dlr"
  61. list="dlrs"
  62. class="inputStyle"
  63. v-model="addByCustomize"
  64. placeholder="DLR Code / 经销商"
  65. />
  66. <datalist id="dlrs">
  67. <option v-for="(item, index) in dlrList" :key="index" :value="item">
  68. {{ item }}
  69. </option>
  70. </datalist>
  71. <button @click.prevent="addBySelf">添加</button>
  72. </div>
  73. <div class="addByGroup">
  74. <span>按小组添加</span>
  75. <div class="selectBox">
  76. <div class="group_select" @click="showOption">
  77. <p>请选择</p>
  78. <img src="../../img/select_arrow.png" />
  79. </div>
  80. <div class="optionBox" v-if="optionFlag">
  81. <ul>
  82. <li v-for="(item, index) in groupList" :key="index">
  83. <p>{{ item.groupName }}</p>
  84. <img
  85. src="../../img/add.png"
  86. @click="addGroup(index)"
  87. v-if="item.flag"
  88. />
  89. <img
  90. src="../../img/delete.png"
  91. @click="deleteGroup(index)"
  92. v-else
  93. />
  94. </li>
  95. </ul>
  96. </div>
  97. </div>
  98. <button @click.prevent="addByGroup">添加</button>
  99. </div>
  100. </div>
  101. </form>
  102. <div v-show="scope === '0'">
  103. <div class="count">
  104. <Count :sum="sum" />
  105. </div>
  106. <div class="table">
  107. <UpLoadTable
  108. :tableData="tableData"
  109. @change_icon="changeIcon"
  110. :pageSize="pageSize"
  111. :currentPage="currentPage"
  112. />
  113. </div>
  114. <div class="page" v-show="sum > 0">
  115. <Tablepage
  116. :totalPage="totalPage"
  117. :currentPage="currentPage"
  118. @change_page="changePage"
  119. @jump_page="jumpPage"
  120. />
  121. </div>
  122. </div>
  123. <div class="dataName" style="margin-top: 2%">
  124. <span>反馈设置</span>
  125. <select class="selectStyle" v-model="isFeedBack" autocomplete="off">
  126. <option value="0">不需要反馈</option>
  127. <option value="1">需要反馈</option>
  128. </select>
  129. <input
  130. type="date"
  131. :min="localDay"
  132. class="inputStyle"
  133. v-model="feedBackTime"
  134. v-show="isFeedBack === '1'"
  135. @change="feedBackTimeChange"
  136. />
  137. </div>
  138. <div class="uploadFile">
  139. <p class="title">附件</p>
  140. <label for="fileInput" @change="getFileInfo($event)"
  141. >导入<input type="file" name="fileName" id="fileInput" multiple
  142. /></label>
  143. <div class="fileDes">
  144. <p v-for="(item, index) in fileDes" :key="index"
  145. >{{ item }}
  146. <span class="deletFile" @click="deletFile(index)">×</span>
  147. </p>
  148. </div>
  149. </div>
  150. <button @click="submit" class="submitBtn">提交</button>
  151. <TipModal
  152. :tipFlag="tipModalFlag"
  153. :tipText="tipModalText"
  154. @close_tip_modal="closeTipModal"
  155. />
  156. </div>
  157. </template>
  158. <script>
  159. import UpLoadTable from "./components/UploadInforTable";
  160. import Count from "../../components/Count";
  161. import Tablepage from "../../components/TablePage";
  162. import TipModal from "../../components/TipModal";
  163. export default {
  164. props: {
  165. isManufacturer: {
  166. type: String,
  167. default: "distributor",
  168. },
  169. },
  170. components: {
  171. UpLoadTable,
  172. Count,
  173. Tablepage,
  174. TipModal,
  175. },
  176. watch: {},
  177. data() {
  178. return {
  179. allDataNameList: [],
  180. tipFlag: false, // 是否展示提示
  181. tipText: "资料名称不能重复,请重新输入",
  182. inforName: "",
  183. inforDes: "",
  184. materialTime: "",
  185. feedBackTime: "",
  186. scope: "1", //1为共通 , 0为部分
  187. checkedBoxList: [], // 多选框选中的值
  188. addByCustomize: "",
  189. dlrList: [], // 自定义添加
  190. addGroupList: [], // 添加的小组
  191. optionFlag: false, // 是否展示按小组添加的选择栏
  192. fileDes: [], // 上传的文件名
  193. file: [], //上传的文件
  194. sum: 0, // 一共有多少条数据
  195. pageSize: 20, // 每页展示的数据
  196. currentPage: 1,
  197. areaList: [], // 按区域添加
  198. groupList: [], // 按小组添加
  199. localMonth: "",
  200. localDay: "",
  201. tableData: [], // 表格显示的数据
  202. allDlr: [], // 所有经销商数据
  203. idList: [],
  204. tipModalFlag: false,
  205. tipModalText: "",
  206. isFeedBack: "0",
  207. };
  208. },
  209. computed: {
  210. // 表格总页数
  211. totalPage() {
  212. return Math.ceil(this.sum / this.pageSize);
  213. },
  214. },
  215. methods: {
  216. // 检查名字是否重复 失去焦点判断
  217. checkName: function () {
  218. let include = this.allDataNameList.indexOf(this.inforName);
  219. console.log(this.allDataNameList, "all");
  220. console.log(include);
  221. if (!this.inforName) {
  222. this.tipText = "资料名不能为空";
  223. this.tipFlag = true;
  224. return;
  225. } else if (include >= 0) {
  226. this.tipText = "资料名称不能重复,请重新输入";
  227. this.tipFlag = true;
  228. return;
  229. }
  230. },
  231. // 名字不重复,隐藏提示
  232. hideTip: function () {
  233. this.tipText = "资料名称不能重复,请重新输入";
  234. this.tipFlag = false;
  235. },
  236. // 素材时间变化
  237. materialTimeChange: function () {
  238. // this.materialTime = this.localMonth.replace('-', '/');
  239. console.log(this.materialTime);
  240. },
  241. // 反馈时间变化
  242. feedBackTimeChange: function () {
  243. // this.materialTime = this.localMonth.replace('-', '/');
  244. console.log(this.feedBackTime);
  245. },
  246. // 显示隐藏按小组添加下拉框
  247. showOption() {
  248. this.optionFlag = !this.optionFlag;
  249. },
  250. // 保证多选框东区和其他的多选框互斥
  251. clickCheckbox(i) {
  252. let list = this.checkedBoxList;
  253. let include = list.indexOf("东区");
  254. console.log(i, include);
  255. // if (i === 0) {
  256. // this.checkedBoxList = [];
  257. // return;
  258. // }
  259. // if (include >= 0) {
  260. // this.checkedBoxList.splice(0, 1);
  261. // }
  262. },
  263. // 点击按区域添加button
  264. addByArea: function () {
  265. if (this.checkedBoxList.length !== 0) {
  266. let strReq = this.checkedBoxList.join(",");
  267. let req = {
  268. localArea: strReq,
  269. };
  270. this.getAllDlr(req);
  271. }
  272. },
  273. // 自定义添加
  274. addBySelf: function () {
  275. if (this.addByCustomize) {
  276. let dataObj = {
  277. queryParams: this.addByCustomize,
  278. };
  279. this.getAllDlr(dataObj, false, true);
  280. }
  281. },
  282. // 按小组添加,增加小组
  283. addGroup: function (index) {
  284. this.groupList[index].flag = !this.groupList[index].flag;
  285. },
  286. // 按小组添加,删除小组
  287. deleteGroup: function (index) {
  288. this.groupList[index].flag = !this.groupList[index].flag;
  289. },
  290. // 点击按小组添加 添加按钮
  291. addByGroup: function () {
  292. this.addGroupList = [];
  293. this.groupList.forEach((element) => {
  294. if (!element.flag) {
  295. this.addGroupList.push(element.id);
  296. }
  297. });
  298. if (this.addGroupList.length !== 0) {
  299. let strReq = this.addGroupList.join(",");
  300. let req = {
  301. groupId: strReq,
  302. };
  303. this.getAllDlr(req);
  304. this.optionFlag = false;
  305. } else {
  306. alert("没有选择一个或多个小组");
  307. }
  308. },
  309. // 筛选
  310. changeIcon: function (i) {
  311. let index = (this.currentPage - 1) * this.pageSize + i;
  312. this.allDlr[index].flag = !this.allDlr[index].flag;
  313. },
  314. // 选中经销商的id 组成列表
  315. dlrIdList: function () {
  316. this.idList = [];
  317. this.allDlr.forEach((element) => {
  318. if (element.flag) {
  319. this.idList.push(element.id);
  320. }
  321. });
  322. },
  323. // 关闭提示框
  324. closeTipModal: function () {
  325. this.tipModalFlag = false;
  326. this.$router.push({ path: "/uploadRecord" });
  327. },
  328. // 获取某一页面的数据,展示在表格
  329. changePage: function (page) {
  330. this.currentPage = page;
  331. this.tableData = this.allDlr.slice(
  332. (this.currentPage - 1) * this.pageSize,
  333. this.currentPage * this.pageSize
  334. );
  335. },
  336. // 点击上一页,下一页,首页,尾页
  337. jumpPage: function (item) {
  338. switch (item) {
  339. case 1:
  340. this.currentPage = 1;
  341. break;
  342. case 2:
  343. this.currentPage = this.currentPage - 1;
  344. break;
  345. case 3:
  346. this.currentPage = this.currentPage + 1;
  347. break;
  348. case 4:
  349. this.currentPage = this.totalPage;
  350. break;
  351. }
  352. this.tableData = this.allDlr.slice(
  353. (this.currentPage - 1) * this.pageSize,
  354. this.currentPage * this.pageSize
  355. );
  356. },
  357. // 点击提交,检查名字是否重复,获取数据
  358. submit: function () {
  359. if (this.isFeedBack === "0") {
  360. this.feedBackTime = "";
  361. }
  362. this.checkName();
  363. if (!this.tipFlag) {
  364. if (!this.inforDes) {
  365. alert("资料描述不能为空");
  366. return;
  367. }
  368. if (!this.materialTime) {
  369. alert("请选择素材时间");
  370. return;
  371. }
  372. if (this.isFeedBack === "1") {
  373. if (!this.feedBackTime) {
  374. alert("请选择截止日期");
  375. return;
  376. }
  377. }
  378. if (this.file.length === 0) {
  379. alert("请导入资料附件");
  380. return;
  381. }
  382. this.dlrIdList();
  383. this.submitRequest();
  384. }
  385. },
  386. // 获取文件,文件名
  387. getFileInfo: function (event) {
  388. let file = event.target.files;
  389. file.forEach((item) => {
  390. this.file.push(item);
  391. this.fileDes.push(item.name);
  392. });
  393. console.log(this.file, "this.file");
  394. },
  395. // 删除文件
  396. deletFile: function(i) {
  397. console.log(i);
  398. this.file.splice(i, 1);
  399. this.fileDes.splice(i, 1);
  400. console.log(this.file);
  401. },
  402. // 获取当前的月份
  403. getLocalMonth: function () {
  404. let data = new Date();
  405. let year = data.getFullYear();
  406. let month = data.getMonth() + 1;
  407. let day = data.getDate();
  408. if (month < 10) {
  409. month = "0" + month;
  410. } else {
  411. month = month + "";
  412. }
  413. this.localMonth = year + "-" + month;
  414. this.localDay = year + "-" + month + "-" + day;
  415. console.log(this.localDay);
  416. },
  417. // 提交接口
  418. submitRequest: function () {
  419. let paramData = new FormData();
  420. this.file.forEach((item) => {
  421. paramData.append("file", item);
  422. });
  423. paramData.append("dataName", this.inforName);
  424. paramData.append("dataDesc", this.inforDes);
  425. paramData.append("sourceTime", this.materialTime);
  426. paramData.append("endDate", this.feedBackTime);
  427. paramData.append("dealerScope", this.scope);
  428. console.log(this.scope, 111);
  429. if (this.scope === "0") {
  430. paramData.append("dealerList", this.idList);
  431. console.log(1111, this.idList);
  432. }
  433. console.log(paramData.getAll("dataName"));
  434. this.$http
  435. .uploadFile("/firmsUpload", paramData)
  436. .then((res) => {
  437. if (res.data && res.data.code === 200) {
  438. this.tipModalFlag = true;
  439. this.tipModalText = "上传成功!";
  440. } else {
  441. alert("上传失败,请重试");
  442. console.log(res);
  443. }
  444. })
  445. .catch((err) => {
  446. alert("上传失败,请重试");
  447. console.log(err);
  448. });
  449. },
  450. // 获取所有资料名称
  451. getAllDataName: function () {
  452. this.$http({
  453. method: "post",
  454. url: "/firmsUploadList",
  455. })
  456. .then((res) => {
  457. if (res.data && res.data.code === 200) {
  458. (this.allDataNameList = []),
  459. res.data.data.forEach((item) => {
  460. this.allDataNameList.push(item.informationName);
  461. });
  462. } else {
  463. console.log(res);
  464. }
  465. })
  466. .catch((err) => {
  467. console.log(err);
  468. });
  469. },
  470. // 获取所有经销商信息接口
  471. getAllDlr: function (data = {}, flag, addBySelfFlag) {
  472. this.$http({
  473. method: "post",
  474. url: "/sys/agent/selectAgentInfoPage",
  475. data: data,
  476. })
  477. .then((res) => {
  478. console.log(res);
  479. this.tableData = [];
  480. let nowSum = this.sum;
  481. if (res.data && res.data.code === 200) {
  482. // created时,获取自定义添加datalist下拉框的值
  483. if (flag) {
  484. this.dlrList = [];
  485. let allDlrList = res.data.data;
  486. allDlrList.forEach((item) => {
  487. this.dlrList.push(item.dlrName);
  488. this.dlrList.push(item.dlrCode);
  489. });
  490. } else {
  491. // 整合数据, 主要目的是加一个 flag,在用户点击筛选的时候,好判断
  492. res.data.data.forEach((item) => {
  493. this.allDlr.push({
  494. id: item.id,
  495. dlrCode: item.dlrCode,
  496. dlrName: item.dlrName,
  497. localArea: item.localArea,
  498. flag: true,
  499. });
  500. });
  501. // 去重
  502. let hash = {};
  503. this.allDlr = this.allDlr.reduce(function (item, next) {
  504. hash[next.id] ? "" : (hash[next.id] = true && item.push(next));
  505. return item;
  506. }, []);
  507. this.sum = this.allDlr.length;
  508. // 添加以后跳到最后一页
  509. this.currentPage = this.totalPage;
  510. let startData = (this.currentPage - 1) * this.pageSize;
  511. let endData = this.currentPage * this.pageSize;
  512. this.tableData = this.allDlr.slice(startData, endData);
  513. // 自定义添加 提示
  514. let include = this.dlrList.indexOf(this.addByCustomize);
  515. if (include < 0 && addBySelfFlag) {
  516. alert("没有找到该经销商");
  517. return;
  518. }
  519. if (this.sum === nowSum && addBySelfFlag) {
  520. alert("该经销商已在列表中,不用重复添加");
  521. return;
  522. }
  523. }
  524. } else {
  525. console.log(res);
  526. }
  527. })
  528. .catch((err) => {
  529. console.log(err);
  530. });
  531. },
  532. // 获取小组接口
  533. selectGroupList: function () {
  534. this.$http({
  535. method: "post",
  536. url: "/sys/group/selectGroupList",
  537. data: {},
  538. })
  539. .then((res) => {
  540. if (res.data && res.data.code === 200) {
  541. this.groupList = [];
  542. res.data.data.forEach((item) => {
  543. this.groupList.push({
  544. id: item.id,
  545. groupName: item.groupName,
  546. flag: true,
  547. });
  548. });
  549. } else {
  550. console.log(res);
  551. }
  552. })
  553. .catch((err) => {
  554. console.log(err);
  555. });
  556. },
  557. // 获取 所有区域 接口
  558. getAreaList: function () {
  559. this.$http({
  560. method: "post",
  561. url: "/sys/agent/selectAgentAreaInfoList",
  562. })
  563. .then((res) => {
  564. if (res.data && res.data.code === 200) {
  565. this.areaList = res.data.data;
  566. } else {
  567. console.log(res);
  568. }
  569. })
  570. .catch((err) => {
  571. console.log(err);
  572. });
  573. },
  574. },
  575. mounted() {
  576. this.getLocalMonth();
  577. },
  578. created() {
  579. // if (this.isManufacturer === 'distributor') {
  580. // this.$router.replace({ path: "/inforList" });
  581. // }
  582. this.getAllDlr({}, true);
  583. this.getAllDataName();
  584. this.selectGroupList();
  585. this.getAreaList();
  586. },
  587. beforeCreate() {},
  588. activated() {
  589. const nav = [
  590. {
  591. title: '数据管理',
  592. url: ''
  593. },
  594. {
  595. title: '上传资料',
  596. url: ''
  597. }
  598. ]
  599. this.$emit('change_nav', nav)
  600. }
  601. };
  602. </script>
  603. <style scoped lang="less">
  604. .upload_infor {
  605. form {
  606. border: 1px solid #ccc;
  607. padding: 10px;
  608. }
  609. .dataName {
  610. p {
  611. margin-left: 65px;
  612. font-size: 10px;
  613. color: rgb(206, 84, 84);
  614. }
  615. }
  616. .inforDes {
  617. margin: 10px 0 0 0;
  618. span {
  619. vertical-align: top;
  620. margin-right: 17px;
  621. }
  622. textarea {
  623. border: 1px solid #ccc;
  624. border-radius: 3px;
  625. color: #555555;
  626. font-size: 12px;
  627. }
  628. }
  629. .selectType {
  630. margin-top: 10px;
  631. margin-bottom: 10px;
  632. div {
  633. margin-left: 65px;
  634. }
  635. }
  636. .selectStyle {
  637. margin-left: 20px;
  638. margin-right: 20px;
  639. padding: 4px 6px;
  640. height: 28px;
  641. width: 144px;
  642. border: 1px solid #ccc;
  643. color: #555555;
  644. font-size: 12px;
  645. }
  646. .addByArea {
  647. margin: 10px 0 0 65px;
  648. display: flex;
  649. height: 28px;
  650. align-items: center;
  651. span {
  652. margin-right: 10px;
  653. }
  654. div {
  655. margin-right: 18px;
  656. height: 18px;
  657. input {
  658. width: 12px;
  659. height: 12px;
  660. vertical-align: middle;
  661. margin-top: -2px;
  662. border: 1px solid #ccc;
  663. }
  664. span {
  665. margin-left: 2px;
  666. height: 18px;
  667. line-height: 18px;
  668. }
  669. }
  670. button {
  671. height: 28px;
  672. }
  673. }
  674. .addByCustomize {
  675. margin: 10px 0 0 65px;
  676. button {
  677. height: 28px;
  678. }
  679. input {
  680. // background: url('../../img/search.svg') no-repeat center left;
  681. // background-size: 21px 25px;
  682. background-color: #fff;
  683. }
  684. }
  685. .addByGroup {
  686. margin: 10px 0 0 65px;
  687. display: flex;
  688. align-items: center;
  689. .selectBox {
  690. position: relative;
  691. margin-left: 17px;
  692. .group_select {
  693. width: 124px;
  694. height: 28px;
  695. border: 1px solid #ccc;
  696. background-color: #fff;
  697. padding: 0 10px;
  698. display: flex;
  699. justify-content: space-between;
  700. align-items: center;
  701. p {
  702. font-size: 12px;
  703. height: 28px;
  704. line-height: 28px;
  705. color: #555555;
  706. }
  707. img {
  708. width: 16px;
  709. height: 16px;
  710. }
  711. &:hover {
  712. cursor: pointer;
  713. }
  714. }
  715. img {
  716. width: 144px;
  717. height: 28px;
  718. &:hover {
  719. cursor: pointer;
  720. }
  721. }
  722. .optionBox {
  723. position: absolute;
  724. top: 28px;
  725. left: 0;
  726. border: 1px solid #ccc;
  727. border-top: none;
  728. width: 142px;
  729. background-color: #fff;
  730. border-radius: 5px;
  731. ul {
  732. width: 144px;
  733. padding-bottom: 6px;
  734. display: flex;
  735. flex-direction: column;
  736. align-items: center;
  737. li {
  738. width: 132px;
  739. height: 28px;
  740. font-size: 12px;
  741. color: #555555;
  742. display: flex;
  743. align-items: center;
  744. border-bottom: 1px solid #ccc;
  745. display: flex;
  746. justify-content: space-between;
  747. padding-right: 5px;
  748. img {
  749. width: 20px;
  750. height: 20px;
  751. &:hover {
  752. cursor: pointer;
  753. }
  754. }
  755. }
  756. }
  757. }
  758. }
  759. button {
  760. height: 28px;
  761. }
  762. }
  763. .table {
  764. margin-top: 10px;
  765. }
  766. .count {
  767. display: flex;
  768. justify-content: flex-end;
  769. }
  770. .uploadFile {
  771. display: flex;
  772. margin-top: 35px;
  773. min-height: 100px;
  774. .title{
  775. margin-right: 20px;
  776. height: 20px;
  777. line-height: 20px;
  778. }
  779. .fileDes {
  780. margin-left: 20px;
  781. width: 500px;
  782. overflow: hidden; /* 超出一行文字自动隐藏 */
  783. text-overflow: ellipsis; /* 文字隐藏后添加省略号 */
  784. white-space: nowrap; /* 强制不换行 */
  785. p {
  786. height: 30px;
  787. line-height: 30px;
  788. .deletFile {
  789. font-size: 20px;
  790. margin-left: 20px;
  791. height: 30px;
  792. line-height: 30px;
  793. // color: #0056a0;
  794. &:hover {
  795. cursor: pointer;
  796. }
  797. }
  798. }
  799. }
  800. label {
  801. height: 30px;
  802. line-height: 30px;
  803. width: 56px;
  804. background-color: #0056a0;
  805. color: #fff;
  806. text-align: center;
  807. font-size: 14px;
  808. input {
  809. display: none;
  810. }
  811. }
  812. }
  813. .submitBtn {
  814. margin-top: 50px;
  815. }
  816. }
  817. .inputStyle {
  818. margin-left: 17px;
  819. width: 130px;
  820. height: 18px;
  821. line-height: 18px;
  822. padding: 4px 6px;
  823. border: 1px solid #ccc;
  824. color: #555555;
  825. font-size: 12px;
  826. }
  827. .focusStyle {
  828. border: 1px solid #ccc;
  829. line-height: 20px;
  830. color: #555555;
  831. outline: none;
  832. }
  833. .focusStyle:focus {
  834. animation: shadowAni 200ms linear forwards;
  835. }
  836. @keyframes shadowAni {
  837. 0% {
  838. border-color: #cccccc;
  839. box-shadow: inset 0px 0px 0 #ccc;
  840. }
  841. 100% {
  842. border-color: #75b9f0;
  843. box-shadow: 0px 0px 10px #75b9f0;
  844. }
  845. }
  846. </style>