CQSetInfo.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764
  1. <template>
  2. <!-- @blur="selectBlur($event, index)" -->
  3. <div class="ZTGlobal" style="padding: 1rem; width: 100%">
  4. <el-row :gutter="10">
  5. <el-col :span="6">征地补偿标准:</el-col>
  6. <el-col :span="18">
  7. <el-select
  8. v-model="bcbz"
  9. style="width: 90%"
  10. @change="selectZDBZ"
  11. placeholder="请选择"
  12. >
  13. <el-option
  14. v-for="item in bcbzList"
  15. :key="item.id"
  16. :label="item.name"
  17. :value="item.id"
  18. ></el-option>
  19. </el-select>
  20. </el-col>
  21. </el-row>
  22. <!-- :span-method="arraySpanMethod" -->
  23. <el-table :data="curBCBZ.bcbz" fit border style="width: 100%">
  24. <!-- <el-table-column prop="id" label="ID" width="180">
  25. </el-table-column> -->
  26. <el-table-column prop="jg" label="房屋结构" width="80">
  27. <template slot-scope="scope">
  28. <el-input
  29. v-model="scope.row.jg"
  30. v-show="scope.row.seen"
  31. @focus="handleSetFoucsSetData(scope.row)"
  32. @blur="loseFoucs(scope.row)"
  33. ></el-input>
  34. <div v-show="!scope.row.seen">{{ scope.row.jg }}</div>
  35. </template>
  36. </el-table-column>
  37. <el-table-column prop="grade" label="等级" width="60">
  38. <template slot-scope="scope">
  39. <el-input
  40. v-model="scope.row.grade"
  41. v-show="scope.row.seen"
  42. @focus="handleSetFoucsSetData(scope.row)"
  43. @blur="loseFoucs(scope.row)"
  44. ></el-input>
  45. <div v-show="!scope.row.seen">{{ scope.row.grade }}</div>
  46. </template>
  47. </el-table-column>
  48. <el-table-column prop="bz" label="单价(元/平方米)" width="80">
  49. <template slot-scope="scope">
  50. <el-input
  51. v-model="scope.row.bz"
  52. v-show="scope.row.seen"
  53. @focus="handleSetFoucsSetData(scope.row)"
  54. @blur="loseFoucs(scope.row)"
  55. ></el-input>
  56. <div v-show="!scope.row.seen">{{ scope.row.bz }}</div>
  57. </template>
  58. </el-table-column>
  59. <el-table-column prop="des" label="结构及装饰特征(规格)">
  60. <template slot-scope="scope">
  61. <el-input
  62. v-model="scope.row.des"
  63. v-show="scope.row.seen"
  64. @focus="handleSetFoucsSetData(scope.row)"
  65. @blur="loseFoucs(scope.row)"
  66. ></el-input>
  67. <div v-show="!scope.row.seen">{{ scope.row.des }}</div>
  68. </template>
  69. </el-table-column>
  70. <el-table-column fixed="right" label="操作" width="100">
  71. <template slot-scope="scope">
  72. <el-button @click="handleClick(scope.row)" type="text" size="small"
  73. >编辑</el-button
  74. >
  75. <el-button
  76. type="text"
  77. size="small"
  78. @click="handleDeleteClick(scope.row)"
  79. >删除</el-button
  80. >
  81. </template>
  82. </el-table-column>
  83. </el-table>
  84. <el-row justify="center" type="flex">
  85. <el-button type="primary" @click="save()">保存</el-button>
  86. <el-button type="primary" @click="saveAs('ruleForm')">另存为</el-button>
  87. <el-button type="primary" @click="reset()">重置</el-button>
  88. <el-button type="primary" @click="delBZ()">删除</el-button>
  89. </el-row>
  90. <el-dialog
  91. title="标准名称设置"
  92. :modal="false"
  93. :visible.sync="dialogFormVisible"
  94. append-to-body="true"
  95. width="20rem"
  96. >
  97. <el-form :model="ruleForm" :rules="rules" ref="ruleForm">
  98. <el-form-item label="名称" prop="name">
  99. <el-input v-model="ruleForm.name" autocomplete="off"></el-input>
  100. </el-form-item>
  101. </el-form>
  102. <div slot="footer" class="dialog-footer">
  103. <el-button @click="dialogFormVisible = false">取消</el-button>
  104. <el-button type="primary" @click="submitForm('ruleForm')"
  105. >确 定</el-button
  106. >
  107. </div>
  108. </el-dialog>
  109. <el-dialog
  110. title="编辑"
  111. :modal="false"
  112. :visible.sync="editFormVisible"
  113. append-to-body="true"
  114. width="20rem"
  115. >
  116. <el-form :model="oldRow" :rules="rowRules" ref="rowForm">
  117. <el-form-item label="房屋结构" prop="jg">
  118. <el-select v-model="oldRow.jg">
  119. <el-option label="框架结构" value="框架结构"></el-option>
  120. <el-option label="混合结构" value="混合结构"></el-option>
  121. <el-option label="砖木结构" value="砖木结构"></el-option>
  122. <el-option label="简易结构" value="简易结构"></el-option>
  123. <el-option label="凉棚" value="凉棚"></el-option>
  124. </el-select>
  125. </el-form-item>
  126. <el-form-item label="房屋等级" prop="grade">
  127. <el-input
  128. v-model.number="oldRow.grade"
  129. type="number"
  130. min="1"
  131. max="5"
  132. ></el-input>
  133. </el-form-item>
  134. <el-form-item label="单价(元/平方米)" prop="bz">
  135. <el-input
  136. v-model.number="oldRow.bz"
  137. type="number"
  138. min="0"
  139. max="10000000000"
  140. ></el-input>
  141. </el-form-item>
  142. <el-form-item label="规格" prop="des">
  143. <el-input
  144. type="textarea"
  145. :rows="4"
  146. v-model="oldRow.des"
  147. autocomplete="off"
  148. ></el-input>
  149. </el-form-item>
  150. </el-form>
  151. <div slot="footer" class="dialog-footer">
  152. <el-button @click="editFormVisible = false">取消</el-button>
  153. <el-button type="primary" @click="submitEditForm('rowForm')"
  154. >确 定</el-button
  155. >
  156. </div>
  157. </el-dialog>
  158. </div>
  159. </template>
  160. <script>
  161. import {
  162. getCqBcbzList,
  163. getCqBcbzItemList,
  164. getCqBcbzById,
  165. addCqBcbz,
  166. updateCqBcbz,
  167. updateCqBcbzItem,
  168. delCqBcbzItem,
  169. delCqBcbz,
  170. } from "@/api/zt/ztApi.js";
  171. export default {
  172. props: {
  173. cqValue: { type: Object },
  174. lyoption: {
  175. type: Object,
  176. default: () => {
  177. return {};
  178. },
  179. },
  180. },
  181. name: "ZDShowInfo",
  182. data() {
  183. var bzValidate = (rule, value, callback) => {
  184. if (value == "" || value == null) callback(new Error("不能为空"));
  185. else if (value < 0) {
  186. callback(new Error("不能小于0"));
  187. } else callback();
  188. };
  189. return {
  190. editFormVisible: false,
  191. dialogFormVisible: false,
  192. ruleForm: {
  193. name: null,
  194. },
  195. rules: {
  196. name: [
  197. { required: true, message: "请输入名称", trigger: "blur" },
  198. // { min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }
  199. ],
  200. },
  201. rulesEdit: {
  202. grade: [{ validate: bzValidate, trigger: "blur" }],
  203. bz: [{ validate: bzValidate, trigger: "blur" }],
  204. },
  205. // rowForm: {
  206. // JG: "框架结构",
  207. // GRADE: 1,
  208. // BZ: 1350,
  209. // DES: ''
  210. // },
  211. rowRules: {
  212. grade: [
  213. // { required: true, message: "不能为空", trigger: "blur" },
  214. {
  215. type: "number",
  216. min: 1,
  217. max: 5,
  218. message: "范围1-5之间",
  219. trigger: "blur",
  220. },
  221. ],
  222. bz: [
  223. // { required: true, message: "不能为空", trigger: "blur" },
  224. // /^[+]{0,1}(\d+)$|^[+]{0,1}(\d+\.\d+)$/
  225. {
  226. type: "number",
  227. min: 0,
  228. max: 10000000000,
  229. message: "不能小于0",
  230. trigger: "blur",
  231. },
  232. ],
  233. },
  234. /**
  235. * 补偿标准绑定值
  236. */
  237. bcbz: "",
  238. // curLabel: '',
  239. /**
  240. * 补偿标准列表
  241. */
  242. bcbzList: [],
  243. /**
  244. * 当前标准
  245. */
  246. curBCBZ: {
  247. name: "",
  248. id: "",
  249. bcbz: [
  250. // {
  251. // JG: "框架结构",
  252. // GRADE: "1",
  253. // BZ: 1350,
  254. // DES: "层高:3.5m,惨板:钢筋砼8cm厚,楼地面:铺地板砖,基础:钢筋砼基础,梁柱:钢筋砼梁柱,墙体:红砖内外墙,水电:普通水电及卫生设备,墙面:内墙一般涂料,外墙有装饰面,窗:铝合金玻璃窗,门:普通镶板门",
  255. // },
  256. // {
  257. // JG: "框架结构",
  258. // GRADE: "2",
  259. // BZ: 1250,
  260. // DES: "层高:3m,楼板:钢筋砼8cm厚,地面:水泥砂浆批面,梁柱:钢筋砼梁柱,基础:钢筋砼基础,墙体:红砖内外墙,墙面:一般涂料,门窗:木门窗,水电:普通水电及卫生洁具",
  261. // },
  262. // {
  263. // JG: "混合结构",
  264. // GRADE: "1",
  265. // BZ: 1100,
  266. // DES: "层高:3.5m,楼板:钢筋砼8cm厚,楼地面:铺地板砖,墙体:红砖内外墙,基础:地梁,片石基础,墙面:内墙一般涂料、外墙有装饰贴面,水电:普通水电及卫生洁具,窗:铝合金玻璃窗门:普通木门",
  267. // },
  268. // {
  269. // JG: "混合结构",
  270. // GRADE: "2",
  271. // BZ: 1050,
  272. // DES: "层高:3m,楼板:钢筋砼8cm厚,楼地面:水泥砂浆批面,墙体:红砖内外墙,基础:地梁片石基础,墙面:一般涂料,门窗:木门窗,水电:普通水电及卫生洁具",
  273. // },
  274. // {
  275. // JG: "砖木结构",
  276. // GRADE: "1",
  277. // BZ: 850,
  278. // DES: "檐高:2.8m以上,墙体:红砖内外墙,地面:水泥砂浆批面、基础片石基础,屋面:土瓦屋面,梁料:木梁木,门窗:本门窗,墙面:石灰刷白,其他:普通水电设备",
  279. // },
  280. // {
  281. // JG: "砖木结构",
  282. // GRADE: "2",
  283. // BZ: 750,
  284. // DES: "檐高2.2m-2.8m,墙体:红砖内外墙,地面:水泥砂浆批面,墙面:石灰刷白,基础:片石基础,屋面:土瓦屋面,梁桁:木料木桁,门窗:木门窗",
  285. // },
  286. // {
  287. // JG: "简易结构",
  288. // GRADE: "1",
  289. // BZ: 350,
  290. // DES: "层高:2.2m-3m,墙体:红砖墙,屋顶:铁皮顶或石棉瓦顶",
  291. // },
  292. // {
  293. // JG: "简易结构",
  294. // GRADE: "2",
  295. // BZ: 300,
  296. // DES: "层高:2.2m-3m,墙体:红砖墙,屋顶:油毡顶",
  297. // },
  298. // {
  299. // JG: "简易结构",
  300. // GRADE: "3",
  301. // BZ: 280,
  302. // DES: "层高:2.2m-3m,墙体:空心砖,屋顶:铁皮顶或石棉瓦顶",
  303. // },
  304. // {
  305. // JG: "简易结构",
  306. // GRADE: "4",
  307. // BZ: 200,
  308. // DES: "层高:2.2m-3m,墙体:空心砖,屋顶:油毡顶",
  309. // },
  310. // {
  311. // JG: "简易结构",
  312. // GRADE: "5",
  313. // BZ: 80,
  314. // DES: "层高:2.2m-3m,墙体:木板、铁皮、竹编等材料墙,屋顶油毡顶",
  315. // },
  316. // {
  317. // JG: "凉棚",
  318. // GRADE: "1",
  319. // BZ: 120,
  320. // DES: "铁皮顶或石棉瓦顶、铁柱、铁架",
  321. // },
  322. // {
  323. // JG: "凉棚",
  324. // GRADE: "2",
  325. // BZ: 70,
  326. // DES: "铁皮顶或石棉瓦顶、木柱、木架",
  327. // },
  328. // {
  329. // JG: "凉棚",
  330. // GRADE: "3",
  331. // BZ: 20,
  332. // DES: "油毡顶、竹片顶、木板顶、木柱、木架",
  333. // },
  334. // {
  335. // JG: "凉棚",
  336. // GRADE: "4",
  337. // BZ: 10,
  338. // DES: "茅草、编叶、柳叶等",
  339. // }
  340. ],
  341. },
  342. /**
  343. * 行数据
  344. */
  345. oldRow: {},
  346. };
  347. },
  348. mounted() {
  349. this.initForm();
  350. },
  351. methods: {
  352. /**
  353. * 初始化
  354. */
  355. initForm() {
  356. debugger;
  357. // if (this.cqValue && this.cqValue != "") {
  358. // this.bcbz = this.cqValue;
  359. // var item = this.bcbzList.find((t) => t.value == this.bcbz);
  360. // this.curBCBZ = item;
  361. // }
  362. this.getInitData();
  363. },
  364. getInitData() {
  365. var that = this;
  366. that.bcbz = that.cqValue;
  367. if (window.isUseDB) {
  368. that.curBCBZ = {
  369. id: "",
  370. name: "",
  371. bcbz: [],
  372. };
  373. getCqBcbzList()
  374. .then((res) => {
  375. that.bcbzList = res.rows;
  376. if (that.bcbz == null || that.bcbz == "") {
  377. if (that.bcbzList.length > 0) {
  378. that.cqValue = that.bcbzList[0].id;
  379. that.bcbz = that.cqValue;
  380. that.curBCBZ.id = that.bcbz;
  381. that.curBCBZ.name = that.bcbzList[0].name;
  382. }
  383. } else {
  384. var item = that.bcbzList.find((t) => t.id == that.bcbz);
  385. if (item) {
  386. that.curBCBZ.id = item.id;
  387. that.curBCBZ.name = item.name;
  388. }
  389. }
  390. var queryParams = {
  391. bz: null,
  392. des: null,
  393. grade: null,
  394. id: null,
  395. jg: null,
  396. pid: that.bcbz,
  397. };
  398. getCqBcbzItemList(queryParams)
  399. .then((response) => {
  400. if (response) {
  401. that.curBCBZ.bcbz = response.rows;
  402. }
  403. })
  404. .catch((err) => {
  405. console.log(err);
  406. });
  407. })
  408. .catch((err) => {
  409. console.log(err);
  410. });
  411. } else {
  412. that.bcbzList = JSON.parse(JSON.stringify(window.ZSBC.CQBCList));
  413. if (that.cqValue != null && that.cqValue != "") {
  414. that.curBCBZ = that.bcbzList.find((t) => t.id == that.bcbz);
  415. } else {
  416. if (that.bcbzList.length > 0) {
  417. that.cqValue = that.bcbzList[0].id;
  418. that.bcbz = that.cqValue;
  419. that.curBCBZ = that.bcbzList[0];
  420. }
  421. }
  422. }
  423. },
  424. /**
  425. * 选择标准下拉框
  426. */
  427. selectZDBZ() {
  428. var that = this;
  429. if (that.bcbz && that.bcbz != "") {
  430. if (window.isUseDB) {
  431. that.curBCBZ = {
  432. id: "",
  433. name: "",
  434. bcbz: [],
  435. };
  436. var queryParams = {
  437. bz: null,
  438. des: null,
  439. grade: null,
  440. id: null,
  441. jg: null,
  442. pid: that.bcbz,
  443. };
  444. getCqBcbzItemList(queryParams)
  445. .then((response) => {
  446. if (response) {
  447. that.curBCBZ.bcbz = response.rows;
  448. }
  449. })
  450. .catch((err) => {
  451. console.log(err);
  452. });
  453. } else {
  454. this.bcbzList = JSON.parse(JSON.stringify(window.ZSBC.CQBCList));
  455. if (this.cqValue != undefined && this.cqValue != "") {
  456. this.curBCBZ = this.bcbzList.find((t) => t.id == this.bcbz);
  457. }
  458. }
  459. } else {
  460. that.$message.warning("请选择标准");
  461. }
  462. },
  463. /**
  464. * 重置
  465. */
  466. reset() {
  467. // var val = this.bcbz
  468. this.bcbzList = JSON.parse(JSON.stringify(window.ZSBC.CQBCList));
  469. var item = this.bcbzList.find((t) => t.id == this.bcbz);
  470. debugger;
  471. this.curBCBZ = item;
  472. },
  473. /**
  474. * 保存修改
  475. */
  476. save() {
  477. var that = this;
  478. if (that.bcbz == "") {
  479. that.$layer.alert("请选择补偿标准");
  480. return;
  481. }
  482. if (window.isUseDB) {
  483. var item = {
  484. id: that.curBCBZ.id,
  485. name: that.curBCBZ.name,
  486. bcbz: that.curBCBZ.bcbz,
  487. };
  488. updateCqBcbz(item)
  489. .then((res) => {
  490. if (res) that.getInitData();
  491. that.$layer.alert("保存完成");
  492. })
  493. .catch((err) => {
  494. console.log(err);
  495. });
  496. } else {
  497. var index = window.ZSBC.CQBCList.findIndex((t) => t.value == this.bcbz);
  498. if (index > -1) {
  499. window.ZSBC.CQBCList[index] = this.curBCBZ;
  500. this.$layer.alert("保存完成");
  501. }
  502. }
  503. },
  504. /***
  505. * 另存为
  506. */
  507. saveAs(formName) {
  508. debugger;
  509. // if (this.bcbz == "") {
  510. // this.$layer.alert("请选择补偿标准");
  511. // return
  512. // }
  513. this.dialogFormVisible = true;
  514. this.$nextTick(function () {
  515. this.$refs[formName].resetFields();
  516. });
  517. },
  518. submitForm(formName) {
  519. this.$refs[formName].validate((valid) => {
  520. if (valid) {
  521. // alert('submit!');
  522. this.dialogFormVisible = false;
  523. this.saveData();
  524. } else {
  525. console.log("error submit!!");
  526. return false;
  527. }
  528. });
  529. },
  530. /**
  531. * 另存数据
  532. */
  533. saveData() {
  534. debugger;
  535. var date = new Date();
  536. var val = date.getTime().toString();
  537. var that = this;
  538. var newBCBZ = {
  539. id: val,
  540. name: that.ruleForm.name,
  541. bcbz: that.curBCBZ.bcbz,
  542. };
  543. if (window.isUseDB) {
  544. addCqBcbz(newBCBZ)
  545. .then((res) => {
  546. if (res) that.getInitData();
  547. that.lyoption.content.parent.initSetting();
  548. that.$layer.alert("保存完成");
  549. })
  550. .catch((err) => {
  551. console.log(err);
  552. });
  553. } else {
  554. window.ZSBC.CQBCList.push(newBCBZ);
  555. that.bcbzList = window.ZSBC.CQBCList;
  556. that.bcbz = val;
  557. }
  558. },
  559. updateZDWindow() {
  560. var that = this;
  561. that.$layer.close(window.zdWindowId);
  562. window.zdWindowId = this.$layer.iframe({
  563. layerStyle: {
  564. padding: "0.3vw 1vw 0.3vw 2.5vw",
  565. backgroundImage: "url(/static/images/popup/modal-title.png)",
  566. backgroundRepeat: "no-repeat",
  567. },
  568. content: {
  569. content: DemolitionList, //传递的组件对象
  570. parent: this, //当前的vue对象
  571. data: {}, //props
  572. },
  573. offset: [340, 460], //left top 左上角(left=430px/2;top=(800px+header高)/2)
  574. area: ["430px", "800px"],
  575. title: "征收补偿预估",
  576. maxmin: false,
  577. shade: false, //是否显示遮罩
  578. shadeClose: false, //点击遮罩是否关闭
  579. cancel: () => {
  580. viewer.entities.removeAll();
  581. //关闭事件
  582. // alert("关闭iframe");
  583. },
  584. });
  585. },
  586. /**
  587. * 编辑按钮
  588. */
  589. handleClick(row) {
  590. debugger;
  591. this.oldRow = JSON.parse(JSON.stringify(row));
  592. this.editFormVisible = true;
  593. },
  594. handleDeleteClick(row) {
  595. var that = this;
  596. if (row == undefined) return;
  597. var index = that.curBCBZ.bcbz.findIndex((t) => (t.id = row.id));
  598. var formId = that.$layer.confirm(
  599. "确定要删除吗?",
  600. {},
  601. function () {
  602. delCqBcbzItem([row.id])
  603. .then((res) => {
  604. if (res) {
  605. that.$message("数据已删除!");
  606. if (index > -1) that.curBCBZ.bcbz.splice(index, 1);
  607. that.$layer.close(formId);
  608. }
  609. })
  610. .catch((err) => {
  611. console.log(err);
  612. });
  613. },
  614. function () {
  615. return;
  616. }
  617. );
  618. },
  619. /**
  620. * 开启行编辑
  621. * @param {object} row
  622. */
  623. handleSetFoucsSetData(row) {
  624. this.oldRow = row;
  625. },
  626. submitEditForm(formName) {
  627. // if (!this.chageBCBZ())
  628. // return false;
  629. // else {
  630. console.log(this.oldRow.bz);
  631. console.log(this.oldRow.grade);
  632. this.$refs[formName].validate((valid) => {
  633. if (valid) {
  634. // alert('submit!');
  635. this.editFormVisible = false;
  636. this.updateItem();
  637. // this.$layer.alert("保存完成");
  638. return true;
  639. } else {
  640. console.log("error submit!!");
  641. return false;
  642. }
  643. });
  644. // }
  645. },
  646. /**
  647. *
  648. */
  649. updateItem() {
  650. var that = this;
  651. var model = {
  652. bz: that.oldRow.bz,
  653. des: that.oldRow.des,
  654. grade: that.oldRow.grade,
  655. id: that.oldRow.id,
  656. jg: that.oldRow.jg,
  657. pid: that.oldRow.pid,
  658. };
  659. updateCqBcbzItem(model)
  660. .then((res) => {
  661. if (res) {
  662. that.$layer.alert("保存完成");
  663. debugger;
  664. let bcbz = that.curBCBZ.bcbz.find((c) => c.id == model.id);
  665. bcbz.bz = model.bz;
  666. bcbz.des = model.des;
  667. bcbz.grade = model.grade;
  668. bcbz.jg = model.jg;
  669. }
  670. })
  671. .catch((err) => {
  672. console.log(err);
  673. });
  674. },
  675. /**
  676. * 保存当前行
  677. * @param {object} row
  678. */
  679. saveHandleClick(row) {
  680. row.seen = false;
  681. },
  682. chageBCBZ() {
  683. if (this.oldRow.grade < 1) {
  684. this.$message.warning("不能小于1");
  685. return false;
  686. }
  687. if (this.oldRow.bz < 0) {
  688. this.$message.warning("不能小于0");
  689. return false;
  690. }
  691. return true;
  692. },
  693. delBZ() {
  694. var that = this;
  695. var formId = that.$layer.confirm("确定要删除吗?", {}, function () {
  696. if (window.isUseDB) {
  697. delCqBcbz(that.bcbz)
  698. .then((res) => {
  699. if (res) {
  700. that.$layer.alert("数据已删除");
  701. that.cqValue = "";
  702. that.bcbz = that.cqValue;
  703. that.getInitData();
  704. that.lyoption.content.parent.initSetting();
  705. }
  706. })
  707. .catch((err) => {
  708. console.log(err);
  709. });
  710. } else {
  711. var index = window.ZSBC.CQBCList.findIndex((t) => t.id == that.bcbz);
  712. if (index > -1) {
  713. window.ZSBC.CQBCList.splice(index, 1);
  714. }
  715. that.cqValue = "";
  716. that.bcbz = that.cqValue;
  717. that.getInitData();
  718. that.lyoption.content.parent.initSetting();
  719. }
  720. that.$layer.close(formId);
  721. });
  722. },
  723. },
  724. };
  725. </script>
  726. <style lang="scss">
  727. @import "@/../../zt.scss";
  728. </style>
  729. <style scoped>
  730. /* .subtitle {
  731. color: #02a7f0;
  732. font-weight: 400;
  733. } */
  734. .el-input >>> .el-input__inner {
  735. text-align: right !important;
  736. }
  737. /* .el -input>input, .el-select-dropdown, .el-textarea>textarea
  738. {
  739. color: #fff !important;
  740. background-color: rgba(4, 28, 50, 0.5) !important;
  741. border: 1px solid rgba(15, 122, 200, 0.4) !important;
  742. text-align: center;
  743. } */
  744. .el-form-item {
  745. margin: 0;
  746. }
  747. .el-input__inner {
  748. text-align: end;
  749. }
  750. </style>