<template>
    <div class="cesiumTabRoot">
      <el-breadcrumb separator=">">
        <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
        <el-breadcrumb-item>
          <a href="#">基础信息管理</a>
        </el-breadcrumb-item>
        <el-breadcrumb-item>
          经费支出
        </el-breadcrumb-item>
      </el-breadcrumb>
      <el-divider></el-divider>
      <!--
        要resetFields起作用，必须配置:model和prop
      -->
      <el-form ref="queryForm" :model="queryModel" inline class="demo-form-inline">
        <el-form-item label="年份" prop="yearMonth">
          <el-date-picker
            size="mini"
            v-model="queryModel.yearMonth"
            type="month"
            placeholder="选择年月"
            value-format="yyyy-MM"
            format="yyyy-MM">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="模板" prop="selectTemplateId">
        <el-select v-model="queryModel.selectTemplateId" size="mini" style="width:250px" placeholder="请选择模板">
            <el-option
              v-for="item in templateList"
              :key="item.id"
              :label="item.title"
              :value="item.id">
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="项目名称" prop="name">
          <el-input type="text" size="mini" v-model="queryModel.name" ></el-input>
        </el-form-item>
        <el-form-item>
          <el-button
            type="primary"
            size="mini"
            icon="ios-search"
            @click="changePage(1)"
            :loading="loading"
          >查询</el-button>&nbsp;
          <!-- <el-button
            type="info"
            size="mini"
            style="margin-left: 8px"
            @click="handleReset('queryForm')"
          >重置</el-button>&nbsp; -->
        </el-form-item>
      </el-form>
      <el-divider></el-divider>
      <el-row class="button-group">
        <!-- <el-button type="primary" size="small" @click="handleAdd" plain icon="el-icon-circle-plus" >新增</el-button>
        <el-button
          type="primary"
          size="small"
          plain
          icon="el-icon-upload"
          @click="batchImportVisible = true"
        >导入</el-button> -->
        <el-button
          type="primary"
          size="small"
          plain
          icon="el-icon-upload2"
          @click="exportXls"
        >导出数据</el-button>
        <span style="float: right;">
          <!-- <permission-detect class="inline" path="/base/fundIncomeInfo/generateData" method="post">
            <el-button type="danger"
            size="small" 
            style="text-align:right" 
            icon="el-icon-s-data" 
            @click="batchImportVisible2 = true">生成列表项目</el-button>
          </permission-detect> -->
        </span>
        
      </el-row>
      
      <el-table
        :data="tableData"
        style="min-height:400px;"
        height="500"
        v-loading="loading"
        border
        @cell-click="handleCellClick"
        :row-class-name="tableRowClassName"
      >
        <!-- <el-table-column label="操作" fixed>
          <template slot-scope="{row}" >
            <i class="el-icon-plus hand-cursor" @click="handleAdd"></i>
            <i class="el-icon-delete hand-cursor" @click="handleDelete(row)" style="margin-left:15px"></i>
          </template>
        </el-table-column> -->
        <el-table-column label="保存" fixed>
          <template slot-scope="{row}" >
            <el-button type="primary" v-if="!row.isSum" size="mini" @click="handleSave(row)" plain>保存</el-button>
          </template>
        </el-table-column>
        <el-table-column  prop="serialNumber" fixed label="序号" width="120">
            <!-- <div class="item" slot-scope="scope">
                <el-input size="mini" class="item__input" v-model="scope.row.serialNumber" @blur="save(scope.row)"></el-input>
                <div class="item__txt">{{scope.row.serialNumber}}</div>
            </div> -->
        </el-table-column>
        <el-table-column  prop="name" fixed label="项目名称" width="250">
            <!-- <div class="item" slot-scope="scope">
                <el-input size="mini" class="item__input" v-model="scope.row.name" @blur="save(scope.row)"></el-input>
                <div class="item__txt">{{scope.row.name}}</div>
            </div> -->
        </el-table-column>
        <el-table-column  label="预算修改明细" width="120">
          <template slot-scope="scope">
            <el-link 
            v-if="!scope.row.isSum&&scope.row.budgetRevenue!=scope.row.curBudgetRevenue" 
            type="primary" 
            @click="handleBudgetDetail(scope.row)">查看明细</el-link>
          </template>
        </el-table-column>
        <el-table-column  prop="budgetRevenue"  label="原预算支出" width="130">
          <template slot-scope="scope">
            {{formaNum(scope.row.budgetRevenue)}}
          </template>
        </el-table-column>
        <el-table-column  prop="curBudgetRevenue"  label="当前预算支出" width="130">
          <template slot-scope="scope">
            <span v-if="scope.row.budgetRevenue<scope.row.curBudgetRevenue" style="color:#F56C6C">
              {{formaNum(scope.row.curBudgetRevenue)}}
            </span>
            <span v-else-if="scope.row.budgetRevenue>scope.row.curBudgetRevenue" style="color:#67C23A">
              {{formaNum(scope.row.curBudgetRevenue)}}
            </span>
            <span v-else >
              {{formaNum(scope.row.curBudgetRevenue)}}
            </span>
          </template>
        </el-table-column>
        <el-table-column  prop="accountName"  label="账户名称" width="150">
            <div class="item" slot-scope="scope">
              <div v-if="!scope.row.isSum">
                <el-input size="mini" class="item__input" v-model="scope.row.accountName" @blur="save(scope.row)"></el-input>
                <div class="item__txt">{{scope.row.accountName}}</div>
              </div>
            </div>
        </el-table-column>
        <el-table-column  prop="budgetRevenue"  label="当月支出明细" width="120">
          <template slot-scope="scope">
            <el-link v-if="!scope.row.isSum" type="primary" @click="handleDetail(scope.row)">查看明细</el-link>
          </template>
        </el-table-column>
        <el-table-column  prop="curMonthReceived"  label="本月本次支出资金" width="200">
          <template slot="header">
            <span>本月本次支出资金</span>
            <!-- <el-button style="margin-left:10px" type="primary" size="mini" plain @click="handleBatchSave">保存</el-button> -->
          </template>
            <div class="item" slot-scope="scope">
                <el-input-number 
                v-if="!scope.row.isSum"
                style="width:180px"
                size="mini" 
                class="item__input" 
                :precision="2" :step="0.01"
                v-model="scope.row.curMonthReceived" 
                @blur="saveNum(scope.row)">
              </el-input-number>
              <div class="item__txt">
                {{formaNum(scope.row.curMonthReceived)}}
              </div>
            </div>
        </el-table-column>
        <el-table-column  prop="actualTotalRevenue"  label="实际总支出"  width="200">
            <div class="item" slot-scope="scope">
                <el-input-number 
                style="width:180px"
                 size="mini" 
                 class="item__input" 
                 :precision="2" :step="0.01"
                 v-model="scope.row.actualTotalRevenue" 
                 @blur="save(scope.row)"></el-input-number>
                <div class="item__txt" v-if="!scope.row.isSum">
                  {{formaNum(scope.row.actualTotalRevenue)}}
                </div>
            </div>
        </el-table-column>
        <el-table-column  prop="accumulatedArrears"  label="累计欠费" width="200">
            <div class="item" slot-scope="scope">
                <el-input-number
                style="width:180px"
                  size="mini" 
                  class="item__input" 
                  :precision="2" :step="0.01"
                  v-model="scope.row.accumulatedArrears"
                  @blur="save(scope.row)"></el-input-number>
                <div class="item__txt" v-if="!scope.row.isSum">
                  {{formaNum(scope.row.accumulatedArrears)}}
                </div>
            </div>
        </el-table-column>
        <el-table-column  prop="incomeTimeRange"  label="支出时间区间" width="200">
            <!-- <div class="item" slot-scope="scope">
                <el-input size="mini" class="item__input" v-model="scope.row.incomeTimeRange" @blur="save(scope.row)"></el-input>
                <div class="item__txt">{{scope.row.incomeTimeRange}}</div>
            </div> -->
        </el-table-column>
        <el-table-column  prop="incomeTypeN"  label="支出类型" width="120">
            <!-- <div class="item" slot-scope="scope">
                <el-select size="mini" v-model="scope.row.incomeType" class="item__input" placeholder="请选择" @change="save(scope.row)"  >
                  <el-option
                    v-for="item in typeList"
                    :key="item.value"
                    :label="item.name"
                    :value="item.value">
                  </el-option>
                </el-select>
                <div class="item__txt">{{scope.row.incomeTypeN}}</div>
            </div> -->
        </el-table-column>
        <el-table-column  prop="endDateStr"  label="终止日" width="150">
            <!-- <div class="item" slot-scope="scope">
                <el-date-picker
                  style="width:130px"
                  size="mini"
                  class="item__input"
                  @blur="save(scope.row)"
                  v-model="scope.row.endDateStr"
                  type="date"
                  placeholder="选择日期"
                  value-format="yyyy-MM-dd"
                  format="yyyy-MM-dd">
                </el-date-picker>
                <div class="item__txt">{{scope.row.endDateStr}}</div>
            </div> -->
        </el-table-column>
        <el-table-column  prop="departmentStr"  label="支出实现部门"  width="200">
            <!-- <div class="item" slot-scope="scope">
                <el-input size="mini" class="item__input" v-model="scope.row.incomeDepartment" @blur="save(scope.row)"></el-input>
                <div class="item__txt">{{scope.row.incomeDepartment}}</div>
            </div> -->
        </el-table-column>
        <el-table-column  prop="accountingName"  label="会计主体名称" width="200">
            <div class="item" slot-scope="scope">
              <div v-if="!scope.row.isSum">
                <el-input size="mini" class="item__input" v-model="scope.row.accountingName" @blur="save(scope.row)"></el-input>
                <div class="item__txt">{{scope.row.accountingName}}</div>
              </div>
            </div>
        </el-table-column>
        <el-table-column  prop="chargePerson"  label="责任人"></el-table-column>
        <el-table-column  prop="bak"  label="备注" width="180">
            <div class="item" slot-scope="scope">
              <div v-if="!scope.row.isSum">
                <el-input size="mini" class="item__input" v-model="scope.row.bak" @blur="save(scope.row)"></el-input>
                <div class="item__txt">{{scope.row.bak}}</div>
              </div>
            </div>
        </el-table-column>
        <el-table-column  prop="yearMonthStr"  label="所属年月" width="120"></el-table-column>
        <el-table-column  prop="attachment"  label="附件">
          <template slot-scope="scope">
            <el-link type="primary" :href="scope.row.attachment" target="_blank" :underline="false">
            <el-image
              style="width: 35px; height: 35px"
              v-if="scope.row.attachment"
              :src="scope.row.attachment"
              :fit="fit">
            </el-image>
            </el-link>
          </template>
        </el-table-column>
      </el-table>
      <el-dialog
      title="批量导入数据"
      :visible.sync="batchImportVisible"
      :modal-append-to-body="false"
      style="text-align: left"
      :close-on-click-modal="false"
    >
      <el-form label-width="150px">
        <el-form-item label="模板下载">
          <el-link
            href="https://oss.xiaoxinda.com/jk-temporary-workers/person.xls"
            type="primary"
            target="_blank"
            >点击下载模板</el-link
          >
        </el-form-item>
        <el-form-item label="上传文件">
          <el-upload
            class="upload-demo"
            accept=".xls"
            :action="uploadUrlXls"
            :data="uploadXlsData"
            :headers="headers"
            name="uploadFile"
            :multiple="true"
            :limit="1"
            :file-list="batchImportFileList"
          >
            <el-button size="small" type="primary" :loading="xlsLoading"
              >点击上传</el-button
            >
            <div slot="tip" class="el-upload__tip">
              只能上传xls文件，且不超过500kb
            </div>
          </el-upload>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="batchImportVisible = false"
          >关 闭</el-button
        >
      </div>
    </el-dialog>
    <expensesModifyRecord-list
        v-if="showModal"
        :businessKey="businessKey"
        :title="modalTitle"
        @close="onDetailModalClose"
      ></expensesModifyRecord-list>
      <budgetModifyRecord-list
        v-if="showModal2"
        :businessKey="businessKey"
        :title="modalTitle2"
        @close="onDetailModalClose2"
      ></budgetModifyRecord-list>
    </div>
  </template>
  <script>
  import Constant from "@/constant";
  import fundExpensesInfoApi from "@/api/base/fundExpensesInfo";
  import templateInfoApi from "@/api/base/templateInfo";
  import { getToken } from "@/utils/auth"; // get token from cookie
  import permissionApi from "@/api/sys/permission";
  import expensesModifyRecordList from "./expensesModifyRecord-list"
  import budgetModifyRecordList from "./budgetModifyRecord-list"
  
  export default {
    name: 'baseFundIncomeInfoInfo',
    data() {
      var self = this;
  
      return {
        queryModel: {
          yearMonth: "",
          name: "",
          selectTemplateId:"",
        },
        loading: false,
        tableData: [],
        pageIndex: 1,
        pageSize: 10,
        totalPages: 0,
        totalElements: 0,
        field: "",
        direction: "",
        pageSizeList: [10, 20, 30],
        multipleSelection: [],
        modalTitle: "",
        modalTitle2: "",         
        businessKey: "",
        showModal: false,
        showModal2: false,
        dialogFormVisible:false,
        batchImportVisible: false,
        batchImportVisible2:false,
        xlsLoading: false,
        submitting:false,
        selectTamplateId:"",
        selectYear:"",
        batchImportFileList: [],
        chargingStationResult:[],
        fit: 'fill',
        // 需要编辑的属性
        editProp: ['accountName','curMonthReceived','incomeTimeRange','incomeType',
        'endDateStr','incomeDepartment','accountingName','bak'],
         // 保存进入编辑的cell
        clickCellMap: {},
        templateList:[],
        selectTemplateId:"",
        uploadUrlXls: Constant.serverUrl + "/base/fundIncomeInfo/importXls",
        uploadXlsData: {
            subFolder: "personInfo",
        },
        headers: {
            Authorization: getToken(),
        },
        //上传地址
        uploadUrl: Constant.serverUrl + "/uploadPicture",
        uploadData: {
          subFolder: "fundIncomeInfo",
        },
        fileUrl: "",
        typeList:[
          {
            "name":"按月",
            "value":"1"
          },
          {
            "name":"按年",
            "value":"2"
          },
          {
            "name":"按季",
            "value":"3"
          },
          {
            "name":"按学期",
            "value":"4"
          },
        ],

      };
    },
    computed:{
      formaNum(){
        return function(numer){
          if(numer!=null){
            return numer.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
          }
          else{
            numer;
          }
        }
      }
    },
    created(){
      var self = this;
    
      // templateInfoApi.list().then(function (response) {
      //   var jsonData = response.data;
      //   if (jsonData.result) {
      //     if (jsonData.data != null && jsonData.data != "") {
      //       self.templateList = jsonData.data;
      //       if(self.templateList.length>0){
      //         self.queryModel.selectTemplateId = self.templateList[0].id;
      //       }
            
      //     }
      //   }
      // });

      self.getNowTime();
    },
    methods: {
      handleEditNum(event,row){
          if(event!=0){
            var sumNum = row.actualTotalRevenue + row.curMonthReceived;
            row.actualTotalRevenue = sumNum;
          }
      },
      getNowTime() {
        var now = new Date();
        var year = now.getFullYear(); //得到年份
        var month = now.getMonth(); //得到月份
        month = month + 1;
        month = month.toString().padStart(2, "0");
        var defaultDate = `${year}-${month}`;
        this.$set(this.queryModel, "yearMonth", defaultDate);
      },
      changePage(pageIndex,exportFlag) {
        var self = this;
  
        console.log(pageIndex);
  
        self.pageIndex = pageIndex;
        var formData = new FormData();
  
        formData.append("name", self.queryModel.name);
        formData.append("yearMonth", self.queryModel.yearMonth);
        formData.append("templateId", self.queryModel.selectTemplateId);

        if(exportFlag!=null){
            formData.append("exportFlag", exportFlag);
        }

        self.loading = true;
  
        fundExpensesInfoApi.pageList(formData).then(function(response) {
          self.loading = false;
            var jsonData = response.data;
            if(jsonData.result) {
                if(exportFlag){
                    //导出
                    self.$message({
                        showClose: true,
                        type: "success",
                        message: `报表已生成，<a href="${jsonData.data}">请点击链接下载</a>`,
                        dangerouslyUseHTMLString: true,
                        duration: 30000
                    });
                }
                else{
                    //分页查看
                    var page = jsonData.data;

                    self.tableData = page.data;
                    // self.totalPages = page.totalPages;
                    // self.totalElements = page.recordsTotal;
                }
            }
            else{
                self.$message.warning(jsonData.message);
            }
        }).catch((error)=>{
          self.loading = false;
        });
      },
      handleReset(name) {
        this.$refs[name].resetFields();
      },
      handleDelete(record) {
        var self = this;
        if(record.id==null||record.id==""){
            self.$message({
                type: "error",
                message: "该条记录未填写数据无需删除！"
            });
            return;
        }
  
        this.$confirm("是否确认删除？", "提示", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning"
        }).then(() => {
            fundExpensesInfoApi.remove(record.id).then(function(response) {
            var jsonData = response.data;
  
            if (jsonData.result) {
              // var index = self.tableData.indexOf(record);
              // self.tableData.splice(index, 1);
              self.changePage(self.pageIndex);
  
              self.$message({
                type: "success",
                message: "删除成功!"
              });

              var datalist = self.formModel.tableData;

              datalist.splice(datalist.indexOf(record), 1);
            }
          });
        });
      },


        // /** 鼠标移入cell */
        // handleCellEnter (row, column, cell, event) {
        //     const property = column.property
        //     if (property === 'date' || property === 'name' || property === 'food') {
        //         cell.querySelector('.item__txt').classList.add('item__txt--hover')
        //     }
        // },
        // /** 鼠标移出cell */
        // handleCellLeave (row, column, cell, event) {
        //     const property = column.property
        //     if (this.editProp.includes(property)) {
        //         cell.querySelector('.item__txt').classList.remove('item__txt--hover')
        //     }
        // },

        /** 点击cell */
        handleCellClick(row, column, cell, event) {
            const property = column.property
            if (this.editProp.includes(property)) {
                // 保存cell
                this.saveCellClick(row, cell)
                cell.querySelector('.item__txt').style.display = 'none'
                cell.querySelector('.item__input').style.display = 'block'
                cell.querySelector('input').focus()
            }
        },
        /** 取消编辑状态 */
        cancelEditable (cell) {
            cell.querySelector('.item__txt').style.display = 'block'
            cell.querySelector('.item__input').style.display = 'none'
        },
        /** 保存进入编辑的cell */
        saveCellClick (row, cell) {
            const id = row.id;
            if (this.clickCellMap[id] !== undefined) {
                if (!this.clickCellMap[id].includes(cell)) {
                  this.clickCellMap[id].push(cell)
                }
            } else {
                this.clickCellMap[id] = [cell]
            }
        },

        /** 保存数据 */
        save (row) {
            const id = row.id;
            if(row.incomeType!=""&&row.incomeType!=null){
              if(row.incomeType=='1'){
                row.incomeTypeN="按月";
              }
              else if(row.incomeType=='2'){
                row.incomeTypeN="按年";
              }
              else if(row.incomeType=='3'){
                row.incomeTypeN="按季";
              }
              else if(row.incomeType=='4'){
                row.incomeTypeN="按学期";
              }
            }
            
            // 取消本行所有cell的编辑状态
            this.clickCellMap[id].forEach(cell => {
                this.cancelEditable(cell);
            })
            this.clickCellMap[id] = []
        },

        handleSave(row){
          var self = this;
          //alert(JSON.stringify(row));
          if(self.checkEmptyInJSON(row)){
            if(!self.checkIfNumber(row.curMonthReceived)){
              self.$message({
                message: "本月本次支出资金应填写数字，请重新填写！",
                type: "error",
              });
              return 
            }
          }

          //alert(JSON.stringify(row))

          self.handleSubmit(row);
        },

        handleAdd() {
            this.tableData.push({
                serialNumber:"",
                name: "",
                budgetRevenue:"",
                accountName:"",
                curMonthReceived:"",
                actualTotalRevenue:"",
                accumulatedArrears:"",
                incomeTimeRange:"",
                incomeType:"",
                endDateStr:"",
                incomeDepartment:"",
                attachment:"",
                accountingName:"",
                bak:"",
            });
        },

        //判断json是否全为空
        checkEmptyInJSON(jsonObj) {
          for (let key in jsonObj) {
              if (jsonObj.hasOwnProperty(key)) {
                  if (jsonObj[key] != null && jsonObj[key] != undefined && jsonObj[key] != '') {
                    return true;
                  }
              }
          }
          return false;
        },

        //判断是否为数字
        checkIfNumber(val) {
          if(val!=null && val!=""){
            return this.isNumber = /^\d+(\.\d+)?$/.test(val);
          }
          else{
            return true;
          }
        },

        handleSubmit(row) {
          var self = this;

          (function () {
            var id = row.id;

            if (id == null || id.length == 0) {
              return fundExpensesInfoApi.add(row);
            } else {
              return fundExpensesInfoApi.update(row);
            }
          })().then(function (response) {
            var jsonData = response.data;

            if (jsonData.result) {
              self.$message({
                message: "保存成功!",
                type: "success",
              });

              self.changePage(1,null)
            } else {
              self.$message({
                message: jsonData.message + "",
                type: "warning",
              });

              self.$emit("close", false);
            }
          });
        },

        exportXls() {
          this.changePage(1,true);
        },


        handleRemove(file, fileList) {
          console.log(file, fileList);
        },
        handlePreview(file) {
          console.log(file);
        },
        handleExceed(files, fileList) {
          this.$message.warning(`当前限制选择 3 个文件，本次选择了 ${files.length} 个文件，共选择了 ${files.length + fileList.length} 个文件`);
        },
        beforeRemove(file, fileList) {
          return this.$confirm(`确定移除 ${ file.name }？`);
        },

        saveNum(row){
          // var sumNum = row.total + row.curMonthReceived;
          // row.actualTotalRevenue = sumNum;

          // row.accumulatedArrears = row.budgetRevenue-sumNum;
        
          this.save(row);
        },
        handleAvatarSuccess(res, row) {
          row.attachment = res.data;
        },
        beforeAvatarUpload(file) {
          const isLt2M = file.size / 1024 / 1024 < 2;
    
          if (!isLt2M) {
            this.$message.error("上传头像图片大小不能超过 2MB!");
          }
          return isLt2M;
        },
        tableRowClassName({row, rowIndex}) {
          if (row.isSum) {
            return 'success-row';
          }
          else{
            return ''; 
          }
        },
        handleBatchSave(){
          var self = this;

          //alert(JSON.stringify(self.tableData));

          (function () {
            return fundExpensesInfoApi.batchSave(self.tableData);
          })().then(function (response) {
            var jsonData = response.data;

            if (jsonData.result) {
              self.$message({
                message: "保存成功!",
                type: "success",
              });

              self.changePage(1,null)
            } else {
              self.$message({
                message: jsonData.message + "",
                type: "warning",
              });
            }
          });

        },
        handleDetail(record){
          var self = this;
          self.modalTitle = "查看当月支出明细";
          self.businessKey = record.id;
          self.showModal = true;
        },
        handleBudgetDetail(record){
          var self = this;
          self.modalTitle2 = "查看预算修改明细";
          self.businessKey = record.id;
          self.showModal2 = true;
        },
        onDetailModalClose(refreshed,flag) {
          this.showModal = false;
          if(flag) {
            this.changePage(this.pageIndex);
          }
        },
        onDetailModalClose2(refreshed) {
          this.showModal2 = false;
          if(refreshed) {
            this.changePage(this.pageIndex);
          }
        },
      
    },
    mounted: function() {
      var self = this;

      var formData = new FormData();
  
      formData.append("type", "2");
      
      templateInfoApi.list(formData).then(function (response) {
        var jsonData = response.data;
        if (jsonData.result) {
          if (jsonData.data != null && jsonData.data != "") {
            self.templateList = jsonData.data;
            if(self.templateList.length>0){
              self.queryModel.selectTemplateId = self.templateList[0].id;
              self.changePage(1,null);
            }
          }
        }
      });
    },
    components: {
      "expensesModifyRecord-list":expensesModifyRecordList,
      "budgetModifyRecord-list":budgetModifyRecordList
    }
  };
  </script>
  <style lang="scss" scoped>
  .el-breadcrumb {
    margin: 10px;
    line-height: 20px;
  }
  
  .el-divider {
    margin: 5px 0;
  }
  
  .demo-form-inline {
    margin-left: 10px;
    text-align: left;
  }
  
  .button-group {
    padding: 10px;
    text-align: left;
  }

  .item{
    .item__input{
      display: none;
      /* 调整elementUI中样式 如果不需要调整请忽略 */
      .el-input__inner{
        height: 24px!important;
      }
      /* 调整elementUI中样式 如果不需要调整请忽略 */
      .el-input__suffix{
        i{
          font-size: 12px !important;
          line-height: 26px !important;
        }
      }
    }
    .item__txt{
      box-sizing: border-box;
      border: 1px solid transparent;
      line-height: 24px;
      padding: 0 8px;
    }
    .item__txt--hover{
      border: 1px solid #dddddd;
      border-radius: 4px;
      cursor: text;
    }
  }
  .hand-cursor {
  cursor: pointer; /* 将鼠标光标设置为手形 */
  }
  </style>
  <style>
  .el-table .success-row {
    background: #f0f9eb;
  }
</style>
