12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064 |
- <template>
- <!-- 电力运方单签收 -->
- <div class="EODSignFor">
- <div class="box">
- <div class="box-top">
- <el-form
- style="overflow: hidden;"
- :style="filterForm.show ? null : { height: '0px' }"
- size="mini"
- label-width="110px"
- >
- <el-row>
- <el-col :span="12">
- <el-form-item label="编制时间">
- <el-date-picker
- type="datetimerange"
- v-model="filterForm.data.creattime"
- placeholder=""
- style="width: 100%;"
- value-format="yyyy-MM-dd HH:mm:ss"
- format="yyyy-MM-dd HH:mm:ss"
- ></el-date-picker>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="运行主管">
- <el-input clearable
- v-model="filterForm.data.applyman"
- placeholder=""
- style="width: 100%;"
- @keyup.enter.native="getTableData(1)"
- ></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="12">
- <el-form-item label="签收时间">
- <el-date-picker
- type="datetimerange"
- v-model="filterForm.data.signtime"
- placeholder=""
- style="width: 100%;"
- value-format="yyyy-MM-dd HH:mm:ss"
- format="yyyy-MM-dd HH:mm:ss"
- ></el-date-picker>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="用户名称">
- <el-input clearable
- v-model="filterForm.data.manname"
- placeholder=""
- style="width: 100%;"
- @keyup.enter.native="getTableData(1)"
- ></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="12">
- <el-form-item label="实际执行时间">
- <el-date-picker
- type="datetimerange"
- v-model="filterForm.data.executivetime"
- placeholder=""
- style="width: 100%;"
- value-format="yyyy-MM-dd HH:mm:ss"
- format="yyyy-MM-dd HH:mm:ss"
- ></el-date-picker>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="变电所(室)">
- <el-input clearable
- v-model="filterForm.data.changeelectricroom"
- placeholder=""
- style="width: 100%;"
- @keyup.enter.native="getTableData(1)"
- ></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="12">
- <el-form-item label="停役持续开始时间">
- <el-date-picker
- type="datetimerange"
- v-model="filterForm.data.starttime"
- placeholder=""
- style="width: 100%;"
- value-format="yyyy-MM-dd HH:mm:ss"
- format="yyyy-MM-dd HH:mm:ss"
- ></el-date-picker>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="线路(设备)">
- <el-input clearable
- v-model="filterForm.data.lineequip"
- placeholder=""
- style="width: 100%;"
- @keyup.enter.native="getTableData(1)"
- ></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="12">
- <el-form-item label="停电工作开始时间">
- <el-date-picker
- type="datetimerange"
- v-model="filterForm.data.tdstarttime"
- placeholder=""
- style="width: 100%;"
- value-format="yyyy-MM-dd HH:mm:ss"
- format="yyyy-MM-dd HH:mm:ss"
- ></el-date-picker>
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="单据状态">
- <el-select
- filterable clearable
- v-model="filterForm.data.billstatus"
- placeholder=""
- style="width: 100%;"
- disabled
- >
- <el-option
- v-for="item of nameObj.billstatus.arr"
- :key="item.id"
- :value="item.id"
- :label="item.name"
- ></el-option>
- </el-select>
- </el-form-item>
- </el-col>
- <!-- <el-col :span="6">
- <el-form-item label="操作状态">
- <el-select
- filterable clearable
- v-model="filterForm.data.operatestatus"
- placeholder=""
- style="width: 100%;"
- >
- <el-option
- v-for="item of nameObj.operatestatus.arr"
- :key="item.id"
- :value="item.id"
- :label="item.name"
- ></el-option>
- </el-select>
- </el-form-item>
- </el-col> -->
- </el-row>
- </el-form>
- <div class="box-top-gjl">
- <div style="float:right; text-align: right;">
- <el-button
- class="button"
- type="primary"
- size="mini"
- icon="el-icon-search"
- v-privilege="activeMenu + 'QUERY'"
- @click="getTableData(1)"
- >查询</el-button>
- <el-button
- class="button"
- type="primary"
- size="mini"
- icon="el-icon-refresh"
- v-privilege="activeMenu + 'QUERY'"
- @click="tableDataCancel();"
- >重置</el-button>
- <el-button
- size="mini"
- :icon="filterForm.show ? 'el-icon-caret-top' : 'el-icon-caret-bottom'"
- :title="filterForm.show ? '收起搜索区' : '展开搜索区'"
- @click="filterForm.show = !filterForm.show;
- $nextTick(() => {
- singleTableHeight = getRoleHeight($refs['singleTable'].$el) - 45;
- }
- );"
- >{{ filterForm.show ? '收起' : '展开' }}</el-button>
- </div>
- </div>
- </div>
- <div class="box-bottom">
- <el-table stripe
- id="singleTable"
- ref="singleTable"
- :data="tableData"
- v-loading="tableLoading"
- style="width: 100%;"
- :height="singleTableHeight"
- border
- size="mini"
- highlight-current-row
- >
- <el-table-column
- sortable
- prop="billsno"
- label="运方单编号"
- min-width="100px"
- :show-overflow-tooltip="true"
- ></el-table-column>
- <el-table-column
- sortable
- prop="creattime"
- label="编制时间"
- min-width="100px"
- :show-overflow-tooltip="true"
- ></el-table-column>
- <el-table-column
- sortable
- prop="applyman"
- label="运行主管"
- min-width="100px"
- :show-overflow-tooltip="true"
- ></el-table-column>
- <el-table-column
- sortable
- prop="manname"
- label="用户名称"
- min-width="100px"
- :show-overflow-tooltip="true"
- ></el-table-column>
- <el-table-column
- sortable
- prop="lineequip"
- label="线路(设备)"
- min-width="100px"
- :show-overflow-tooltip="true"
- ></el-table-column>
- <el-table-column
- sortable
- prop="chargeman"
- label="工作负责人"
- min-width="100px"
- :show-overflow-tooltip="true"
- ></el-table-column>
- <el-table-column
- sortable
- prop="signman"
- label="签收人"
- min-width="100px"
- :show-overflow-tooltip="true"
- ></el-table-column>
- <el-table-column
- sortable
- prop="signtime"
- label="签收时间"
- min-width="100px"
- :show-overflow-tooltip="true"
- ></el-table-column>
- <!-- <el-table-column
- sortable
- prop="operatestatus"
- label="操作状态"
- min-width="100px"
- :show-overflow-tooltip="true"
- >
- <template slot-scope="scope">
- <span>{{ nameObj.operatestatus.obj[scope.row.operatestatus] ? nameObj.operatestatus.obj[scope.row.operatestatus] : scope.row.operatestatus }}</span>
- </template>
- </el-table-column> -->
- <el-table-column
- sortable
- prop="billstatus"
- label="单据状态"
- min-width="100px"
- :show-overflow-tooltip="true"
- >
- <template slot-scope="scope">
- <span>{{ nameObj.billstatus.obj[scope.row.billstatus] ? nameObj.billstatus.obj[scope.row.billstatus] : scope.row.billstatus }}</span>
- </template>
- </el-table-column>
- <el-table-column
- class-name="gn-TableDownloadExcel-none"
- label="操作"
- align="center"
- width="70px"
- fixed="right"
- >
- <template slot-scope="scope">
- <div>
- <el-button
- type="primary"
- size="mini"
- @click="but_edit(scope.row)"
- >签收</el-button>
- </div>
- </template>
- </el-table-column>
- </el-table>
- <el-pagination
- layout="total, sizes, prev, pager, next, jumper"
- :total="total"
- :page-sizes="[10, 20, 50, 100, 500, 1000]"
- :page-size="pageSize"
- :current-page.sync="pageNum"
- @size-change="tableSizeChange"
- @current-change="getTableData()"
- style="text-align: right;margin-top: 10px;"
- ></el-pagination>
- </div>
- </div>
- <el-dialog
- :title="'电力运行方式变更通知单 - 签收'"
- :visible.sync="dialog.editorBox.show"
- width="940px"
- :close-on-click-modal="false"
- :show-close="!loading"
- >
- <div>
- <el-form
- ref="dialog_form"
- :model="dialog.editorBox.form.data"
- :rules="dialog.editorBox.form.rules"
- size="mini"
- label-width="120px"
- >
- <el-row>
- <el-col :span="8">
- <el-form-item label="介质系统" prop="mediumsystem">
- <el-input clearable
- v-model="dialog.editorBox.form.data.mediumsystem"
- placeholder=""
- style="width: 100%;"
- disabled
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="运方单编号" prop="billsno">
- <el-input clearable
- v-model="dialog.editorBox.form.data.billsno"
- placeholder=""
- style="width: 100%;"
- disabled
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="编制时间" prop="creattime">
- <el-date-picker
- type="datetime"
- v-model="dialog.editorBox.form.data.creattime"
- placeholder=""
- style="width: 100%;"
- value-format="yyyy-MM-dd HH:mm:ss"
- disabled
- ></el-date-picker>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="8">
- <el-form-item label="运行主管" prop="applyman">
- <el-input clearable
- v-model="dialog.editorBox.form.data.applyman"
- placeholder=""
- style="width: 100%;"
- disabled
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="用户名称" prop="manname">
- <el-input clearable
- v-model="dialog.editorBox.form.data.manname"
- placeholder=""
- style="width: 100%;"
- disabled
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="通知日期" prop="noticetime">
- <el-date-picker
- type="datetime"
- v-model="dialog.editorBox.form.data.noticetime"
- placeholder=""
- style="width: 100%;"
- value-format="yyyy-MM-dd HH:mm:ss"
- disabled
- ></el-date-picker>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="8">
- <el-form-item label="变电所(室)" prop="changeelectricroom">
- <el-input clearable
- v-model="dialog.editorBox.form.data.changeelectricroom"
- placeholder=""
- style="width: 100%;"
- disabled
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="线路(设备)" prop="lineequip">
- <el-input clearable
- v-model="dialog.editorBox.form.data.lineequip"
- placeholder=""
- style="width: 100%;"
- disabled
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="工作负责人" prop="chargeman">
- <el-input clearable
- v-model="dialog.editorBox.form.data.chargeman"
- placeholder=""
- style="width: 100%;"
- disabled
- ></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="8">
- <el-form-item label="停役持续开始时间" prop="starttime">
- <el-date-picker
- type="datetime"
- v-model="dialog.editorBox.form.data.starttime"
- placeholder=""
- style="width: 100%;"
- value-format="yyyy-MM-dd HH:mm:ss"
- disabled
- ></el-date-picker>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="停役持续结束时间" prop="stoptime">
- <el-date-picker
- type="datetime"
- v-model="dialog.editorBox.form.data.stoptime"
- placeholder=""
- style="width: 100%;"
- value-format="yyyy-MM-dd HH:mm:ss"
- disabled
- ></el-date-picker>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="联系电话" prop="chargetel">
- <el-input clearable
- v-model="dialog.editorBox.form.data.chargetel"
- placeholder=""
- style="width: 100%;"
- disabled
- ></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="8">
- <el-form-item label="停电工作开始时间" prop="tdstarttime">
- <el-date-picker
- type="datetime"
- v-model="dialog.editorBox.form.data.tdstarttime"
- placeholder=""
- style="width: 100%;"
- value-format="yyyy-MM-dd HH:mm:ss"
- disabled
- ></el-date-picker>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="停电工作结束时间" prop="tdstoptime">
- <el-date-picker
- type="datetime"
- v-model="dialog.editorBox.form.data.tdstoptime"
- placeholder=""
- style="width: 100%;"
- value-format="yyyy-MM-dd HH:mm:ss"
- disabled
- ></el-date-picker>
- </el-form-item>
- </el-col>
- </el-row>
- <el-container>
- <el-main style="padding: 0;">
- <el-form-item label="工作内容" prop="workcontent">
- <el-input clearable
- class="nr-textarea"
- type="textarea"
- v-model="dialog.editorBox.form.data.workcontent"
- placeholder=""
- style="width: 100%;"
- disabled
- ></el-input>
- </el-form-item>
- </el-main>
- <el-aside
- width="200px"
- style="padding-left: 15px;"
- >
- <zj-fileUploadBox class="fileUploadBox" :uploadBut="false" :files="dialog.editorBox.files"></zj-fileUploadBox>
- </el-aside>
- </el-container>
- <el-form-item label="运行方式" prop="runway">
- <el-input clearable
- type="textarea"
- v-model="dialog.editorBox.form.data.runway"
- placeholder=""
- style="width: 100%;"
- disabled
- ></el-input>
- </el-form-item>
- <el-form-item label="注意事项" prop="attention">
- <el-input clearable
- type="textarea"
- v-model="dialog.editorBox.form.data.attention"
- placeholder=""
- style="width: 100%;"
- disabled
- ></el-input>
- </el-form-item>
- <el-form-item label="工作内容修改" prop="contentchange">
- <el-input clearable
- type="textarea"
- v-model="dialog.editorBox.form.data.contentchange"
- placeholder=""
- style="width: 100%;"
- disabled
- ></el-input>
- </el-form-item>
- <el-row>
- <el-col :span="16">
- <el-form-item label="签收人" prop="signman">
- <el-input clearable
- v-model="dialog.editorBox.form.data.signman"
- placeholder=""
- style="width: 100%;"
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="签收时间" prop="signtime">
- <el-date-picker
- type="datetime"
- v-model="dialog.editorBox.form.data.signtime"
- placeholder=""
- style="width: 100%;"
- value-format="yyyy-MM-dd HH:mm:ss"
- ></el-date-picker>
- </el-form-item>
- </el-col>
- </el-row>
- <el-form-item label="执行情况" prop="executivesituation">
- <el-input clearable
- type="textarea"
- v-model="dialog.editorBox.form.data.executivesituation"
- placeholder=""
- style="width: 100%;"
- disabled
- ></el-input>
- </el-form-item>
- <el-form-item label="备注" prop="note">
- <el-input clearable
- type="textarea"
- v-model="dialog.editorBox.form.data.note"
- placeholder=""
- style="width: 100%;"
- disabled
- ></el-input>
- </el-form-item>
- <el-row>
- <el-col :span="16">
- <el-form-item label="执行负责人" prop="executivechargeman">
- <el-input clearable
- v-model="dialog.editorBox.form.data.executivechargeman"
- placeholder=""
- style="width: 100%;"
- disabled
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="实际执行时间" prop="executivetime">
- <el-date-picker
- type="datetime"
- v-model="dialog.editorBox.form.data.executivetime"
- placeholder=""
- style="width: 100%;"
- value-format="yyyy-MM-dd HH:mm:ss"
- disabled
- ></el-date-picker>
- </el-form-item>
- </el-col>
- </el-row>
- </el-form>
- </div>
- <span
- slot="footer"
- class="dialog-footer"
- >
- <el-button
- type="danger"
- @click="dropBut()"
- >废 弃</el-button>
- <el-button
- type="danger"
- @click="createBut()"
- >返回编制人</el-button>
- <el-button @click="dialog.editorBox.show = false" :loading="loading">取 消</el-button>
- <el-button
- type="primary"
- @click="dataSave()"
- >暂 存</el-button>
- <el-button
- type="primary"
- @click="submitBut()"
- >提 交</el-button>
- </span>
- </el-dialog>
- </div>
- </template>
- <script>
- import fileUploadBox from '~/components/zg/fileUploadBox.vue';
- import { formatDate } from '@/utils/util.js';
- import store from '@/store/index.js';
- export default {
- name: 'EODSignFor',
- components: {
- 'zj-fileUploadBox': fileUploadBox
- },
- data () {
- return {
- store,
- userInfo: {
- data: null
- },
- activeMenu: '',
- filterForm: {
- show: true,
- data: {
- creattime: '',
- applyman: '',
- signtime: '',
- manname: '',
- executivetime: '',
- changeelectricroom: '',
- starttime: '',
- lineequip: '',
- tdstarttime: '',
- billstatus: 'sign'
- // operatestatus: ''
- },
- rules: {
- }
- },
- pageNum: 1,
- pageSize: 20,
- total: 0,
- singleTableHeight: 100,
- tableData: [
- // {
- // billsno: 'TFY_20190826_0001',
- // creattime: '2019-08-26 15:03:56',
- // applyman: 'admin',
- // manname: '111',
- // lineequip: 'cs',
- // chargeman: '222',
- // operatestatus: '暂存',
- // billstatus: '编制'
- // }
- ],
- nameObj: {
- // operatestatus: {
- // obj: {
- // 'save': '暂存'
- // },
- // arr: [
- // {
- // id: 'save',
- // name: '暂存'
- // }
- // ]
- // },
- billstatus: {
- obj: {
- '': '全部',
- 'create': '编制',
- 'sign': '待签收',
- 'execute': '待执行',
- 'executed': '结束',
- 'drop': '报废'
- },
- arr: [
- {
- id: '',
- name: '全部'
- },
- {
- id: 'create',
- name: '编制'
- },
- {
- id: 'sign',
- name: '待签收'
- },
- {
- id: 'execute',
- name: '待执行'
- },
- {
- id: 'executed',
- name: '结束'
- },
- {
- id: 'drop',
- name: '报废'
- }
- ]
- }
- },
- loading: false,
- tableLoading: false,
- dialog: {
- editorBox: {
- show: false,
- type: '',
- form: {
- data: {
- mediumsystem: '电力',
- billsno: '',
- creattime: '',
- applyman: '',
- manname: '',
- noticetime: '',
- changeelectricroom: '',
- lineequip: '',
- chargeman: '',
- starttime: '',
- stoptime: '',
- chargetel: '',
- tdstarttime: '',
- tdstoptime: '',
- workcontent: '',
- runway: '',
- attention: '',
- contentchange: '',
- signman: '',
- signtime: '',
- executivesituation: '',
- note: '',
- executivechargeman: '',
- executivetime: '',
- billstatus: '',
- content: '' // 上传文件名
- },
- rules: {
- signman: [
- { required: true, message: '该项不能为空', trigger: 'change' }
- ],
- signtime: [
- { required: true, message: '该项不能为空', trigger: 'change' }
- ]
- }
- },
- // content
- files: [
- // {
- // name: '测试',
- // url: '',
- // file: null,
- // operation: '' // add or del
- // }
- ]
- }
- }
- };
- },
- created () {
- this.activeMenu = window.localStorage.getItem('activeMenu');
- },
- mounted () {
- let that = this;
- window.PEDataObj = {
- // 将数据绑定到window上,供main页面使用
- vm: that,
- // tableArr:用于导出成Excel的表格的信息
- tableArr: [
- {
- name: '',
- id: 'singleTable'
- }
- ]
- };
- that.$nextTick(() => {
- // 立即获取的height有一定偏差,通过setTimeout延迟来解决
- setTimeout(() => {
- that.singleTableHeight = that.getRoleHeight(that.$refs['singleTable'].$el) - 45;
- }, 1);
- });
- that.store.dispatch('getUserInfo').then((res) => {
- that.userInfo.data = res.data;
- });
- that.getTableData();
- },
- methods: {
- // 计算树区域高度
- getRoleHeight (dom) {
- return window.innerHeight - dom.offsetTop;
- },
- // 获取表格中的数据
- getTableData (pageNum) {
- let that = this,
- params = {
- creattime: that.filterForm.data.creattime[0],
- creattimee: that.filterForm.data.creattime[1],
- applyman: that.filterForm.data.applyman,
- signtime: that.filterForm.data.signtime[0],
- sigtimee: that.filterForm.data.signtime[1],
- manname: that.filterForm.data.manname,
- executivetime: that.filterForm.data.executivetime[0],
- executivetimee: that.filterForm.data.executivetime[1],
- changeelectricroom: that.filterForm.data.changeelectricroom,
- starttime: that.filterForm.data.starttime[0],
- starttimee: that.filterForm.data.starttime[1],
- lineequip: that.filterForm.data.lineequip,
- tdstarttime: that.filterForm.data.tdstarttime[0],
- tdstarttimee: that.filterForm.data.tdstarttime[1],
- billstatus: that.filterForm.data.billstatus
- // operatestatus: that.filterForm.data.operatestatus
- };
- that.pageNum = pageNum || that.pageNum;
- that.tableLoading = true;
- let url = 'pass/ems/v1/tcm0365s/?pageNum=' + that.pageNum + '&pageSize=' + that.pageSize;
- that.axios.get(url, {
- params: params
- })
- .then(function (res) {
- if (res.code === '0') {
- let arr = [];
- for (let item of res.data.list) {
- arr.push({
- mediumsystem: item.mediumsystem,
- billsno: item.billsno,
- creattime: item.creattime,
- applyman: item.applyman,
- manname: item.manname,
- noticetime: item.noticetime,
- changeelectricroom: item.changeelectricroom,
- lineequip: item.lineequip,
- chargeman: item.chargeman,
- starttime: item.starttime,
- stoptime: item.stoptime,
- chargetel: item.chargetel,
- tdstarttime: item.tdstarttime,
- tdstoptime: item.tdstoptime,
- workcontent: item.workcontent,
- runway: item.runway,
- attention: item.attention,
- contentchange: item.contentchange,
- signman: item.signman,
- signtime: item.signtime,
- executivesituation: item.executivesituation,
- note: item.note,
- executivechargeman: item.executivechargeman,
- executivetime: item.executivetime,
- // operatestatus: item.operatestatus,
- billstatus: item.billstatus,
- content: item.content // 上传文件名
- })
- }
- that.tableData = arr;
- that.total = res.data.total;
- } else {
- that.$message.error(res.message);
- }
- that.tableLoading = false;
- }).catch(function () {
- that.tableLoading = false;
- });
- },
- // 改变表格显示条数
- tableSizeChange (val) {
- let that = this;
- that.pageSize = val;
- that.getTableData(1);
- },
- // 重置搜索
- tableDataCancel () {
- let that = this;
- for (let key in that.filterForm.data) {
- if (that.filterForm.data[key] instanceof Array) {
- that.filterForm.data[key] = [];
- } else {
- that.filterForm.data[key] = '';
- }
- }
- that.filterForm.data.billstatus = 'sign';
- that.getTableData(1);
- },
- but_edit (row) {
- let that = this;
- that.dialog.editorBox.files = [];
- for (let key in that.dialog.editorBox.form.data) {
- if (typeof row[key] !== 'undefined') {
- that.dialog.editorBox.form.data[key] = row[key];
- } else {
- console.log(key);
- }
- }
- if (row.content) {
- let fn = (row.content + '').trim().split(';')
- if (fn && fn.length > 0) {
- let billsno = row.billsno;
- for (let i = 0; i < fn.length; i++) {
- if (fn[i]) {
- let fname = {name: fn[i], url: '/icore.icp.web/pass/ems/static/' + billsno + '/' + fn[i], file: null, operation: ''};
- that.dialog.editorBox.files.push(fname);
- }
- }
- }
- }
- that.dialog.editorBox.form.data.signman = that.dialog.editorBox.form.data.signman ? that.dialog.editorBox.form.data.signman : that.userInfo.data.userName;
- that.dialog.editorBox.form.data.signtime = that.dialog.editorBox.form.data.signtime ? that.dialog.editorBox.form.data.signtime : formatDate(new Date(), 'yyyy-MM-dd HH:mm:ss');
- that.dialog.editorBox.type = 'edit';
- that.dialog.editorBox.show = true;
- },
- createBut () {
- let that = this;
- that.$confirm('是否返回给编制人?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- that.dataSave('create');
- }).catch(() => {
- });
- },
- dropBut () {
- let that = this;
- that.$confirm('是否废弃?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- that.dataSave('drop');
- }).catch(() => {
- });
- },
- submitBut () {
- let that = this;
- that.$confirm('是否提交?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- that.dataSave('submit');
- }).catch(() => {
- });
- },
- dataSave (billstatus) {
- let that = this;
- let SubmitData = {
- mediumsystem: that.dialog.editorBox.form.data.mediumsystem,
- billsno: that.dialog.editorBox.form.data.billsno,
- creattime: that.dialog.editorBox.form.data.creattime,
- applyman: that.dialog.editorBox.form.data.applyman,
- manname: that.dialog.editorBox.form.data.manname,
- noticetime: that.dialog.editorBox.form.data.noticetime,
- changeelectricroom: that.dialog.editorBox.form.data.changeelectricroom,
- lineequip: that.dialog.editorBox.form.data.lineequip,
- chargeman: that.dialog.editorBox.form.data.chargeman,
- starttime: that.dialog.editorBox.form.data.starttime,
- stoptime: that.dialog.editorBox.form.data.stoptime,
- chargetel: that.dialog.editorBox.form.data.chargetel,
- tdstarttime: that.dialog.editorBox.form.data.tdstarttime,
- tdstoptime: that.dialog.editorBox.form.data.tdstoptime,
- workcontent: that.dialog.editorBox.form.data.workcontent,
- runway: that.dialog.editorBox.form.data.runway,
- attention: that.dialog.editorBox.form.data.attention,
- contentchange: that.dialog.editorBox.form.data.contentchange,
- signman: that.dialog.editorBox.form.data.signman,
- signtime: that.dialog.editorBox.form.data.signtime,
- executivesituation: that.dialog.editorBox.form.data.executivesituation,
- note: that.dialog.editorBox.form.data.note,
- executivechargeman: that.dialog.editorBox.form.data.executivechargeman,
- executivetime: that.dialog.editorBox.form.data.executivetime,
- content: that.dialog.editorBox.form.data.content // 上传文件名
- };
- // content: that.dialog.editorBox.files 上传文件
- let message = '保存成功';
- if (billstatus) {
- SubmitData.billstatus = billstatus;
- message = '操作成功';
- }
- that.$refs['dialog_form'].validate((valid) => {
- if (valid) {
- that.loading = true;
- let url = 'pass/ems/v1/tcm0365s/';
- if (billstatus === 'submit') {
- SubmitData.billstatus = that.dialog.editorBox.form.data.billstatus;
- message = '提交成功';
- url = 'pass/ems/v1/tcm0365s/submit/';
- }
- let fileData = new FormData();
- for (let key in SubmitData) {
- fileData.append(key, SubmitData[key] ? SubmitData[key] : '');
- }
- that.axios.put(url, fileData, {headers: {'Content-Type': 'multipart/form-data'}})
- .then(function (res) {
- if (res.code === '0') {
- that.$message({
- message: message,
- type: 'success'
- });
- that.getTableData();
- that.dialog.editorBox.show = false;
- } else {
- that.$message.error(res.message);
- }
- that.loading = false;
- }).catch(function () {
- that.loading = false;
- });
- }
- });
- }
- }
- }
- </script>
- <style lang="less">
- .EODSignFor {
- min-width: 700px;
- height: 100%;
- .box {
- height: 100%;
- padding: 15px 15px 0 15px;
- .box-top {
- .el-form-item {
- margin-bottom: 7px;
- }
- .box-top-gjl {
- overflow: hidden;
- padding: 7px 0;
- border-top: 1px solid #ccc;
- }
- }
- }
- .nr-textarea {
- .el-textarea__inner {
- min-height: 130px !important;
- }
- }
- .fileUploadBox {
- height: 130px;
- min-height: 130px !important;
- margin-bottom: 18px;
- }
- }
- </style>
|