| | |
| | | role, |
| | | insProductTemplate, |
| | | manageDocumentList, |
| | | manageRecordTotal, |
| | | manageRecordCheck, |
| | | manageRecordIssueRecycle, |
| | | manageRecordIntervals, |
| | | manageRecordCancel, |
| | | manageRecordAudit, |
| | | personnel, |
| | | } |
| | | } |
| | | |
| | |
| | | checkManageDocumentAlterPdf:'/manageDocumentAlter/checkManageDocumentAlterPdf', // æä»¶åæ´-è½¬æ¢æµ |
| | | exportManageDocumentAlter:'/manageDocumentAlter/exportManageDocumentAlter', // æä»¶åæ´-å¯¼åº |
| | | } |
| | | |
| | | // 8.4è®°å½çæ§å¶--夿¥æä»¶ç¡®è®¤è®°å½ |
| | | const manageRecordTotal = { |
| | | pageManageRecordTotal:'/manageRecordTotal/pageManageRecordTotal',//åå²--å表 |
| | | submitManageRecordTotal:'/manageRecordTotal/submitManageRecordTotal',//åå²--æäº¤ |
| | | ratifyManageRecordTotal:'/manageRecordTotal/ratifyManageRecordTotal',//åå²--å®¡æ ¸ |
| | | pageManageRecordVerify:'/manageRecordVerify/pageManageRecordVerify',//å¡«å--å表 |
| | | addManageRecordVerify:'/manageRecordVerify/addManageRecordVerify',//å¡«å--æ°å¢ |
| | | delManageRecordVerify:'/manageRecordVerify/delManageRecordVerify',//å¡«å--å é¤ |
| | | doManageRecordVerify:'/manageRecordVerify/doManageRecordVerify',//å¡«å--ä¿®æ¹ |
| | | exportManageRecordVerify:'/manageRecordVerify/exportManageRecordVerify',//å¡«å--导å
¥ |
| | | } |
| | | // 8.4è®°å½çæ§å¶--æä»¶å®¡æ¹è®°å½ |
| | | const manageRecordCheck = { |
| | | pageManageRecordCheck:'/manageRecordCheck/pageManageRecordCheck ',//å表 |
| | | addManageRecordCheck:'/manageRecordCheck/addManageRecordCheck ',//æ°å¢ |
| | | doManageRecordCheck:'/manageRecordCheck/doManageRecordCheck ',//ç¼è¾ |
| | | delManageRecordCheck:'/manageRecordCheck/delManageRecordCheck ',//å é¤ |
| | | checkManageRecordCheck:'/manageRecordCheck/checkManageRecordCheck ',//å®¡æ ¸ |
| | | ratifyManageRecordCheck:'/manageRecordCheck/ratifyManageRecordCheck ',//æ¹å |
| | | exportOutManageRecordCheck:'/manageRecordCheck/exportOutManageRecordCheck ',//å¯¼åº |
| | | exportInManageRecordCheck:'/manageRecordCheck/exportInManageRecordCheck',//导å
¥ |
| | | } |
| | | |
| | | // 8.4è®°å½çæ§å¶--æä»¶åæ¾åæ¶è®°å½ |
| | | const manageRecordIssueRecycle = { |
| | | pageManageRecordIssueRecycle:'/manageRecordIssueRecycle/pageManageRecordIssueRecycle',//å表 |
| | | delManageRecordIssueRecycle:'/manageRecordIssueRecycle/delManageRecordIssueRecycle',//å é¤ |
| | | addManageRecordIssueRecycle:'/manageRecordIssueRecycle/addManageRecordIssueRecycle',//æ°å¢ |
| | | doManageRecordIssueRecycle:'/manageRecordIssueRecycle/doManageRecordIssueRecycle',//ç¼è¾ |
| | | exportOutManageRecordIssueRecycle:'/manageRecordIssueRecycle/exportOutManageRecordIssueRecycle',//å¯¼åº |
| | | exportInManageRecordIssueRecycle:'/manageRecordIssueRecycle/exportInManageRecordIssueRecycle',//导å
¥ |
| | | } |
| | | // 8.4è®°å½çæ§å¶--æä»¶å®æå®¡æ¥è®°å½ |
| | | const manageRecordIntervals = { |
| | | pageManageRecordIntervals:'/manageRecordIntervals/pageManageRecordIntervals',//å表 |
| | | addManageRecordIntervals:'/manageRecordIntervals/addManageRecordIntervals',//æ°å¢ |
| | | doManageRecordIntervals:'/manageRecordIntervals/doManageRecordIntervals',//ç¼è¾ |
| | | delManageRecordIntervals:'/manageRecordIntervals/delManageRecordIntervals',//å é¤ |
| | | exportOutManageRecordIntervals:'/manageRecordIntervals/exportOutManageRecordIntervals',//å¯¼åº |
| | | exportInManageRecordIntervals:'/manageRecordIntervals/exportInManageRecordIntervals',//导å
¥ |
| | | pageManageRecordIntervalsTotal:'/manageRecordIntervalsTotal/pageManageRecordIntervalsTotal',//åå²è®°å½-å表 |
| | | submitManageRecordIntervalsTotal:'/manageRecordIntervalsTotal/submitManageRecordIntervalsTotal',//åå²è®°å½-æäº¤ |
| | | ratifyManageRecordIntervalsTotal:'/manageRecordIntervalsTotal/ratifyManageRecordIntervalsTotal',//åå²è®°å½-æ¹å |
| | | } |
| | | |
| | | // 8.4è®°å½çæ§å¶--æä»¶ä½åºè®°å½ |
| | | const manageRecordCancel = { |
| | | pageManageRecordCancel:'/manageRecordCancel/pageManageRecordCancel',//å表 |
| | | addManageRecordCancel:'/manageRecordCancel/addManageRecordCancel',//æ°å¢ |
| | | doManageRecordCancel:'/manageRecordCancel/doManageRecordCancel',//ç¼è¾ |
| | | delManageRecordCancel:'/manageRecordCancel/delManageRecordCancel',//å é¤ |
| | | ratifyManageRecordCancel:'/manageRecordCancel/ratifyManageRecordCancel',//æ¹å |
| | | exportOutManageRecordCancel:'/manageRecordCancel/exportOutManageRecordCancel',//å¯¼åº |
| | | exportInManageRecordCancel:'/manageRecordCancel/exportInManageRecordCancel',//导å
¥ |
| | | } |
| | | |
| | | // 8.4è®°å½çæ§å¶--æä»¶ä¿®è®¢ |
| | | const manageRecordAudit = { |
| | | pageManageRecordAudit:'/manageRecordAudit/pageManageRecordAudit', // å表 |
| | | addManageRecordAudit:'/manageRecordAudit/addManageRecordAudit', // æ°å¢ |
| | | doManageRecordAudit:'/manageRecordAudit/doManageRecordAudit', // ç¼è¾ |
| | | delManageRecordAudit:'/manageRecordAudit/delManageRecordAudit', // å é¤ |
| | | ratifyManageRecordAudit:'/manageRecordAudit/ratifyManageRecordAudit', // æ¹å |
| | | exportOutManageRecordAudit:'/manageRecordAudit/exportOutManageRecordAudit', // 导åºå表 |
| | | } |
| | | |
| | | // 6.2 人å |
| | | const personnel = { |
| | | selectCNSAPersonTree: '/personBasicInfo/selectCNSAPersonTree', // æ¥è¯¢CNAS人åä¾§è¾¹æ |
| | | } |
| | |
| | | height: 100%; |
| | | overflow-y: auto; |
| | | } |
| | | >>>.el-table__row { |
| | | cursor: move; |
| | | position: relative; |
| | | } |
| | | |
| | | .table { |
| | | width: 100%; |
| | |
| | | <template> |
| | | <div class="value-table"> |
| | | <div class="table" :style="data.isPage!=undefined&&data.isPage!=true?'height:100%':''"> |
| | | <el-table ref="eltable" :data="tableData" style="width: 100%;" height="100%" tooltip-effect="dark" border |
| | | @selection-change="selectChange" @select="select" v-loading="loading" @sort-change="sortChange" |
| | | @row-click="rowClick" :show-summary="data.countFleid!=undefined && data.countFleid.length > 0" |
| | | :summary-method="getSummaries" :row-class-name="tableRowClassName" :row-key="record=>record[rowKey]" |
| | | :current-row-key="data.currentId" :highlight-current-row="data.highlight===undefined||data.highlight" |
| | | :span-method="spanMethod" :key="specialKey" :class="{sortable:data.sortable}"> |
| | | <el-table-column type="selection" :width="selectionWidth" v-if="data.showSelect" :key="Math.random()"> |
| | | <el-table |
| | | ref="eltable" |
| | | v-loading="loading" |
| | | :data="tableData" |
| | | style="width: 100%;" |
| | | height="100%" |
| | | tooltip-effect="dark" |
| | | element-loading-text="å è½½ä¸..." |
| | | :border="true" |
| | | :show-summary="data.countFleid!=undefined && data.countFleid.length > 0" |
| | | :summary-method="getSummaries" |
| | | :row-class-name="tableRowClassName" |
| | | :row-key="record=>record[rowKey]" |
| | | :current-row-key="data.currentId" |
| | | :highlight-current-row="data.highlight===undefined||data.highlight" |
| | | :span-method="spanMethod" |
| | | :key="specialKey" |
| | | @selection-change="selectChange" |
| | | @select="select" |
| | | @sort-change="sortChange" |
| | | @row-click="rowClick" |
| | | element-loading-spinner="el-icon-loading"> |
| | | <el-table-column :reserve-selection="isReserveSelection" type="selection" :width="selectionWidth" v-if="data.showSelect" :key="Math.random()"> |
| | | </el-table-column> |
| | | <el-table-column type="index" align="center" label="åºå·" :width="selectionWidth" v-if="data.isIndex" :key="Math.random()"> |
| | | </el-table-column> |
| | | <el-table-column :prop="a.label" :label="a.value" :sortable="a.sort === 'custom' ? 'custom' : false" :isColumnWidth="isColumnWidth" :isShowZero="isShowZero" |
| | | v-for="(a, ai) in tableHead" :key="ai+'bbbbb'" show-overflow-tooltip :min-width="columnMinWidth" v-if="!data.headNoShow||(data.headNoShow&&data.headNoShow.length==0)||(data.headNoShow&&data.headNoShow.length>0&&!data.headNoShow.find(d=>d==a.label))"> |
| | | <el-table-column :prop="a.label" :label="a.value" :width="a.width" :sortable="a.sort === 'custom' ? 'custom' : false" :isColumnWidth="isColumnWidth" :isShowZero="isShowZero" |
| | | v-for="(a, ai) in tableHead" :key="ai" show-overflow-tooltip :min-width="columnMinWidth" v-if="!data.headNoShow||(data.headNoShow&&data.headNoShow.length==0)||(data.headNoShow&&data.headNoShow.length>0&&!data.headNoShow.find(d=>d==a.label))"> |
| | | <template slot-scope="scope"> |
| | | <div v-if="showType(a.label, data.tagField) != null"> |
| | | <template v-if="typeof(scope.row[a.label]) == 'object'"> |
| | | <template v-for="(param, i) in scope.row[a.label]"> |
| | | <el-tag v-for="(b, bi) in data.tagField[a.label].select" :key="bi+'cccc'" v-if="b.value == param" |
| | | <el-tag v-for="(b, bi) in data.tagField[a.label].select" :key="bi" v-if="b.value == param" |
| | | :type="b.type" size="medium" style="margin-right: 5px;">{{b.label}}</el-tag> |
| | | </template> |
| | | </template> |
| | | <template v-else> |
| | | <el-tag v-for="(b, bi) in data.tagField[a.label].select" :key="bi+'ddddd'" v-show="b.value == scope.row[a.label]" |
| | | <el-tag v-for="(b, bi) in data.tagField[a.label].select" :key="bi" v-show="b.value == scope.row[a.label]" |
| | | :type="b.type" size="medium">{{b.label}}</el-tag> |
| | | </template> |
| | | </div> |
| | |
| | | </el-col> |
| | | <el-col :span="16/data.row"> |
| | | <el-input v-model="upData[a.label]" size="small" clearable :placeholder="`请è¾å
¥${a.value}`" |
| | | v-if="showType(a.label, data.selectField) == null&&!showUpload(a.label)&&!showCascader(a.label)" |
| | | v-if="showType(a.label, data.selectField) == null&&!showUpload(a.label)&&!showCascader(a.label)&&!showDatePicker(a.label)" |
| | | :disabled="isDisabled(a.label)"></el-input> |
| | | <el-select v-model="upData[a.label]" :multiple="data.selectField[a.label].choose" size="small" |
| | | v-if="showType(a.label, data.selectField) != null" style="width: 100%;" :disabled="isDisabled(a.label)" |
| | | clearable filterable> |
| | | <el-option v-for="(b, bi) in data.selectField[a.label].select" :key="bi+'eeeee'" :value="b.value" |
| | | <el-option v-for="(b, bi) in data.selectField[a.label].select" :key="bi" :value="b.value" |
| | | :label="b.label"> |
| | | </el-option> |
| | | </el-select> |
| | |
| | | v-if="showCascader(a.label)" :placeholder="`è¯·éæ©${a.value}`" clearable |
| | | :props="data.cascaderField.props" size="small" style="width: 100%;" |
| | | @change="m=>handleCascader(m,a.label)" filterable></el-cascader> |
| | | <el-date-picker |
| | | v-if="showDatePicker(a.label)" |
| | | v-model="upData[a.label]" |
| | | type="date" |
| | | size="small" |
| | | placeholder="éæ©æ¥æ" |
| | | format="yyyy-MM-dd" |
| | | value-format="yyyy-MM-dd" style="width: 100%;"> |
| | | </el-date-picker> |
| | | </el-col> |
| | | </div> |
| | | </div> |
| | |
| | | </el-col> |
| | | <el-col :span="16" :offset="1"> |
| | | <el-input v-model="upData[a.label]" size="small" clearable :placeholder="`请è¾å
¥${a.value}`" |
| | | v-if="showType(a.label, data.selectField) == null&&!showUpload(a.label)&&!showCascader(a.label)" |
| | | v-if="showType(a.label, data.selectField) == null&&!showUpload(a.label)&&!showCascader(a.label)&&!showDatePicker(a.label)" |
| | | :disabled="isDisabled(a.label)"></el-input> |
| | | <el-select v-model="upData[a.label]" :multiple="data.selectField[a.label].choose" size="small" |
| | | v-if="showType(a.label, data.selectField) != null" style="width: 100%;" :disabled="isDisabled(a.label)" |
| | | clearable filterable> |
| | | <el-option v-for="(b, bi) in data.selectField[a.label].select" :key="bi+'fffff'" :value="b.value" |
| | | <el-option v-for="(b, bi) in data.selectField[a.label].select" :key="bi" :value="b.value" |
| | | :label="b.label"></el-option> |
| | | </el-select> |
| | | <el-upload :action="javaApi+data.addUploadConfig.url" v-if="showUpload(a.label)" :multiple="false" |
| | |
| | | <el-cascader :value="upData[a.label]" :options="data.cascaderField[a.label].tree" :show-all-levels="false" |
| | | :placeholder="`è¯·éæ©${a.value}`" v-if="showCascader(a.label)" clearable :props="data.cascaderField.props" |
| | | size="small" style="width: 100%;" @change="m=>handleCascader(m,a.label)" filterable></el-cascader> |
| | | <el-date-picker |
| | | v-if="showDatePicker(a.label)" |
| | | v-model="upData[a.label]" |
| | | type="date" |
| | | size="small" |
| | | placeholder="éæ©æ¥æ" |
| | | format="yyyy-MM-dd" |
| | | value-format="yyyy-MM-dd" style="width: 100%;"> |
| | | </el-date-picker> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | |
| | | </span>{{a.value}}ï¼</el-col> |
| | | <el-col :span="16/data.row"> |
| | | <el-input v-model="upData[a.label]" size="small" clearable :placeholder="`请è¾å
¥${a.value}`" |
| | | v-if="showType(a.label, data.selectField) == null&&!showUpload(a.label)&&!showCascader(a.label)"></el-input> |
| | | v-if="showType(a.label, data.selectField) == null&&!showUpload(a.label)&&!showCascader(a.label)&&!showDatePicker(a.label)"></el-input> |
| | | <el-select v-model="upData[a.label]" size="small" v-if="showType(a.label, data.selectField) != null" |
| | | :multiple="data.selectField[a.label].choose" |
| | | style="width: 100%;" :placeholder="`è¯·éæ©${a.value}`" clearable filterable> |
| | |
| | | <el-cascader :options="data.cascaderField[a.label].tree" v-if="showCascader(a.label)" clearable |
| | | :placeholder="`è¯·éæ©${a.value}`" :props="data.cascaderField.props" size="small" style="width: 100%;" |
| | | @change="m=>handleCascader(m,a.label)" filterable :show-all-levels="false"></el-cascader> |
| | | <el-date-picker |
| | | v-if="showDatePicker(a.label)" |
| | | v-model="upData[a.label]" |
| | | type="date" |
| | | size="small" |
| | | placeholder="éæ©æ¥æ" |
| | | format="yyyy-MM-dd" |
| | | value-format="yyyy-MM-dd" style="width: 100%;"> |
| | | </el-date-picker> |
| | | </el-col> |
| | | </div> |
| | | </div> |
| | | <div v-else> |
| | | <el-row v-for="(a, ai) in upHead" :key="ai+'jjjjj'" style="line-height: 50px;"> |
| | | <el-row v-for="(a, ai) in upHead" :key="ai" style="line-height: 50px;"> |
| | | <el-col :span="6" style="text-align: right;"><span class="required-span" v-if="showAddReq(a.label)">* |
| | | </span>{{a.value}}ï¼</el-col> |
| | | <el-col :span="16" :offset="1"> |
| | | <el-input v-model="upData[a.label]" size="small" clearable :placeholder="`请è¾å
¥${a.value}`" |
| | | v-if="showType(a.label, data.selectField) == null&&!showUpload(a.label)&&!showCascader(a.label)"></el-input> |
| | | v-if="showType(a.label, data.selectField) == null&&!showUpload(a.label)&&!showCascader(a.label)&&!showDatePicker(a.label)"></el-input> |
| | | <el-select v-model="upData[a.label]" size="small" v-if="showType(a.label, data.selectField) != null" |
| | | :multiple="data.selectField[a.label].choose" |
| | | style="width: 100%;" :placeholder="`è¯·éæ©${a.value}`" clearable> |
| | | style="width: 100%;" :placeholder="`è¯·éæ©${a.value}`" clearable filterable> |
| | | <el-option v-for="(b, bi) in data.selectField[a.label].select" :key="bi+'mmmmmm'" :value="b.value" |
| | | :label="b.label"></el-option> |
| | | </el-select> |
| | |
| | | <el-cascader :options="data.cascaderField[a.label].tree" v-if="showCascader(a.label)" clearable |
| | | :placeholder="`è¯·éæ©${a.value}`" :props="data.cascaderField.props" size="small" style="width: 100%;" |
| | | @change="m=>handleCascader(m,a.label)" filterable :show-all-levels="false"></el-cascader> |
| | | <el-date-picker |
| | | v-if="showDatePicker(a.label)" |
| | | v-model="upData[a.label]" |
| | | type="date" |
| | | size="small" |
| | | placeholder="éæ©æ¥æ" |
| | | format="yyyy-MM-dd" |
| | | value-format="yyyy-MM-dd" style="width: 100%;"> |
| | | </el-date-picker> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import Sortable from 'sortablejs'; |
| | | |
| | | export default { |
| | | props: { |
| | | isReserveSelection:{ |
| | | type: Boolean, |
| | | default: ()=> false |
| | | }, |
| | | dateFormat: { |
| | | type: String, |
| | | default: () => 'yyyy-MM-dd HH:mm:ss' |
| | | }, |
| | | isSelectedList: { |
| | | type: Array, |
| | | default: ()=>{ |
| | | return [] |
| | | } |
| | | }, |
| | | selectionWidth: { |
| | | type: String, |
| | | default: () => '65' |
| | |
| | | 'token': sessionStorage.getItem('token') |
| | | } |
| | | this.specialKey = this.specialKey+Math.random()*100; |
| | | // æ¯å¦å¯æå¨å表--æ¤åè½ææ¶æªå®ç° |
| | | if(this.data.sortable){ |
| | | this.$nextTick(() => { |
| | | this.initializeSortable() |
| | | }) |
| | | } |
| | | }, |
| | | watch: { |
| | | componentData: { |
| | | handler(newVal) { |
| | | this.data = newVal; |
| | | // this.selectList(); |
| | | }, |
| | | deep: true |
| | | }, |
| | | }, |
| | | methods: { |
| | | initializeSortable() { |
| | | let className =".el-table__body-wrapper > table > tbody"; |
| | | const table= document.querySelector(className); |
| | | const self = this |
| | | Sortable.create(table, { |
| | | animation: 150, //å¨ç»æ¶é¿ |
| | | handle: ".el-table__row", //坿æ½åºåclass |
| | | onEnd({ newIndex, oldIndex }) { |
| | | console.log(3333,newIndex, oldIndex) |
| | | const movedItem = this.tableData[oldIndex]; |
| | | this.tableData.splice(oldIndex, 1); |
| | | this.tableData.splice(newIndex, 0, movedItem); |
| | | } |
| | | }) |
| | | }, |
| | | getUpdatedOrder() { |
| | | // æ ¹æ®ææ½åç顺åºè·åæ´æ°çæ°æ® |
| | | // è¿ééè¦å®ç°ä½ çé»è¾ |
| | | }, |
| | | updateTableData(newOrder) { |
| | | // æ ¹æ®æ°çé¡ºåºæ´æ°è¡¨æ ¼æ°æ® |
| | | // è¿ééè¦å®ç°ä½ çé»è¾ |
| | | // 设置å¤éç¶æ |
| | | setSelect(row, index) { |
| | | let result = this.isSelectedList.includes(row.id) |
| | | return !result; |
| | | }, |
| | | rowspan(spanArr, position, spanName) { |
| | | this.tableData.forEach((item, index) => { |
| | |
| | | } |
| | | }, |
| | | rowClick(row, column, event) { |
| | | if (this.data.select) { |
| | | this.$refs['eltable'].toggleRowSelection(row) |
| | | } else { |
| | | this.$refs['eltable'].clearSelection() |
| | | this.$refs['eltable'].toggleRowSelection(row, true) |
| | | let result = this.isSelectedList.includes(row.id) |
| | | if(!result) { |
| | | if (this.data.select) { |
| | | this.$refs['eltable'].toggleRowSelection(row) |
| | | } else { |
| | | this.$refs['eltable'].clearSelection() |
| | | this.$refs['eltable'].toggleRowSelection(row, true) |
| | | } |
| | | } |
| | | }, |
| | | sizeChange(val) { |
| | |
| | | 'Content-Type': 'application/json' |
| | | } |
| | | }).then(res => { |
| | | this.$nextTick(); |
| | | if (res.code === 201) { |
| | | this.loading = false |
| | | return |
| | | } |
| | | this.total = res.data.body.total |
| | | this.tableHead = res.data.head |
| | | this.tableData = res.data.body.records |
| | | this.tableData = res.data.body.records || res.data.body |
| | | if(res.data.body.records){ |
| | | this.$emit("getTableData",res.data.body.records) |
| | | } |
| | | if(this.dateFormat.trim() == 'yyyy-MM-dd') { |
| | | const dateTimeRegex = /^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/; //æ ¼å¼åæ¶é´ä¸º'yyyy-MM-dd HH:mm:ss' |
| | | this.tableData.map(item => { |
| | | Object.keys(item).forEach(val => { |
| | | if ( typeof item[val] == 'string' && dateTimeRegex.test(item[val])) { |
| | | item[val] = item[val].split(' ')[0] |
| | | } |
| | | }) |
| | | }) |
| | | } |
| | | if (this.data.needSort !== undefined) { |
| | | for (var i = 0; i < this.data.needSort.length; i++) { |
| | | this.tableHead.forEach(item => { |
| | |
| | | .spanConfig.special.main); |
| | | }) |
| | | } |
| | | this.loading = false |
| | | this.$nextTick(()=>{ |
| | | this.loading = false |
| | | }) |
| | | }).catch(e => { |
| | | console.log(e); |
| | | this.loading = false |
| | | this.$message.error('è¯·å·æ°é¡µé¢åå°è¯') |
| | | }) |
| | |
| | | return false; |
| | | } |
| | | }, |
| | | showDatePicker(label){ |
| | | if (this.data.datePicker && this.data.datePicker.find(m=>m==label)) { |
| | | return true; |
| | | } else { |
| | | return false; |
| | | } |
| | | }, |
| | | handleTree(arr, value) { |
| | | let label = '' |
| | | for (let i = 0; i < arr.length; i++) { |
| | |
| | | this.upDia = true, |
| | | this.upData = this.HaveJson(row) |
| | | this.upHead = this.HaveJson(this.tableHead) |
| | | if(this.data.noHead&&this.data.noHead.length>0){ |
| | | for (let i =0; i < this.data.noHead.length; i++) { |
| | | this.upHead = this.upHead.filter(item => item.label != this.data.noHead[i]) |
| | | } |
| | | } |
| | | this.upHead.forEach((item, index) => { |
| | | if (this.data.cascaderField && this.data.cascaderField[item.label]) { |
| | | if (this.upData[item.label]) { |
| | |
| | | } |
| | | } else { |
| | | delete row.orderBy |
| | | this.$parent[val.method](row) |
| | | if(this.$parent[val.method]){ |
| | | this.$parent[val.method](row) |
| | | }else if(this.$parent.$parent[val.method]){ |
| | | this.$parent.$parent[val.method](row) |
| | | }else if(this.$parent.$parent.$parent[val.method]){ |
| | | this.$parent.$parent.$parent[val.method](row) |
| | | } |
| | | |
| | | } |
| | | }, |
| | | saveUpData() { |
| | |
| | | this.$message.error('è¯·ç»æ·»å 请æ±å°å') |
| | | return |
| | | } |
| | | |
| | | for (var i = 0; i < this.data.requiredAdd.length; i++) { |
| | | if (this.upData[this.data.requiredAdd[i]] === null || this.upData[this.data.requiredAdd[i]] === '') { |
| | | if (this.upData[this.data.requiredAdd[i]] === null || this.upData[this.data.requiredAdd[i]] === '' || this.upData[this.data.requiredAdd[i]] === undefined) { |
| | | var list = this.upHead.filter(a => { |
| | | if (a.label == this.data.requiredAdd[i]) return a |
| | | }) |
| | | if (list[0].value == undefined) continue |
| | | if (list[0].value == undefined || list[0].value == null || list[0].value == '') continue |
| | | this.$message.error(list[0].value + 'æ¯å¿
填项') |
| | | return |
| | | } |
| | |
| | | eleLink.click() |
| | | document.body.removeChild(eleLink) |
| | | }).catch(e => { |
| | | console.log(e); |
| | | // console.log(e); |
| | | this.loading = false |
| | | this.$message.error('è¯·å·æ°é¡µé¢åå°è¯') |
| | | }) |
| | |
| | | }else{ |
| | | return false |
| | | } |
| | | } |
| | | }, |
| | | } |
| | | } |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <!-- æææä»¶ï¼å
ãå¤é¨æä»¶ï¼çåæ¾ä¸åæ¶è®°å½ --> |
| | | <div class="DistributionRetrievalRecordsAllDocuments"> |
| | | <el-row class="title"> |
| | | <el-col :span="12" style="padding-left: 20px;text-align: left;">æææä»¶ï¼å
ãå¤é¨æä»¶ï¼çåæ¾ä¸åæ¶è®°å½</el-col> |
| | | <el-col :span="12" style="text-align: right;"> |
| | | <el-button size="medium" type="primary" @click="openAdd" v-if="addPower">æ°å¢</el-button> |
| | | <el-upload :action="action" :multiple="false" |
| | | :show-file-list="false" |
| | | accept='.doc,.docx' :headers="headers" :on-change="beforeUpload" |
| | | :on-error="onError" ref='upload' v-if="upPower" :on-success="handleSuccessUp" style="display:inline-block;margin-left: 20px;"> |
| | | <el-button type="primary" size="medium">导å
¥</el-button></el-upload> |
| | | <el-button size="medium" type="primary" @click="handleDown" :loading="outLoading" v-if="outPower" style="display:inline-block;margin-left: 20px;">导åº</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | <div class="search"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">æä»¶åç§°ï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable v-model="componentData.entity.documentName" |
| | | @keyup.enter.native="refreshTable()"></el-input></div> |
| | | </div> |
| | | <div class="search_thing"> |
| | | <div class="search_label">æä»¶ç¼å·ï¼</div> |
| | | <div class="search_input"> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable v-model="componentData.entity.documentCode" |
| | | @keyup.enter.native="refreshTable()"></el-input> |
| | | </div> |
| | | </div> |
| | | <div class="search_thing" style="padding-left: 30px;"> |
| | | <el-button size="small" @click="refresh()">é ç½®</el-button> |
| | | <el-button size="small" type="primary" @click="refreshTable()">æ¥ è¯¢</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="table"> |
| | | <ValueTable ref="ValueTable" :url="$api.manageRecordIssueRecycle.pageManageRecordIssueRecycle" |
| | | :delUrl="$api.manageRecordIssueRecycle.delManageRecordIssueRecycle" |
| | | :componentData="componentData" :upUrl="$api.manageRecordIssueRecycle.doManageRecordIssueRecycle" :key="upIndex"/> |
| | | </div> |
| | | <el-dialog |
| | | :title="title" |
| | | :visible.sync="addDialogVisible" |
| | | width="400px" top="6vh"> |
| | | <el-row> |
| | | <el-col :span="24" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label"><span style="color: red;margin-left: 4px;">* </span>æä»¶ç¼å·ï¼</div> |
| | | <div class="search_input"> |
| | | <el-select v-model="addInfo.documentCode" size="small" style="width: 100%;" @change="getCurrentFile" allow-create clearable filterable> |
| | | <el-option |
| | | v-for="item in fileList" |
| | | :key="item.documentCode" |
| | | :label="item.title" |
| | | :value="item.documentCode"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="24" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">æä»¶åç§°ï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable v-model="addInfo.documentName"></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="24" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">çå·ï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable v-model="addInfo.documentVersion"></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="24" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">份æ°ï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable v-model="addInfo.pages"></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="24" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">æä»¶ç±»å«ï¼</div> |
| | | <div class="search_input"> |
| | | <el-select v-model="addInfo.documentType" placeholder="è¯·éæ©" size="small" style="width: 100%;"> |
| | | <el-option |
| | | v-for="item in fileType" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="24" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">ååå·ï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable v-model="addInfo.number"></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="24" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">æ¥å人ï¼</div> |
| | | <div class="search_input"> |
| | | <el-select v-model="addInfo.receiveUser" placeholder="è¯·éæ©" size="small" style="width: 100%;" filterable=""> |
| | | <el-option |
| | | v-for="item in personList" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="24" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">æ¥æ¶é¨é¨ï¼</div> |
| | | <div class="search_input"> |
| | | <el-select v-model="addInfo.departLims" placeholder="è¯·éæ©" size="small" style="width: 100%;"> |
| | | <el-option |
| | | v-for="item in list" |
| | | :key="item.name" |
| | | :label="item.name" |
| | | :value="item.name"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="24" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">æ¥åæ¥æï¼</div> |
| | | <div class="search_input"> |
| | | <el-date-picker |
| | | v-model="addInfo.receiveDate" |
| | | type="date" |
| | | size="small" |
| | | placeholder="éæ©æ¥æ" |
| | | format="yyyy-MM-dd" |
| | | value-format="yyyy-MM-dd" style="width: 100%;"> |
| | | </el-date-picker> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="addDialogVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="handleAdd" :loading="addLoading">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import ValueTable from '../tool/value-table.vue' |
| | | import { |
| | | getYearAndMonthAndDays |
| | | } from '../../util/date' |
| | | export default { |
| | | components: { |
| | | ValueTable |
| | | }, |
| | | data(){ |
| | | return{ |
| | | addPower:true, |
| | | outPower:true, |
| | | upPower:true, |
| | | outLoading:false, |
| | | addLoading:false, |
| | | componentData: { |
| | | entity: { |
| | | documentName: null, |
| | | documentCode: null, |
| | | orderBy: { |
| | | field: 'id', |
| | | order: 'desc' |
| | | } |
| | | }, |
| | | isIndex: true, |
| | | showSelect: false, |
| | | select: false, |
| | | // selectMethod: 'handleChangeTask', |
| | | do: [{ |
| | | id: 'delete', |
| | | font: 'å é¤', |
| | | type: 'text', |
| | | method: 'doDiy', |
| | | disabFun: (row, index) => { |
| | | return !!row.signedUser |
| | | } |
| | | }, { |
| | | id: 'handleEdit', |
| | | font: 'ä¿®æ¹', |
| | | type: 'text', |
| | | method: 'handleEdit', |
| | | field:[], |
| | | disabFun: (row, index) => { |
| | | return !!row.signedUser |
| | | } |
| | | },{ |
| | | id: 'handleBack', |
| | | font: 'åæ¶', |
| | | type: 'text', |
| | | method: 'handleBack', |
| | | disabFun: (row, index) => { |
| | | return !!row.signedUser |
| | | } |
| | | }], |
| | | tagField: { |
| | | // documentType:{ |
| | | // select: [] |
| | | // }, |
| | | // receiveUserName:{ |
| | | // select: [] |
| | | // }, |
| | | }, |
| | | selectField: { |
| | | // documentType:{ |
| | | // select: [] |
| | | // }, |
| | | // receiveUserName:{ |
| | | // select: [] |
| | | // }, |
| | | }, |
| | | addUpload:['signatoryUrl'], |
| | | requiredAdd: [], |
| | | requiredUp: [], |
| | | datePicker:['receiveDate'], |
| | | noHead:['signedUserName','signedDate','departLims'],//ä¸å䏿°å¢ç¼è¾çåæ®µ |
| | | needSort: [], |
| | | inputType:'' |
| | | }, |
| | | entityCopy: {}, |
| | | upIndex: 0, |
| | | title:'æ°å¢', |
| | | addDialogVisible:false, |
| | | addInfo:{}, |
| | | personList:[], |
| | | fileType:[], |
| | | fileList:[], |
| | | list:[] |
| | | } |
| | | }, |
| | | // ç¨äºä¸ä¼ æä»¶çä¿¡æ¯ |
| | | computed: { |
| | | headers() { |
| | | return { |
| | | 'token': sessionStorage.getItem('token') |
| | | } |
| | | }, |
| | | action() { |
| | | return this.javaApi +this.$api.manageRecordIssueRecycle.exportInManageRecordIssueRecycle |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.entityCopy = this.HaveJson(this.componentData.entity); |
| | | this.getPower() |
| | | this.getAuthorizedPerson() |
| | | this.selectEnumByCategory() |
| | | this.getFileList() |
| | | this.selectTreeList() |
| | | }, |
| | | methods:{ |
| | | getPower(){ |
| | | let power = JSON.parse(sessionStorage.getItem('power')) |
| | | let add = false |
| | | let del = false |
| | | let up = false; |
| | | let out = false; |
| | | let edit = false |
| | | for (var i = 0; i < power.length; i++) { |
| | | if (power[i].menuMethod == 'addManageRecordIssueRecycle') { |
| | | add = true |
| | | } |
| | | if (power[i].menuMethod == 'delManageRecordIssueRecycle') { |
| | | del = true |
| | | } |
| | | if (power[i].menuMethod == 'exportInManageRecordIssueRecycle') { |
| | | up = true |
| | | } |
| | | if (power[i].menuMethod == 'doManageRecordIssueRecycle') { |
| | | edit = true |
| | | } |
| | | if (power[i].menuMethod == 'exportOutManageRecordIssueRecycle') { |
| | | out = true |
| | | } |
| | | } |
| | | if (!add) { |
| | | this.componentData.do.splice(2, 1) |
| | | } |
| | | if (!add) { |
| | | this.componentData.do.splice(1, 1) |
| | | } |
| | | if (!del) { |
| | | this.componentData.do.splice(0, 1) |
| | | } |
| | | this.addPower = add |
| | | this.outPower = out |
| | | this.upPower = up |
| | | }, |
| | | // æ°å¢ |
| | | openAdd(){ |
| | | // this.$refs.ValueTable.openAddDia(this.$api.manageRecordIssueRecycle.addManageRecordIssueRecycle); |
| | | this.addInfo = {} |
| | | this.title = 'æ°å¢' |
| | | this.addDialogVisible = true; |
| | | }, |
| | | handleEdit(row){ |
| | | this.addInfo = row |
| | | this.title = 'ç¼è¾' |
| | | this.addDialogVisible = true; |
| | | }, |
| | | // å¯¼åº |
| | | handleDown(){ |
| | | this.outLoading = true |
| | | this.$axios.post(this.$api.manageRecordIssueRecycle.exportOutManageRecordIssueRecycle,{entity:this.componentData.entity},{headers: { 'Content-Type': 'application/json' }}).then(res => { |
| | | this.outLoading = false |
| | | if(res.code==201) return this.$message.error('导åºå¤±è´¥') |
| | | this.$message.success('å¯¼åºæå') |
| | | let url = this.javaApi+'word/'+res.message |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = 'æä»¶åæ¾ä¸åæ¶è®°å½'; |
| | | link.click(); |
| | | }) |
| | | }, |
| | | refreshTable() { |
| | | this.$refs['ValueTable'].selectList() |
| | | }, |
| | | refresh() { |
| | | this.componentData.entity = this.HaveJson(this.entityCopy) |
| | | this.upIndex++ |
| | | this.refreshTable() |
| | | }, |
| | | getAuthorizedPerson() { |
| | | this.$axios.get(this.$api.user.getUserMenu).then(res => { |
| | | let data = [] |
| | | res.data.forEach(a => { |
| | | data.push({ |
| | | label: a.name, |
| | | value: a.id |
| | | }) |
| | | }) |
| | | // this.componentData.tagField.receiveUserName.select = data |
| | | // this.componentData.selectField.receiveUserName.select = data |
| | | this.personList = data |
| | | }) |
| | | }, |
| | | beforeUpload(file) { |
| | | if (file.size > 1024 * 1024 * 10) { |
| | | this.$message.error('ä¸ä¼ æä»¶ä¸è¶
è¿10M'); |
| | | this.$refs.upload.clearFiles() |
| | | return false; |
| | | } else { |
| | | // this.upLoading = true; |
| | | return true; |
| | | } |
| | | }, |
| | | onError(err, file, fileList) { |
| | | this.$message.error('ä¸ä¼ 失败') |
| | | this.$refs.upload.clearFiles() |
| | | }, |
| | | handleSuccessUp(response) { |
| | | this.upLoading = false; |
| | | if (response.code == 200) { |
| | | this.$message.success('ä¸ä¼ æå'); |
| | | this.$refs['ValueTable'].selectList() |
| | | }else{ |
| | | this.$message.error('ä¸ä¼ 失败'); |
| | | } |
| | | }, |
| | | selectEnumByCategory() { |
| | | this.$axios.post(this.$api.enums.selectEnumByCategory, { |
| | | category: "æä»¶ç±»å«" |
| | | }).then(res => { |
| | | // this.componentData.tagField.documentType.select = res.data |
| | | // this.componentData.selectField.documentType.select = res.data |
| | | this.fileType = res.data |
| | | }) |
| | | }, |
| | | // è·åæä»¶å表--æä»¶æ¸
å |
| | | getFileList(){ |
| | | this.$axios.post(this.$api.manageDocumentList.pageManageDocumentList,{ |
| | | entity: { |
| | | orderBy: { |
| | | field: 'createTime', |
| | | order: 'desc' |
| | | } |
| | | }, |
| | | page:{ |
| | | current:-1, |
| | | size:-1 |
| | | } |
| | | },{headers: { |
| | | 'Content-Type': 'application/json' |
| | | }}).then(res=>{ |
| | | this.fileList = res.data.body.records.map(m=>{ |
| | | m.title = m.documentCode |
| | | return m |
| | | }) |
| | | }).catch(err=>{}) |
| | | }, |
| | | getCurrentFile(e){ |
| | | let obj = this.fileList.find(m=>m.documentCode==e) |
| | | if(obj){ |
| | | this.$set(this.addInfo,'documentName',obj.name) |
| | | this.$set(this.addInfo,'documentVersion',obj.version) |
| | | this.$set(this.addInfo,'documentType',obj.type) |
| | | } |
| | | }, |
| | | handleAdd(){ |
| | | if(!this.addInfo.documentCode) return this.$message.error('请è¾å
¥æä»¶ç¼å·') |
| | | this.addLoading = true |
| | | let obj = {} |
| | | if(this.title=='æ°å¢'){ |
| | | obj = this.HaveJson(this.addInfo) |
| | | }else{ |
| | | let {id,documentCode,documentName,documentVersion,pages,documentType,number,receiveUser,receiveDate,departLims} = this.addInfo |
| | | obj = {id,documentCode,documentName,documentVersion,pages,documentType,number,receiveUser,receiveDate,departLims} |
| | | } |
| | | this.$axios.post(this.$api.manageRecordIssueRecycle[this.title=='æ°å¢'?'addManageRecordIssueRecycle':'doManageRecordIssueRecycle'], obj,{headers: { 'Content-Type': 'application/json' },noQs:true}).then(res => { |
| | | this.addLoading = false |
| | | if (res.code == 201) { |
| | | return |
| | | } |
| | | this.addDialogVisible = false |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æä½æå!' |
| | | }); |
| | | this.refreshTable() |
| | | }).catch(err => {}) |
| | | }, |
| | | // åæ¶ |
| | | handleBack(row){ |
| | | this.$confirm('æ¯å¦ç¡®è®¤åæ¶?', "æç¤º", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning" |
| | | }).then(() => { |
| | | let obj = {} |
| | | let {id,documentCode,documentName,documentVersion,pages,documentType,number,receiveUser,receiveDate,departLims} = row |
| | | obj = {id,documentCode,documentName,documentVersion,pages,documentType,number,receiveUser,receiveDate,departLims,signedDate:getYearAndMonthAndDays(),signedUser:JSON.parse(localStorage.getItem("user")).userId} |
| | | this.$axios.post(this.$api.manageRecordIssueRecycle.doManageRecordIssueRecycle, obj,{headers: { 'Content-Type': 'application/json' },noQs:true}).then(res => { |
| | | this.addLoading = false |
| | | if (res.code == 201) { |
| | | return |
| | | } |
| | | this.addDialogVisible = false |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æä½æå!' |
| | | }); |
| | | this.refreshTable() |
| | | }).catch(err => {}) |
| | | }).catch(() => {}) |
| | | }, |
| | | // æ¥è¯¢æ å½¢å表 |
| | | selectTreeList() { |
| | | this.$axios.get(this.$api.personnel.selectCNSAPersonTree).then((res) => { |
| | | this.list = res.data[0].children; |
| | | }); |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .title { |
| | | height: 60px; |
| | | line-height: 60px; |
| | | } |
| | | .search { |
| | | background-color: #fff; |
| | | height: 80px; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .search_thing { |
| | | width: 350px; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .search_label { |
| | | width: 110px; |
| | | font-size: 14px; |
| | | text-align: right; |
| | | } |
| | | |
| | | .search_input { |
| | | width: calc(100% - 110px); |
| | | } |
| | | |
| | | .table { |
| | | margin-top: 10px; |
| | | background-color: #fff; |
| | | width: calc(100% - 40px); |
| | | height: calc(100% - 60px - 80px - 10px - 40px); |
| | | padding: 20px; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <!-- æä»¶å®¡æ¹è®°å½ --> |
| | | <div class="DocumentApprovalRecords"> |
| | | <el-row class="title"> |
| | | <el-col :span="12" style="padding-left: 20px;text-align: left;">æä»¶å®¡æ¹è®°å½</el-col> |
| | | <el-col :span="12" style="text-align: right;"> |
| | | <el-button size="medium" type="primary" @click="openAdd" v-if="addPower">æ°å¢</el-button> |
| | | <el-upload :action="action" :multiple="false" |
| | | :show-file-list="false" |
| | | accept='.doc,.docx' :headers="headers" :on-change="beforeUpload" |
| | | :on-error="onError" ref='upload' v-if="upPower" :on-success="handleSuccessUp" style="display:inline-block;margin-left: 20px;"> |
| | | <el-button type="primary" size="medium">导å
¥</el-button></el-upload> |
| | | <el-button size="medium" type="primary" @click="handleDown" :loading="outLoading" v-if="outPower" style="display:inline-block;margin-left: 20px;">导åº</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | <div class="search"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">æä»¶åç§°ï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable v-model="componentData.entity.documentName" |
| | | @keyup.enter.native="refreshTable()"></el-input></div> |
| | | </div> |
| | | <div class="search_thing"> |
| | | <div class="search_label">æä»¶ç¼å·ï¼</div> |
| | | <div class="search_input"> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable v-model="componentData.entity.documentCode" |
| | | @keyup.enter.native="refreshTable()"></el-input> |
| | | </div> |
| | | </div> |
| | | <div class="search_thing" style="padding-left: 30px;"> |
| | | <el-button size="small" @click="refresh()">é ç½®</el-button> |
| | | <el-button size="small" type="primary" @click="refreshTable()">æ¥ è¯¢</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="table"> |
| | | <ValueTable ref="ValueTable" :url="$api.manageRecordCheck.pageManageRecordCheck" |
| | | :delUrl="$api.manageRecordCheck.delManageRecordCheck" |
| | | :componentData="componentData" :dateFormat="'yyyy-MM-dd'" :upUrl="$api.manageRecordCheck.doManageRecordCheck" :key="upIndex"/> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import ValueTable from '../tool/value-table.vue' |
| | | export default { |
| | | components: { |
| | | ValueTable |
| | | }, |
| | | data(){ |
| | | return{ |
| | | addPower:true, |
| | | outPower:true, |
| | | upPower:true, |
| | | outLoading:false, |
| | | componentData: { |
| | | entity: { |
| | | documentName: null, |
| | | documentCode: null, |
| | | orderBy: { |
| | | field: 'id', |
| | | order: 'desc' |
| | | } |
| | | }, |
| | | init:false, |
| | | isIndex: true, |
| | | showSelect: false, |
| | | select: false, |
| | | // selectMethod: 'handleChangeTask', |
| | | do: [{ |
| | | id: 'delete', |
| | | font: 'å é¤', |
| | | type: 'text', |
| | | method: 'doDiy', |
| | | disabFun: (row, index) => { |
| | | return row.checkState=='éè¿'||row.ratifyState=='éè¿' |
| | | } |
| | | }, { |
| | | id: 'update', |
| | | font: 'ä¿®æ¹', |
| | | type: 'text', |
| | | method: 'doDiy', |
| | | field:[], |
| | | disabFun: (row, index) => { |
| | | return row.checkState=='éè¿'||row.ratifyState=='éè¿' |
| | | } |
| | | },{ |
| | | id: 'handleCheck', |
| | | font: 'å®¡æ ¸', |
| | | type: 'text', |
| | | method: 'handleCheck', |
| | | disabFun: (row, index) => { |
| | | return row.checkState=='éè¿'||row.ratifyState=='éè¿' |
| | | } |
| | | },{ |
| | | id: 'handleApproval', |
| | | font: 'æ¹å', |
| | | type: 'text', |
| | | method: 'handleApproval', |
| | | disabFun: (row, index) => { |
| | | return row.ratifyState=='éè¿' |
| | | } |
| | | }], |
| | | tagField: { |
| | | writeUser:{ |
| | | select: [] |
| | | }, |
| | | checkUser:{ |
| | | select: [] |
| | | }, |
| | | ratifyUser:{ |
| | | select: [] |
| | | }, |
| | | }, |
| | | selectField: { |
| | | writeUser:{ |
| | | select: [] |
| | | }, |
| | | checkUser:{ |
| | | select: [] |
| | | }, |
| | | ratifyUser:{ |
| | | select: [] |
| | | }, |
| | | }, |
| | | addUpload:['signatoryUrl'], |
| | | requiredAdd: [], |
| | | requiredUp: [], |
| | | datePicker:['ratifyDate'], |
| | | needSort: [], |
| | | inputType:'' |
| | | }, |
| | | entityCopy: {}, |
| | | upIndex: 0, |
| | | } |
| | | }, |
| | | // ç¨äºä¸ä¼ æä»¶çä¿¡æ¯ |
| | | computed: { |
| | | headers() { |
| | | return { |
| | | 'token': sessionStorage.getItem('token') |
| | | } |
| | | }, |
| | | action() { |
| | | return this.javaApi +this.$api.manageRecordCheck.exportInManageRecordCheck |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.entityCopy = this.HaveJson(this.componentData.entity); |
| | | this.getPower() |
| | | this.getAuthorizedPerson() |
| | | }, |
| | | methods:{ |
| | | getPower(){ |
| | | let power = JSON.parse(sessionStorage.getItem('power')) |
| | | let add = false |
| | | let del = false |
| | | let up = false; |
| | | let out = false; |
| | | let check = false |
| | | let ratify = false |
| | | for (var i = 0; i < power.length; i++) { |
| | | if (power[i].menuMethod == 'addManageRecordCheck') { |
| | | add = true |
| | | } |
| | | if (power[i].menuMethod == 'delManageRecordCheck') { |
| | | del = true |
| | | } |
| | | if (power[i].menuMethod == 'exportInManageRecordCheck') { |
| | | up = true |
| | | } |
| | | if (power[i].menuMethod == 'checkManageRecordCheck') { |
| | | check = true |
| | | } |
| | | if (power[i].menuMethod == 'ratifyManageRecordCheck') { |
| | | ratify = true |
| | | } |
| | | if (power[i].menuMethod == 'exportOutManageRecordCheck') { |
| | | out = true |
| | | } |
| | | } |
| | | if (!ratify) { |
| | | this.componentData.do.splice(3, 1) |
| | | } |
| | | if (!check) { |
| | | this.componentData.do.splice(2, 1) |
| | | } |
| | | if (!add) { |
| | | this.componentData.do.splice(1, 1) |
| | | } |
| | | if (!del) { |
| | | this.componentData.do.splice(0, 1) |
| | | } |
| | | this.addPower = add |
| | | this.outPower = out |
| | | this.upPower = up |
| | | }, |
| | | // æ°å¢ |
| | | openAdd(){ |
| | | this.$refs.ValueTable.openAddDia(this.$api.manageRecordCheck.addManageRecordCheck); |
| | | }, |
| | | // å¯¼åº |
| | | handleDown(){ |
| | | this.outLoading = true |
| | | this.$axios.post(this.$api.manageRecordCheck.exportOutManageRecordCheck,{entity:this.componentData.entity},{headers: { 'Content-Type': 'application/json' }}).then(res => { |
| | | this.outLoading = false |
| | | if(res.code==201) return this.$message.error('导åºå¤±è´¥') |
| | | this.$message.success('å¯¼åºæå') |
| | | let url = this.javaApi+'word/'+res.message |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = 'æä»¶å®¡æ¹è®°å½'; |
| | | link.click(); |
| | | }) |
| | | }, |
| | | refreshTable() { |
| | | this.$refs['ValueTable'].selectList() |
| | | }, |
| | | refresh() { |
| | | this.componentData.entity = this.HaveJson(this.entityCopy) |
| | | // this.upIndex++ |
| | | this.refreshTable() |
| | | }, |
| | | getAuthorizedPerson() { |
| | | this.$axios.get(this.$api.user.getUserMenu).then(res => { |
| | | let data = [] |
| | | res.data.forEach(a => { |
| | | data.push({ |
| | | label: a.name, |
| | | value: a.id |
| | | }) |
| | | }) |
| | | this.componentData.tagField.writeUser.select = data |
| | | this.componentData.selectField.writeUser.select = data |
| | | this.componentData.tagField.checkUser.select = data |
| | | this.componentData.selectField.checkUser.select = data |
| | | this.componentData.tagField.ratifyUser.select = data |
| | | this.componentData.selectField.ratifyUser.select = data |
| | | this.$refs['ValueTable'].selectList() |
| | | }) |
| | | }, |
| | | // å®¡æ ¸ |
| | | handleCheck(row){ |
| | | this.$confirm('æ¯å¦å®¡æ ¸éè¿?', 'æç¤º', { |
| | | confirmButtonText: 'éè¿', |
| | | cancelButtonText: 'ä¸éè¿', |
| | | type: 'warning', |
| | | closeOnClickModal: false, // ç¦æ¢ç¹å»é®ç½©å±å
³é |
| | | distinguishCancelAndClose: true, |
| | | beforeClose: (action, instance, done) => { |
| | | if (action === 'confirm') { |
| | | // ç¹å»âç¡®å®âæé®ï¼å
许å
³é |
| | | this.$axios.post(this.$api.manageRecordCheck.checkManageRecordCheck, {id:row.id,checkState:'éè¿'}).then(res => { |
| | | if (res.code === 201) return |
| | | this.refreshTable() |
| | | done(); |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æäº¤æå' |
| | | }) |
| | | }) |
| | | .catch(err => { |
| | | |
| | | }) |
| | | } else if (action === 'cancel') { |
| | | // ç¹å»âåæ¶âæé®ï¼ä¸å
许å
³é |
| | | this.$axios.post(this.$api.manageRecordCheck.checkManageRecordCheck, {id:row.id,checkState:'ä¸éè¿'}).then(res => { |
| | | if (res.code === 201) return |
| | | this.refreshTable() |
| | | done(); |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æäº¤æå' |
| | | }) |
| | | }) |
| | | .catch(err => { |
| | | |
| | | }) |
| | | console.log("åæ¶æé®ç¹å»äºä»¶ï¼ä¸å
³éå¼¹æ¡"); |
| | | } else if (action === 'close') { |
| | | // ç¹å»âÃâæé®ï¼ä¸å
许å
³é |
| | | done(); |
| | | console.log("Ãæé®ç¹å»äºä»¶ï¼ä¸å
³éå¼¹æ¡"); |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | // æ¹å |
| | | handleApproval(row){ |
| | | this.$confirm('æ¯å¦æ¹åéè¿?', 'æç¤º', { |
| | | confirmButtonText: 'éè¿', |
| | | cancelButtonText: 'ä¸éè¿', |
| | | type: 'warning', |
| | | closeOnClickModal: false, // ç¦æ¢ç¹å»é®ç½©å±å
³é |
| | | distinguishCancelAndClose: true, |
| | | beforeClose: (action, instance, done) => { |
| | | if (action === 'confirm') { |
| | | // ç¹å»âç¡®å®âæé®ï¼å
许å
³é |
| | | this.$axios.post(this.$api.manageRecordCheck.ratifyManageRecordCheck, {id:row.id,ratifyState:'éè¿'}).then(res => { |
| | | if (res.code === 201) return |
| | | this.refreshTable() |
| | | done(); |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æäº¤æå' |
| | | }) |
| | | }) |
| | | .catch(err => { |
| | | |
| | | }) |
| | | } else if (action === 'cancel') { |
| | | // ç¹å»âåæ¶âæé®ï¼ä¸å
许å
³é |
| | | this.$axios.post(this.$api.manageRecordCheck.ratifyManageRecordCheck, {id:row.id,ratifyState:'ä¸éè¿'}).then(res => { |
| | | if (res.code === 201) return |
| | | this.refreshTable() |
| | | done(); |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æäº¤æå' |
| | | }) |
| | | }) |
| | | .catch(err => { |
| | | |
| | | }) |
| | | console.log("åæ¶æé®ç¹å»äºä»¶ï¼ä¸å
³éå¼¹æ¡"); |
| | | } else if (action === 'close') { |
| | | // ç¹å»âÃâæé®ï¼ä¸å
许å
³é |
| | | done(); |
| | | console.log("Ãæé®ç¹å»äºä»¶ï¼ä¸å
³éå¼¹æ¡"); |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | beforeUpload(file) { |
| | | if (file.size > 1024 * 1024 * 10) { |
| | | this.$message.error('ä¸ä¼ æä»¶ä¸è¶
è¿10M'); |
| | | this.$refs.upload.clearFiles() |
| | | return false; |
| | | } else { |
| | | // this.upLoading = true; |
| | | return true; |
| | | } |
| | | }, |
| | | onError(err, file, fileList) { |
| | | this.$message.error('ä¸ä¼ 失败') |
| | | this.$refs.upload.clearFiles() |
| | | }, |
| | | handleSuccessUp(response) { |
| | | this.upLoading = false; |
| | | if (response.code == 200) { |
| | | this.$message.success('ä¸ä¼ æå'); |
| | | this.$refs['ValueTable'].selectList() |
| | | }else{ |
| | | this.$message.error('ä¸ä¼ 失败'); |
| | | } |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .title { |
| | | height: 60px; |
| | | line-height: 60px; |
| | | } |
| | | .search { |
| | | background-color: #fff; |
| | | height: 80px; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .search_thing { |
| | | width: 350px; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .search_label { |
| | | width: 110px; |
| | | font-size: 14px; |
| | | text-align: right; |
| | | } |
| | | |
| | | .search_input { |
| | | width: calc(100% - 110px); |
| | | } |
| | | |
| | | .table { |
| | | margin-top: 10px; |
| | | background-color: #fff; |
| | | width: calc(100% - 40px); |
| | | height: calc(100% - 60px - 80px - 10px - 40px); |
| | | padding: 20px; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <!-- æä»¶ä¿®è®¢ç³è¯·å®¡æ¹è®°å½ --> |
| | | <div class="DocumentRevisionRequestApprovalRecords"> |
| | | <el-row class="title"> |
| | | <el-col :span="12" style="padding-left: 20px;text-align: left;">æä»¶ä¿®è®¢ç³è¯·å®¡æ¹è®°å½</el-col> |
| | | <el-col :span="12" style="text-align: right;"> |
| | | <el-button size="medium" type="primary" @click="openAdd" v-if="addPower">æ°å¢</el-button> |
| | | <!-- <el-upload :action="action" :show-file-list="false" |
| | | accept='.doc,.docx' :headers="headers" :on-change="beforeUpload" |
| | | :on-error="onError" ref='upload' v-if="upPower" :on-success="handleSuccessUp" style="display:inline-block;margin-left: 20px;"> |
| | | <el-button type="primary" size="medium">导å
¥</el-button></el-upload> --> |
| | | <el-button size="medium" type="primary" @click="handleDown" :loading="outLoading" v-if="outPower" style="display:inline-block;margin-left: 20px;">导åº</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | <div class="search"> |
| | | <!-- <div class="search_thing"> |
| | | <div class="search_label">æä»¶åç§°ï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable v-model="componentData.entity.documentName" |
| | | @keyup.enter.native="refreshTable()"></el-input></div> |
| | | </div> --> |
| | | <div class="search_thing"> |
| | | <div class="search_label">æä»¶ç¼å·ï¼</div> |
| | | <div class="search_input"> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable v-model="componentData.entity.documentCode" |
| | | @keyup.enter.native="refreshTable()"></el-input> |
| | | </div> |
| | | </div> |
| | | <div class="search_thing" style="padding-left: 30px;"> |
| | | <el-button size="small" @click="refresh()">é ç½®</el-button> |
| | | <el-button size="small" type="primary" @click="refreshTable()">æ¥ è¯¢</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="table"> |
| | | <ValueTable ref="ValueTable" :url="$api.manageRecordAudit.pageManageRecordAudit" |
| | | :delUrl="$api.manageRecordAudit.delManageRecordAudit" |
| | | :componentData="componentData" :upUrl="$api.manageRecordIssueRecycle.doManageRecordIssueRecycle" :key="upIndex"/> |
| | | </div> |
| | | <el-dialog |
| | | :title="title" |
| | | :visible.sync="addDialogVisible" |
| | | width="800px" top="6vh"> |
| | | <el-row> |
| | | <el-col :span="12" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">ç³è¯·ç±»åï¼</div> |
| | | <div class="search_input"> |
| | | <el-radio-group v-model="addInfo.method" size="small" :disabled="title.includes('æè§')"> |
| | | <el-radio label="修订">修订</el-radio> |
| | | <el-radio label="ä½åº">ä½åº</el-radio> |
| | | </el-radio-group> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="12" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label"><span style="color: red;margin-left: 4px;">* </span>æä»¶ç¼å·ï¼</div> |
| | | <div class="search_input"> |
| | | <el-select v-model="addInfo.documentCode" size="small" style="width: 100%;" @change="getCurrentFile" allow-create clearable filterable :disabled="title.includes('æè§')"> |
| | | <el-option |
| | | v-for="item in fileList" |
| | | :key="item.documentCode" |
| | | :label="item.title" |
| | | :value="item.documentCode"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="12" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">æä»¶åç§°ï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable v-model="addInfo.documentName" :disabled="title.includes('æè§')"></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="12" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">ç« èå·ï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable v-model="addInfo.capter" :disabled="title.includes('æè§')"></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="12" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">页ç ï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable v-model="addInfo.pages" :disabled="title.includes('æè§')"></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="12" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">ä¿®æ¹æ¬¡æ°ï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable v-model="addInfo.number" :disabled="title.includes('æè§')"></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="12" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">ä¿®æ¹åçæ¬å·ï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable v-model="addInfo.beforeVersion" :disabled="title.includes('æè§')"></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="12" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">ä¿®æ¹åçæ¬å·ï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable v-model="addInfo.afterVersion" :disabled="title.includes('æè§')"></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="12" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">修订人ï¼</div> |
| | | <div class="search_input"> |
| | | <el-select v-model="addInfo.alterUser" placeholder="è¯·éæ©" size="small" style="width: 100%;" filterable :disabled="title.includes('æè§')"> |
| | | <el-option |
| | | v-for="item in personList" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="12" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">åååé¨é¨ï¼</div> |
| | | <div class="search_input"> |
| | | <el-select v-model="addInfo.beforeDepart" placeholder="è¯·éæ©" size="small" style="width: 100%;" :disabled="title.includes('æè§')"> |
| | | <el-option |
| | | v-for="item in list" |
| | | :key="item.name" |
| | | :label="item.name" |
| | | :value="item.name"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="12" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">修订åååé¨é¨ï¼</div> |
| | | <div class="search_input"> |
| | | <el-select v-model="addInfo.afterDepart" placeholder="è¯·éæ©" size="small" style="width: 100%;" :disabled="title.includes('æè§')"> |
| | | <el-option |
| | | v-for="item in list" |
| | | :key="item.name" |
| | | :label="item.name" |
| | | :value="item.name"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | </el-col><el-col :span="12" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">æ¥æï¼</div> |
| | | <div class="search_input"> |
| | | <el-date-picker |
| | | v-model="addInfo.date" |
| | | type="date" |
| | | size="small" |
| | | placeholder="éæ©æ¥æ" |
| | | format="yyyy-MM-dd" |
| | | value-format="yyyy-MM-dd" style="width: 100%;"> |
| | | </el-date-picker> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="24" style="margin-bottom: 16px;"> |
| | | <div class="search_thing" style="width: 90%;"> |
| | | <div class="search_label">ä¿®æ¹å
容ï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable v-model="addInfo.alterThing" type="textarea" |
| | | :rows="2" :disabled="title.includes('æè§')"></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="24" style="margin-bottom: 16px;"> |
| | | <div class="search_thing" style="width: 90%;"> |
| | | <div class="search_label">åååå ï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable v-model="addInfo.reason" type="textarea" |
| | | :rows="2" :disabled="title.includes('æè§')"></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="12" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">ä¸ä¼ éä»¶ï¼</div> |
| | | <div class="search_input"><el-upload |
| | | style="margin: 8px 0 0px 50px;" |
| | | action="#" |
| | | :auto-upload="false" |
| | | :multiple="false" |
| | | accept='.pdf' :on-change="handleChangeUpload" v-if="addDialogVisible&&!title.includes('æè§')"> |
| | | <el-button size="small" type="primary">ä¸ä¼ éä»¶</el-button> |
| | | </el-upload></div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="12" style="margin-bottom: 16px;" v-if="title.includes('æè§')"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">ç³è¯·é¨é¨ä¸»ç®¡æè§ï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable v-model="addInfo.applicant" type="textarea" |
| | | :rows="2" :disabled="title!='ç³è¯·é¨é¨ä¸»ç®¡æè§'"></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="12" style="margin-bottom: 16px;" v-if="title.includes('æè§')"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">åå®å¶é¨é¨æè§ï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable v-model="addInfo.formulation" type="textarea" |
| | | :rows="2" :disabled="title!='åå®å¶é¨é¨æè§'"></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="12" style="margin-bottom: 16px;" v-if="title.includes('æè§')"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">åå®¡æ ¸é¨é¨æè§ï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable v-model="addInfo.audit" type="textarea" |
| | | :rows="2" :disabled="title!='åå®¡æ ¸é¨é¨æè§'"></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="addDialogVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="handleAdd" :loading="addLoading">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog |
| | | :title="title0" |
| | | :visible.sync="detailDialogVisible" width="900px" top="20px" :class="{downPdf:title0=='ä¸è½½'}" :modal="title0!='ä¸è½½'"> |
| | | <div style="max-height: 75vh;overflow-y: auto;"> |
| | | <div id="dialogBody"> |
| | | <h4 style="display: flex;align-items: center;flex-direction: column;justify-content: center;"> |
| | | <span style="font-size: 20px;">æä»¶æ´æ¹/ä½åºç³è¯·è¡¨</span> |
| | | <span>Application for alteration/cancellation of Document</span> |
| | | </h4> |
| | | <p style="display: flex;justify-content: space-between;margin-top: 16px;"> |
| | | <span>{{ currentInfo.documentCode }}</span> |
| | | <span>{{currentInfo.method}}</span> |
| | | </p> |
| | | <table border="1" class="tables" cellpadding="10"> |
| | | <tr> |
| | | <td> |
| | | <p>ç³è¯·é¨é¨</p> |
| | | <p class="en">Application department</p> |
| | | </td> |
| | | <td>{{ currentInfo.createUserDepart }}</td> |
| | | <td> |
| | | <p>ç³è¯·äºº</p> |
| | | <p>Proposer</p> |
| | | </td> |
| | | <td>{{ currentInfo.createUserName }}</td> |
| | | <td > |
| | | <p>ç³è¯·æ¶é´</p> |
| | | <p class="en">Application date</p> |
| | | </td> |
| | | <td>{{ currentInfo.createTime }}</td> |
| | | </tr> |
| | | <tr> |
| | | <td> |
| | | <p>æä»¶åç§°</p> |
| | | <p class="en">File name</p> |
| | | </td> |
| | | <td colspan="3">{{ currentInfo.documentName }}</td> |
| | | <td> |
| | | <p>æä»¶ç¼å·</p> |
| | | <p class="en">Document number</p> |
| | | </td> |
| | | <td>{{ currentInfo.documentCode }}</td> |
| | | </tr> |
| | | <tr> |
| | | <td> |
| | | <p>ä¿®æ¹åçæ¬¡</p> |
| | | <p class="en">Modify previous editions</p> |
| | | </td> |
| | | <td colspan="2">{{ currentInfo.beforeVersion }}</td> |
| | | <td > |
| | | <p>ä¿®æ¹åçæ¬¡</p> |
| | | <p class="en">Revised edition</p> |
| | | </td> |
| | | <td colspan="2">{{ currentInfo.afterVersion }}</td> |
| | | </tr> |
| | | <tr> |
| | | <td> |
| | | <p>åååå </p> |
| | | <p class="en">Changing reason</p> |
| | | </td> |
| | | <td colspan="5"> |
| | | <div class="user-content"> |
| | | <p style="text-align: left;line-height: 26px;">{{ currentInfo.reason }}</p> |
| | | </div> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td> |
| | | <p>åæå
容</p> |
| | | <p class="en">Original content</p> |
| | | </td> |
| | | <td colspan="2">è§éä»¶</td> |
| | | <td > |
| | | <p>æä¿®è®¢å
容</p> |
| | | <p class="en">Content be revised</p> |
| | | </td> |
| | | <td colspan="2">{{ currentInfo.alterThing }}</td> |
| | | </tr> |
| | | <tr> |
| | | <td> |
| | | <p>修订åååé¨é¨</p> |
| | | <p class="en">Distribute to the department after revision</p> |
| | | </td> |
| | | <td colspan="2">{{ currentInfo.afterDepart }}</td> |
| | | <td > |
| | | <p>ååæ¾é¨é¨</p> |
| | | <p class="en">The original distribution department</p> |
| | | </td> |
| | | <td colspan="2">{{ currentInfo.beforeDepart }}</td> |
| | | </tr> |
| | | <tr> |
| | | <td> |
| | | <p>ç³è¯·é¨é¨ä¸»ç®¡æè§</p> |
| | | <p class="en">Opinion of the head of the applicant department</p> |
| | | </td> |
| | | <td colspan="2"> |
| | | <p>åå¶å®é¨é¨æè§</p> |
| | | <p class="en">Original formulation of the department's opinion</p> |
| | | </td> |
| | | <td colspan="2"> |
| | | <p>åå®¡æ ¸é¨é¨æè§</p> |
| | | <p class="en">Opinion of the original audit department</p> |
| | | </td> |
| | | <td> |
| | | <p>æ¹å</p> |
| | | <p class="en">Ratify</p> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td> |
| | | {{ currentInfo.applicant }} |
| | | </td> |
| | | <td colspan="2"> |
| | | {{ currentInfo.formulation }} |
| | | </td> |
| | | <td colspan="2"> |
| | | {{ currentInfo.audit }} |
| | | </td> |
| | | <td> |
| | | <img :src="javaApi+'img/'+currentInfo.ratifyUserUrl" style="width: 100%;" alt="æ¹å人ç¾å"> |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | </div> |
| | | </div> |
| | | </el-dialog> |
| | | <el-dialog |
| | | title="æä»¶é¢è§" |
| | | :visible.sync="lookDialogVisible" |
| | | width="800px" top="5vh" fullscreen> |
| | | <h4>修订å
容</h4> |
| | | <filePreview v-if="lookDialogVisible" :fileUrl="javaApi+'/word/'+currentInfo.afterUrl" |
| | | :currentFile="{}"/> |
| | | <h4>åå
容</h4> |
| | | <filePreview v-if="lookDialogVisible" :fileUrl="javaApi+'/word/'+currentInfo.beforeUrl" |
| | | :currentFile="{}"/> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import ValueTable from '../tool/value-table.vue' |
| | | import {exportHtmlToPDF} from '../../util/downHtmlToPDF' |
| | | import filePreview from '../tool/file-preview.vue' |
| | | export default { |
| | | components: { |
| | | ValueTable, |
| | | filePreview |
| | | }, |
| | | data () { |
| | | return { |
| | | addPower:true, |
| | | outPower:true, |
| | | outLoading:false, |
| | | lookDialogVisible:false, |
| | | addLoading:false, |
| | | componentData: { |
| | | entity: { |
| | | // documentName: null, |
| | | documentCode: null, |
| | | orderBy: { |
| | | field: 'createTime', |
| | | order: 'desc' |
| | | } |
| | | }, |
| | | isIndex: true, |
| | | showSelect: false, |
| | | select: false, |
| | | // selectMethod: 'handleChangeTask', |
| | | do: [{ |
| | | id: 'handleLook', |
| | | font: 'æ¥ç', |
| | | type: 'text', |
| | | method: 'handleLook' |
| | | }, { |
| | | id: 'handleLook0', |
| | | font: 'æä»¶é¢è§', |
| | | type: 'text', |
| | | method: 'handleLook0' |
| | | }, { |
| | | id: 'handleOut', |
| | | font: 'ä¸è½½', |
| | | type: 'text', |
| | | method: 'handleOut' |
| | | }, { |
| | | id: 'delete', |
| | | font: 'å é¤', |
| | | type: 'text', |
| | | method: 'doDiy', |
| | | disabFun: (row, index) => { |
| | | return !!row.ratifyUser |
| | | } |
| | | }, { |
| | | id: 'handleEdit', |
| | | font: 'ä¿®æ¹', |
| | | type: 'text', |
| | | method: 'handleEdit', |
| | | field:[], |
| | | disabFun: (row, index) => { |
| | | return !!row.ratifyUser |
| | | } |
| | | }, { |
| | | id: 'handleRatify', |
| | | font: 'æ¹å', |
| | | type: 'text', |
| | | method: 'handleRatify', |
| | | field:[], |
| | | disabFun: (row, index) => { |
| | | return !!row.ratifyUser |
| | | } |
| | | }, { |
| | | id: 'handlework0', |
| | | font: 'ç³è¯·æè§', |
| | | type: 'text', |
| | | method: 'handlework0', |
| | | field:[], |
| | | disabFun: (row, index) => { |
| | | return !!row.ratifyUser |
| | | } |
| | | }, { |
| | | id: 'handlework1', |
| | | font: 'åå®å¶æè§', |
| | | type: 'text', |
| | | method: 'handlework1', |
| | | field:[], |
| | | disabFun: (row, index) => { |
| | | return !!row.ratifyUser |
| | | } |
| | | }, { |
| | | id: 'handlework2', |
| | | font: 'åå®¡æ ¸æè§', |
| | | type: 'text', |
| | | method: 'handlework2', |
| | | field:[], |
| | | disabFun: (row, index) => { |
| | | return !!row.ratifyUser |
| | | } |
| | | }], |
| | | tagField: { |
| | | // documentType:{ |
| | | // select: [] |
| | | // }, |
| | | // receiveUserName:{ |
| | | // select: [] |
| | | // }, |
| | | }, |
| | | selectField: { |
| | | // documentType:{ |
| | | // select: [] |
| | | // }, |
| | | // receiveUserName:{ |
| | | // select: [] |
| | | // }, |
| | | }, |
| | | addUpload:['signatoryUrl'], |
| | | requiredAdd: [], |
| | | requiredUp: [], |
| | | datePicker:['receiveDate'], |
| | | noHead:['signedUserName','signedDate','departLims'],//ä¸å䏿°å¢ç¼è¾çåæ®µ |
| | | needSort: [], |
| | | inputType:'' |
| | | }, |
| | | entityCopy: {}, |
| | | upIndex: 0, |
| | | title:'æ°å¢', |
| | | addInfo:{ |
| | | method:'修订', |
| | | }, |
| | | addDialogVisible:false, |
| | | detailDialogVisible:false, |
| | | fileList:[], |
| | | personList:[], |
| | | list:[], |
| | | file:null, |
| | | title0:'æ¥ç', |
| | | currentInfo:{}, |
| | | } |
| | | }, |
| | | mounted(){ |
| | | this.entityCopy = this.HaveJson(this.componentData.entity); |
| | | this.getPower() |
| | | this.getFileList() |
| | | this.getAuthorizedPerson() |
| | | this.selectTreeList() |
| | | }, |
| | | methods:{ |
| | | getPower(){ |
| | | let power = JSON.parse(sessionStorage.getItem('power')) |
| | | let add = false |
| | | let del = false |
| | | let out = false; |
| | | let ratify = false |
| | | let audit1 = false |
| | | let audit2 = false |
| | | let audit3 = false |
| | | for (var i = 0; i < power.length; i++) { |
| | | if (power[i].menuMethod == 'addManageRecordAudit') { |
| | | add = true |
| | | } |
| | | if (power[i].menuMethod == 'delManageRecordAudit') { |
| | | del = true |
| | | } |
| | | if (power[i].menuMethod == 'ratifyManageRecordAudit') { |
| | | ratify = true |
| | | } |
| | | if (power[i].menuMethod == 'exportOutManageRecordAudit') { |
| | | out = true |
| | | } |
| | | if (power[i].menuMethod == 'manageRecordAudit1') { |
| | | audit1 = true |
| | | } |
| | | if (power[i].menuMethod == 'manageRecordAudit2') { |
| | | audit2 = true |
| | | } |
| | | if (power[i].menuMethod == 'manageRecordAudit3') { |
| | | audit3 = true |
| | | } |
| | | } |
| | | if (!audit3) { |
| | | this.componentData.do.splice(8, 1) |
| | | } |
| | | if (!audit2) { |
| | | this.componentData.do.splice(7, 1) |
| | | } |
| | | if (!audit1) { |
| | | this.componentData.do.splice(6, 1) |
| | | } |
| | | if (!ratify) { |
| | | this.componentData.do.splice(5, 1) |
| | | } |
| | | if (!add) { |
| | | this.componentData.do.splice(4, 1) |
| | | } |
| | | if (!del) { |
| | | this.componentData.do.splice(3, 1) |
| | | } |
| | | this.addPower = add |
| | | this.outPower = out |
| | | }, |
| | | openAdd(){ |
| | | this.addInfo = { |
| | | method:'修订', |
| | | } |
| | | this.title = 'æ°å¢' |
| | | this.addDialogVisible = true; |
| | | }, |
| | | // å¯¼åº |
| | | handleDown(){ |
| | | this.outLoading = true |
| | | this.$axios.post(this.$api.manageRecordAudit.exportOutManageRecordAudit,{entity:this.componentData.entity},{headers: { 'Content-Type': 'application/json' }}).then(res => { |
| | | this.outLoading = false |
| | | if(res.code==201) return this.$message.error('导åºå¤±è´¥') |
| | | this.$message.success('å¯¼åºæå') |
| | | let url = this.javaApi+'word/'+res.message |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = 'æä»¶ä¿®è®¢è¡¨'; |
| | | link.click(); |
| | | }) |
| | | }, |
| | | refreshTable() { |
| | | this.$refs['ValueTable'].selectList() |
| | | }, |
| | | refresh() { |
| | | this.componentData.entity = this.HaveJson(this.entityCopy) |
| | | this.upIndex++ |
| | | this.refreshTable() |
| | | }, |
| | | // è·åæä»¶å表--æä»¶æ¸
å |
| | | getFileList(){ |
| | | this.$axios.post(this.$api.manageDocumentList.pageManageDocumentList,{ |
| | | entity: { |
| | | orderBy: { |
| | | field: 'createTime', |
| | | order: 'desc' |
| | | } |
| | | }, |
| | | page:{ |
| | | current:-1, |
| | | size:-1 |
| | | } |
| | | },{headers: { |
| | | 'Content-Type': 'application/json' |
| | | }}).then(res=>{ |
| | | this.fileList = res.data.body.records.map(m=>{ |
| | | m.title = m.documentCode |
| | | return m |
| | | }) |
| | | }).catch(err=>{}) |
| | | }, |
| | | getCurrentFile(e){}, |
| | | handleAdd(){ |
| | | if(!this.addInfo.documentCode) return this.$message({type:'error',message:"请è¾å
¥æä»¶ç¼å·"}) |
| | | if(!this.addInfo.id){ |
| | | // æ°å¢ |
| | | let fd = new FormData(); |
| | | //æä»¶ä¿¡æ¯ä¸rawææ¯ççæä»¶ |
| | | if(this.file){ |
| | | fd.append("file",this.file.raw); |
| | | } |
| | | for (let m in this.addInfo){ |
| | | fd.append(m,this.addInfo[m]) |
| | | } |
| | | this.addLoading = true |
| | | this.$axios.post(this.$api.manageRecordAudit.addManageRecordAudit, fd,{ |
| | | headers: { |
| | | 'Content-Type': 'multipart/form-data' |
| | | }, |
| | | noQs:true |
| | | }).then(res => { |
| | | this.addLoading = false |
| | | if (res.code == 200) { |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æ·»å æå' |
| | | }) |
| | | this.refreshTable() |
| | | this.addDialogVisible = false |
| | | } else { |
| | | this.$message({ |
| | | type: 'error', |
| | | message: 'æ·»å 失败' |
| | | }) |
| | | } |
| | | }) |
| | | }else{ |
| | | // ä¿®æ¹ |
| | | let {id,method,documentCode,documentName,capter,pages,beforeVersion,afterVersion,alterUser,alterThing,reason,beforeDepart,afterDepart,number,applicant,formulation,audit,date} = this.addInfo |
| | | let fd = new FormData(); |
| | | //æä»¶ä¿¡æ¯ä¸rawææ¯ççæä»¶ |
| | | if(this.file){ |
| | | fd.append("file",this.file.raw); |
| | | } |
| | | let obj = {id,method,documentCode,documentName,capter,pages,beforeVersion,afterVersion,alterUser,alterThing,reason,beforeDepart,afterDepart,number,applicant,formulation,audit,date} |
| | | for (let m in obj){ |
| | | if(this.addInfo[m]){ |
| | | fd.append(m,this.addInfo[m]) |
| | | } |
| | | } |
| | | this.addLoading = true |
| | | this.$axios.post(this.$api.manageRecordAudit.doManageRecordAudit, fd,{ |
| | | headers: { |
| | | 'Content-Type': 'multipart/form-data' |
| | | }, |
| | | noQs:true |
| | | }).then(res => { |
| | | this.addLoading = false |
| | | if (res.code == 200) { |
| | | this.refreshTable() |
| | | this.addDialogVisible = false |
| | | } else { |
| | | this.$message({ |
| | | type: 'error', |
| | | message: 'æ·»å 失败' |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | getAuthorizedPerson() { |
| | | this.$axios.get(this.$api.user.getUserMenu).then(res => { |
| | | let data = [] |
| | | res.data.forEach(a => { |
| | | data.push({ |
| | | label: a.name, |
| | | value: a.id |
| | | }) |
| | | }) |
| | | // this.componentData.tagField.receiveUserName.select = data |
| | | // this.componentData.selectField.receiveUserName.select = data |
| | | this.personList = data |
| | | }) |
| | | }, |
| | | // æ¥è¯¢æ å½¢å表 |
| | | selectTreeList() { |
| | | this.$axios.get(this.$api.personnel.selectCNSAPersonTree).then((res) => { |
| | | this.list = res.data[0].children; |
| | | }); |
| | | }, |
| | | handleChangeUpload(file, fileLists){ |
| | | this.file = file |
| | | // this.$set(this.addInfo,'name',file.name) |
| | | }, |
| | | handleEdit(row){ |
| | | this.addInfo = row |
| | | this.title = 'ä¿®æ¹' |
| | | this.addDialogVisible = true; |
| | | }, |
| | | // å®¡æ¹ |
| | | handleRatify(row){ |
| | | this.$confirm('æ¯å¦æ¹åéè¿?', 'æ¹å', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }) |
| | | .then(() => { |
| | | this.$axios |
| | | .post(this.$api.manageRecordAudit.ratifyManageRecordAudit,{id:row.id}) |
| | | .then(res => { |
| | | if (res.code === 201) { |
| | | return; |
| | | } |
| | | this.$message.success('æä½æå'); |
| | | this.refreshTable(); |
| | | }) |
| | | .catch(e => { |
| | | this.$message.error('æä½å¤±è´¥'); |
| | | }); |
| | | }) |
| | | .catch(() => { |
| | | }); |
| | | }, |
| | | handlework0(row){ |
| | | this.addInfo = row |
| | | this.title = 'ç³è¯·é¨é¨ä¸»ç®¡æè§' |
| | | this.addDialogVisible = true; |
| | | }, |
| | | handlework1(row){ |
| | | this.addInfo = row |
| | | this.title = 'åå®å¶é¨é¨æè§' |
| | | this.addDialogVisible = true; |
| | | }, |
| | | handlework2(row){ |
| | | this.addInfo = row |
| | | this.title = 'åå®¡æ ¸é¨é¨æè§' |
| | | this.addDialogVisible = true; |
| | | }, |
| | | handleLook(row){ |
| | | this.title0 = 'æ¥ç' |
| | | this.currentInfo = row |
| | | this.detailDialogVisible = true; |
| | | }, |
| | | handleOut(row){ |
| | | this.currentInfo = row |
| | | this.title0 = 'ä¸è½½' |
| | | this.detailDialogVisible = true; |
| | | setTimeout(() => { |
| | | this.$nextTick(() => { |
| | | const element = document.getElementById("dialogBody"); |
| | | exportHtmlToPDF(element,'æä»¶'+row.method+'ç³è¯·è¡¨').then(res=>{ |
| | | this.detailDialogVisible = false; |
| | | }) |
| | | }) |
| | | }, 500); |
| | | }, |
| | | handleLook0(row){ |
| | | this.currentInfo = row; |
| | | this.lookDialogVisible = true |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .title { |
| | | height: 60px; |
| | | line-height: 60px; |
| | | } |
| | | .search { |
| | | background-color: #fff; |
| | | height: 80px; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .search_thing { |
| | | width: 350px; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .search_label { |
| | | width: 110px; |
| | | font-size: 14px; |
| | | text-align: right; |
| | | } |
| | | |
| | | .search_input { |
| | | width: calc(100% - 110px); |
| | | } |
| | | |
| | | .table { |
| | | margin-top: 10px; |
| | | background-color: #fff; |
| | | width: calc(100% - 40px); |
| | | height: calc(100% - 60px - 80px - 10px - 40px); |
| | | padding: 20px; |
| | | } |
| | | .tables { |
| | | table-layout: fixed; |
| | | width: 100%; |
| | | margin-top: 10px; |
| | | } |
| | | |
| | | .tables td { |
| | | height: 40px; |
| | | width: 100px; |
| | | text-align: center; |
| | | font-size: 14px; |
| | | word-wrap: break-word; |
| | | white-space: normal; |
| | | } |
| | | .en{ |
| | | font-size: 12px; |
| | | word-break: break-word; /* èªå¨æè¡ */ |
| | | overflow-wrap: break-word; /* 鲿¢æº¢åº */ |
| | | white-space: normal; /* é»è®¤æ¢è¡ */ |
| | | } |
| | | |
| | | .heads td { |
| | | border: 1px dashed black; /* åå
æ ¼çè线 */ |
| | | padding: 8px; |
| | | text-align: left; |
| | | } |
| | | .downPdf{ |
| | | opacity: 0 !important; |
| | | } |
| | | h4.title{ |
| | | position: relative; |
| | | height: 30px; |
| | | line-height: 30px; |
| | | box-sizing: border-box; |
| | | padding-left: 16px; |
| | | margin-left: 10px; |
| | | margin-bottom: 10px; |
| | | } |
| | | h4.title::after{ |
| | | content: ''; |
| | | width: 4px; |
| | | height: 20px; |
| | | background: #3A7BFA; |
| | | position: absolute; |
| | | top: 5px; |
| | | left: 0; |
| | | } |
| | | >>>.el-dialog__body{ |
| | | height: auto; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <!-- 夿¥æä»¶ç¡®è®¤è®°å½ --> |
| | | <div class="ExternalDocumentConfirmationRecords"> |
| | | <el-row class="title"> |
| | | <el-col :span="20" style="padding-left: 20px;text-align: left;">夿¥æä»¶ç¡®è®¤è®°å½</el-col> |
| | | </el-row> |
| | | <el-tabs type="border-card" v-model="activeName" style="height: 100%;"> |
| | | <el-tab-pane label="å¡«å" name="å¡«å" style="height: 100%;"> |
| | | <div style="display: flex;align-items: center;justify-content: flex-end;margin-right: 20px;"> |
| | | <el-button size="small" type="primary" @click="handleAdd0" style="margin-left: 20px;" v-if="addPower">æ°å¢</el-button> |
| | | <el-upload :action="action" :multiple="false" |
| | | :show-file-list="false" |
| | | accept='.doc,.docx' :headers="headers" :on-change="beforeUpload" |
| | | :on-error="onError" ref='upload' v-if="upPower" :on-success="handleSuccessUp" style="display:inline-block;margin-left: 20px;"> |
| | | <el-button size="small" type="primary" :loading="upLoading">导å
¥</el-button></el-upload> |
| | | </div> |
| | | <div class="table" style="height: calc(100% - 200px)"> |
| | | <ValueTable ref="ValueTable0" :url="$api.manageRecordTotal.pageManageRecordVerify" |
| | | :componentData="componentData0" :key="upIndex0" :delUrl="$api.manageRecordTotal.delManageRecordVerify" :upUrl="$api.manageRecordTotal.doManageRecordVerify" /> |
| | | </div> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="åå²è®°å½" name="åå²è®°å½" style="height: 100%;"> |
| | | <div class="search"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">å¹´ï¼</div> |
| | | <div class="search_input"> |
| | | <el-date-picker |
| | | v-model="componentData.entity.year" |
| | | type="year" |
| | | placeholder="鿩年" format="yyyy" |
| | | value-format="yyyy" size="small" @change="refreshTable()"> |
| | | </el-date-picker> |
| | | </div> |
| | | </div> |
| | | <div class="search_thing" style="padding-left: 30px;"> |
| | | <el-button size="small" @click="refresh()">é ç½®</el-button> |
| | | <el-button size="small" type="primary" @click="refreshTable()">æ¥ è¯¢</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="table"> |
| | | <ValueTable ref="ValueTable" :url="$api.manageRecordTotal.pageManageRecordTotal" |
| | | :componentData="componentData" :key="upIndex"/> |
| | | </div> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | <!-- 详æ
/ä¸è½½/å®¡æ ¸ --> |
| | | <el-dialog |
| | | :title="title0" |
| | | :visible.sync="lookDialogVisible" |
| | | width="800px" :class="{downPdf:title0=='ä¸è½½'}" :modal="title0!='ä¸è½½'" top="5vh"> |
| | | <filePreview v-if="lookDialogVisible" :fileUrl="javaApi+'/word/'+currentInfo.url" |
| | | :currentFile="{}" style="max-height: 70vh;overflow-y: auto;"/> |
| | | <span slot="footer" class="dialog-footer" v-if="title0=='å®¡æ ¸'||title0=='æ¹å'"> |
| | | <el-button @click="submitCheck('ä¸éè¿')" :loading="noCheckLoading">ä¸éè¿</el-button> |
| | | <el-button type="primary" @click="submitCheck('éè¿')" :loading="checkLoading">é è¿</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import filePreview from '../tool/file-preview.vue' |
| | | import ValueTable from '../tool/value-table.vue' |
| | | export default { |
| | | components: { |
| | | ValueTable, |
| | | filePreview, |
| | | }, |
| | | data(){ |
| | | return{ |
| | | title0:'æ¥ç', |
| | | activeName:'å¡«å', |
| | | lookDialogVisible:false, |
| | | noCheckLoading:false, |
| | | checkLoading:false, |
| | | componentData: { |
| | | entity: { |
| | | year: null, |
| | | orderBy: { |
| | | field: 'id', |
| | | order: 'desc' |
| | | } |
| | | }, |
| | | isIndex: true, |
| | | showSelect: false, |
| | | select: false, |
| | | do: [{ |
| | | id: 'handleLook', |
| | | font: 'æ¥ç', |
| | | type: 'text', |
| | | method: 'handleLook', |
| | | disabFun: (row, index) => { |
| | | return !row.url |
| | | } |
| | | }, { |
| | | id: 'handleDown0', |
| | | font: 'ä¸è½½', |
| | | type: 'text', |
| | | method: 'handleDown0', |
| | | disabFun: (row, index) => { |
| | | return !row.url |
| | | } |
| | | }, |
| | | { |
| | | id: 'handleSubmit', |
| | | font: 'æäº¤', |
| | | type: 'text', |
| | | method: 'handleSubmit', |
| | | disabFun: (row, index) => { |
| | | return !!row.submitUserName |
| | | } |
| | | },{ |
| | | id: 'handleApproval', |
| | | font: 'æ¹å', |
| | | type: 'text', |
| | | method: 'handleApproval', |
| | | disabFun: (row, index) => { |
| | | return !row.submitUserName||!!row.ratifyUserName |
| | | } |
| | | }], |
| | | tagField: {}, |
| | | selectField: {}, |
| | | requiredAdd: [], |
| | | requiredUp: [], |
| | | needSort: [], |
| | | inputType:'' |
| | | }, |
| | | // æ ·åå表 |
| | | componentData0: { |
| | | entity: { |
| | | manageRecordTotalId: null, |
| | | orderBy: { |
| | | field: 'id', |
| | | order: 'desc' |
| | | } |
| | | }, |
| | | isIndex: true, |
| | | showSelect: false, |
| | | select: false, |
| | | do: [{ |
| | | id: 'update', |
| | | font: 'ä¿®æ¹', |
| | | type: 'text', |
| | | method: 'doDiy' |
| | | },{ |
| | | id: 'delete', |
| | | font: 'å é¤', |
| | | type: 'text', |
| | | method: 'doDiy' |
| | | }], |
| | | tagField: {}, |
| | | selectField: {}, |
| | | requiredAdd: ['documentName','documentCode'], |
| | | requiredUp: ['documentName','documentCode'], |
| | | datePicker:['effectiveDate','cancelDate'], |
| | | needSort: [], |
| | | inputType:Â '' |
| | | }, |
| | | upIndex0: 100, |
| | | entityCopy: {}, |
| | | upIndex: 0, |
| | | addPower:true, |
| | | upPower:true, |
| | | currentInfo:{}, |
| | | upLoading:false, |
| | | } |
| | | }, |
| | | // ç¨äºä¸ä¼ æä»¶çä¿¡æ¯ |
| | | computed: { |
| | | headers() { |
| | | return { |
| | | 'token': sessionStorage.getItem('token') |
| | | } |
| | | }, |
| | | action() { |
| | | return this.javaApi +this.$api.manageRecordTotal.exportManageRecordVerify |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.entityCopy = this.HaveJson(this.componentData.entity); |
| | | this.getPower() |
| | | }, |
| | | methods:{ |
| | | getPower(){ |
| | | let power = JSON.parse(sessionStorage.getItem('power')) |
| | | let add = false |
| | | let del = false |
| | | let up = false; |
| | | let sub = false |
| | | let ratify = false |
| | | for (var i = 0; i < power.length; i++) { |
| | | if (power[i].menuMethod == 'addManageRecordVerify') { |
| | | add = true |
| | | } |
| | | if (power[i].menuMethod == 'delManageRecordVerify') { |
| | | del = true |
| | | } |
| | | if (power[i].menuMethod == 'exportManageRecordVerify') { |
| | | up = true |
| | | } |
| | | if (power[i].menuMethod == 'submitManageRecordTotal') { |
| | | sub = true |
| | | } |
| | | if (power[i].menuMethod == 'ratifyManageRecordTotal') { |
| | | ratify = true |
| | | } |
| | | } |
| | | if (!ratify) { |
| | | this.componentData.do.splice(3, 1) |
| | | } |
| | | if (!sub) { |
| | | this.componentData.do.splice(2, 1) |
| | | } |
| | | if (!del) { |
| | | this.componentData0.do.splice(1, 1) |
| | | } |
| | | if (!add) { |
| | | this.componentData0.do.splice(0, 1) |
| | | } |
| | | this.addPower = add |
| | | this.upPower = up |
| | | }, |
| | | handleAdd0(){ |
| | | this.$refs.ValueTable0.openAddDia(this.$api.manageRecordTotal.addManageRecordVerify); |
| | | }, |
| | | refreshTable() { |
| | | this.$refs['ValueTable'].selectList() |
| | | }, |
| | | beforeUpload(file) { |
| | | if (file.size > 1024 * 1024 * 10) { |
| | | this.$message.error('ä¸ä¼ æä»¶ä¸è¶
è¿10M'); |
| | | this.$refs.upload.clearFiles() |
| | | return false; |
| | | } else { |
| | | // this.upLoading = true; |
| | | return true; |
| | | } |
| | | }, |
| | | onError(err, file, fileList) { |
| | | this.$message.error('ä¸ä¼ 失败') |
| | | this.$refs.upload.clearFiles() |
| | | }, |
| | | handleSuccessUp(response) { |
| | | this.upLoading = false; |
| | | if (response.code == 200) { |
| | | this.$message.success('ä¸ä¼ æå'); |
| | | this.$refs['ValueTable0'].selectList() |
| | | }else{ |
| | | this.$message.error('ä¸ä¼ 失败'); |
| | | } |
| | | }, |
| | | refresh() { |
| | | this.componentData.entity = this.HaveJson(this.entityCopy) |
| | | this.upIndex++ |
| | | this.refreshTable() |
| | | }, |
| | | submitCheck(type){}, |
| | | // æ¥ç |
| | | handleLook(row){ |
| | | this.title0 = 'æ¥ç' |
| | | this.commonFun(row) |
| | | }, |
| | | // å
¬ç¨æ¹æ³ |
| | | commonFun(row,callbanck){ |
| | | this.currentInfo = row |
| | | this.componentData0.entity.manageRecordTotalId = row.id |
| | | this.$axios.post(this.$api.manageRecordTotal.pageManageRecordVerify ,{ |
| | | entity:this.componentData0.entity, |
| | | page:{ |
| | | current:-1, |
| | | size:-1 |
| | | } |
| | | },{headers: { |
| | | 'Content-Type': 'application/json' |
| | | },noQs:true}).then(res=>{ |
| | | this.currentInfo.arr = res.data.body.records |
| | | this.lookDialogVisible = true |
| | | if(callbanck){ |
| | | callbanck() |
| | | } |
| | | }).catch(err=>{}); |
| | | }, |
| | | handleDown0(row){ |
| | | let url = this.javaApi+'word/'+row.url |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = row.month+' 夿¥æä»¶ç¡®è®¤è®°å½'; |
| | | link.click(); |
| | | }, |
| | | // æäº¤ |
| | | handleSubmit(row){ |
| | | this.$confirm('æ¯å¦æäº¤ '+row.year+' å¹´çæ°æ®', 'æäº¤', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.$axios.post(this.$api.manageRecordTotal.submitManageRecordTotal,{ |
| | | id:row.id |
| | | }).then(res=>{ |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æäº¤æå!' |
| | | }); |
| | | this.$refs['ValueTable'].selectList() |
| | | }).catch(err=>{}); |
| | | }) |
| | | }, |
| | | // æ¹å |
| | | handleApproval(row){ |
| | | this.title0 = 'æ¹å' |
| | | this.commonFun(row) |
| | | }, |
| | | // æäº¤å®¡æ ¸/æ¹å |
| | | submitCheck(state){ |
| | | if(state=='éè¿'){ |
| | | this.checkLoading = true |
| | | }else{ |
| | | this.noCheckLoading = true |
| | | } |
| | | this.$axios.post(this.$api.manageRecordTotal.ratifyManageRecordTotal,{ |
| | | id:this.currentInfo.id, |
| | | ratifyState:state |
| | | }).then(res=>{ |
| | | this.checkLoading = false |
| | | this.noCheckLoading = false |
| | | if (res.code === 201) return |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æä½æå!' |
| | | }); |
| | | this.$refs['ValueTable'].selectList() |
| | | this.lookDialogVisible = false |
| | | }).catch(err=>{}); |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .title { |
| | | height: 60px; |
| | | line-height: 60px; |
| | | } |
| | | .search { |
| | | background-color: #fff; |
| | | height: 40px; |
| | | display: flex; |
| | | align-items: center; |
| | | position: relative; |
| | | } |
| | | |
| | | .search_thing { |
| | | width: 350px; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .search_label { |
| | | width: 110px; |
| | | font-size: 14px; |
| | | text-align: right; |
| | | } |
| | | |
| | | .search_input { |
| | | width: calc(100% - 110px); |
| | | } |
| | | |
| | | .table { |
| | | background-color: #fff; |
| | | width: calc(100% - 40px); |
| | | height: calc(100% - 60px - 140px); |
| | | padding: 20px; |
| | | } |
| | | >>>.el-tabs__content{ |
| | | height: 100%; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <!-- ä½åºæä»¶éæ¯è®°å½ --> |
| | | <div class="ObsoleteDocumentDestructionRecords"> |
| | | <el-row class="title"> |
| | | <el-col :span="12" style="padding-left: 20px;text-align: left;">ä½åºæä»¶éæ¯è®°å½</el-col> |
| | | <el-col :span="12" style="text-align: right;"> |
| | | <el-button size="medium" type="primary" @click="openAdd" v-if="addPower">æ°å¢</el-button> |
| | | <el-upload :action="action" :multiple="false" |
| | | :show-file-list="false" |
| | | accept='.doc,.docx' :headers="headers" :on-change="beforeUpload" |
| | | :on-error="onError" ref='upload' v-if="upPower" :on-success="handleSuccessUp" style="display:inline-block;margin-left: 20px;"> |
| | | <el-button type="primary" size="medium">导å
¥</el-button></el-upload> |
| | | <el-button size="medium" type="primary" @click="handleDown" :loading="outLoading" v-if="outPower" style="display:inline-block;margin-left: 20px;">导åº</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | <div class="search"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">æä»¶åç§°ï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable v-model="componentData.entity.documentName" |
| | | @keyup.enter.native="refreshTable()"></el-input></div> |
| | | </div> |
| | | <div class="search_thing"> |
| | | <div class="search_label">æä»¶ç¼å·ï¼</div> |
| | | <div class="search_input"> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable v-model="componentData.entity.documentCode" |
| | | @keyup.enter.native="refreshTable()"></el-input> |
| | | </div> |
| | | </div> |
| | | <div class="search_thing" style="padding-left: 30px;"> |
| | | <el-button size="small" @click="refresh()">é ç½®</el-button> |
| | | <el-button size="small" type="primary" @click="refreshTable()">æ¥ è¯¢</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="table"> |
| | | <ValueTable ref="ValueTable" :url="$api.manageRecordCancel.pageManageRecordCancel" |
| | | :delUrl="$api.manageRecordCancel.delManageRecordCancel" |
| | | :componentData="componentData" :upUrl="$api.manageRecordIssueRecycle.doManageRecordIssueRecycle" :key="upIndex"/> |
| | | </div> |
| | | <el-dialog |
| | | :title="title" |
| | | :visible.sync="addDialogVisible" |
| | | width="400px" top="6vh"> |
| | | <el-row> |
| | | <el-col :span="24" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label"><span style="color: red;margin-left: 4px;">* </span>æä»¶ç¼å·ï¼</div> |
| | | <div class="search_input"> |
| | | <el-select v-model="addInfo.documentCode" size="small" style="width: 100%;" @change="getCurrentFile" allow-create clearable filterable> |
| | | <el-option |
| | | v-for="item in fileList" |
| | | :key="item.documentCode" |
| | | :label="item.title" |
| | | :value="item.documentCode"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="24" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">æä»¶åç§°ï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable v-model="addInfo.documentName"></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="24" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">æ°éï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable v-model="addInfo.qty"></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="24" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">鿝åå ï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable v-model="addInfo.reason"></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="24" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">夿³¨ï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable v-model="addInfo.remark" type="textarea" |
| | | :rows="2"></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="addDialogVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="handleAdd" :loading="addLoading">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import ValueTable from '../tool/value-table.vue' |
| | | export default { |
| | | components: { |
| | | ValueTable |
| | | }, |
| | | data(){ |
| | | return{ |
| | | addPower:true, |
| | | outPower:true, |
| | | upPower:true, |
| | | outLoading:false, |
| | | addLoading:false, |
| | | componentData: { |
| | | entity: { |
| | | documentName: null, |
| | | documentCode: null, |
| | | orderBy: { |
| | | field: 'createTime', |
| | | order: 'desc' |
| | | } |
| | | }, |
| | | isIndex: true, |
| | | showSelect: false, |
| | | select: false, |
| | | // selectMethod: 'handleChangeTask', |
| | | do: [{ |
| | | id: 'delete', |
| | | font: 'å é¤', |
| | | type: 'text', |
| | | method: 'doDiy', |
| | | disabFun: (row, index) => { |
| | | return row.ratifyState=='éè¿' |
| | | } |
| | | }, { |
| | | id: 'handleEdit0', |
| | | font: 'ä¿®æ¹', |
| | | type: 'text', |
| | | method: 'handleEdit0', |
| | | field:[], |
| | | disabFun: (row, index) => { |
| | | return row.ratifyState=='éè¿' |
| | | } |
| | | }, { |
| | | id: 'handleRatify', |
| | | font: 'æ¹å', |
| | | type: 'text', |
| | | method: 'handleRatify', |
| | | field:[], |
| | | disabFun: (row, index) => { |
| | | return row.ratifyState=='éè¿' |
| | | } |
| | | }], |
| | | tagField: { |
| | | // documentType:{ |
| | | // select: [] |
| | | // }, |
| | | // receiveUserName:{ |
| | | // select: [] |
| | | // }, |
| | | }, |
| | | selectField: { |
| | | // documentType:{ |
| | | // select: [] |
| | | // }, |
| | | // receiveUserName:{ |
| | | // select: [] |
| | | // }, |
| | | }, |
| | | addUpload:['signatoryUrl'], |
| | | requiredAdd: [], |
| | | requiredUp: [], |
| | | datePicker:['receiveDate'], |
| | | noHead:['signedUserName','signedDate','departLims'],//ä¸å䏿°å¢ç¼è¾çåæ®µ |
| | | needSort: [], |
| | | inputType:'' |
| | | }, |
| | | entityCopy: {}, |
| | | upIndex: 0, |
| | | addInfo:{}, |
| | | title:'æ°å¢', |
| | | addInfo:{}, |
| | | addDialogVisible:false, |
| | | fileList:[], |
| | | personList:[], |
| | | } |
| | | }, |
| | | // ç¨äºä¸ä¼ æä»¶çä¿¡æ¯ |
| | | computed: { |
| | | headers() { |
| | | return { |
| | | 'token': sessionStorage.getItem('token') |
| | | } |
| | | }, |
| | | action() { |
| | | return this.javaApi +this.$api.manageRecordCancel.exportInManageRecordCancel |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.entityCopy = this.HaveJson(this.componentData.entity); |
| | | this.getPower() |
| | | this.getAuthorizedPerson() |
| | | this.getFileList() |
| | | }, |
| | | methods:{ |
| | | getPower(){ |
| | | let power = JSON.parse(sessionStorage.getItem('power')) |
| | | let add = false |
| | | let del = false |
| | | let up = false; |
| | | let out = false; |
| | | let ratify = false |
| | | for (var i = 0; i < power.length; i++) { |
| | | if (power[i].menuMethod == 'addManageRecordCancel') { |
| | | add = true |
| | | } |
| | | if (power[i].menuMethod == 'delManageRecordCancel') { |
| | | del = true |
| | | } |
| | | if (power[i].menuMethod == 'exportInManageRecordCancel') { |
| | | up = true |
| | | } |
| | | if (power[i].menuMethod == 'ratifyManageRecordCancel') { |
| | | ratify = true |
| | | } |
| | | if (power[i].menuMethod == 'exportOutManageRecordCancel') { |
| | | out = true |
| | | } |
| | | } |
| | | if (!ratify) { |
| | | this.componentData.do.splice(2, 1) |
| | | } |
| | | if (!add) { |
| | | this.componentData.do.splice(1, 1) |
| | | } |
| | | if (!del) { |
| | | this.componentData.do.splice(0, 1) |
| | | } |
| | | this.addPower = add |
| | | this.outPower = out |
| | | this.upPower = up |
| | | }, |
| | | openAdd(){ |
| | | // this.$refs.ValueTable.openAddDia(this.$api.manageRecordIssueRecycle.addManageRecordIssueRecycle); |
| | | this.addInfo = {} |
| | | this.title = 'æ°å¢' |
| | | this.addDialogVisible = true; |
| | | }, |
| | | handleEdit0(row){ |
| | | this.addInfo = row |
| | | this.title = 'ä¿®æ¹' |
| | | this.addDialogVisible = true; |
| | | }, |
| | | // å¯¼åº |
| | | handleDown(){ |
| | | this.outLoading = true |
| | | this.$axios.post(this.$api.manageRecordCancel.exportOutManageRecordCancel,{entity:this.componentData.entity},{headers: { 'Content-Type': 'application/json' }}).then(res => { |
| | | this.outLoading = false |
| | | if(res.code==201) return this.$message.error('导åºå¤±è´¥') |
| | | this.$message.success('å¯¼åºæå') |
| | | let url = this.javaApi+'word/'+res.message |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = 'ä½åºæä»¶éæ¯è®°å½'; |
| | | link.click(); |
| | | }) |
| | | }, |
| | | refreshTable() { |
| | | this.$refs['ValueTable'].selectList() |
| | | }, |
| | | refresh() { |
| | | this.componentData.entity = this.HaveJson(this.entityCopy) |
| | | this.upIndex++ |
| | | this.refreshTable() |
| | | }, |
| | | beforeUpload(file) { |
| | | if (file.size > 1024 * 1024 * 10) { |
| | | this.$message.error('ä¸ä¼ æä»¶ä¸è¶
è¿10M'); |
| | | this.$refs.upload.clearFiles() |
| | | return false; |
| | | } else { |
| | | // this.upLoading = true; |
| | | return true; |
| | | } |
| | | }, |
| | | onError(err, file, fileList) { |
| | | this.$message.error('ä¸ä¼ 失败') |
| | | this.$refs.upload.clearFiles() |
| | | }, |
| | | handleSuccessUp(response) { |
| | | this.upLoading = false; |
| | | if (response.code == 200) { |
| | | this.$message.success('ä¸ä¼ æå'); |
| | | this.$refs['ValueTable'].selectList() |
| | | }else{ |
| | | this.$message.error('ä¸ä¼ 失败'); |
| | | } |
| | | }, |
| | | // è·åæä»¶å表--æä»¶æ¸
å |
| | | getFileList(){ |
| | | this.$axios.post(this.$api.manageDocumentList.pageManageDocumentList,{ |
| | | entity: { |
| | | orderBy: { |
| | | field: 'createTime', |
| | | order: 'desc' |
| | | } |
| | | }, |
| | | page:{ |
| | | current:-1, |
| | | size:-1 |
| | | } |
| | | },{headers: { |
| | | 'Content-Type': 'application/json' |
| | | }}).then(res=>{ |
| | | this.fileList = res.data.body.records.map(m=>{ |
| | | m.title = m.documentCode |
| | | return m |
| | | }) |
| | | }).catch(err=>{}) |
| | | }, |
| | | handleAdd(){ |
| | | if(!this.addInfo.documentCode) return this.$message.error('请è¾å
¥æä»¶ç¼å·') |
| | | this.addLoading = true |
| | | let obj = {} |
| | | if(this.title=='æ°å¢'){ |
| | | obj = this.HaveJson(this.addInfo) |
| | | }else{ |
| | | let {id,documentCode,documentName,qty,reason,remark} = this.addInfo |
| | | obj = {id,documentCode,documentName,qty,reason,remark} |
| | | } |
| | | this.$axios.post(this.$api.manageRecordCancel[this.title=='æ°å¢'?'addManageRecordCancel':'doManageRecordCancel'], obj,{headers: { 'Content-Type': 'application/json' },noQs:true}).then(res => { |
| | | this.addLoading = false |
| | | if (res.code == 201) { |
| | | return |
| | | } |
| | | this.addDialogVisible = false |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æä½æå!' |
| | | }); |
| | | this.refreshTable() |
| | | }).catch(err => {}) |
| | | }, |
| | | getCurrentFile(e){ |
| | | let obj = this.fileList.find(m=>m.documentCode==e) |
| | | if(obj){ |
| | | this.$set(this.addInfo,'documentName',obj.name) |
| | | } |
| | | }, |
| | | getAuthorizedPerson() { |
| | | this.$axios.get(this.$api.user.getUserMenu).then(res => { |
| | | let data = [] |
| | | res.data.forEach(a => { |
| | | data.push({ |
| | | label: a.name, |
| | | value: a.id |
| | | }) |
| | | }) |
| | | // this.componentData.tagField.receiveUserName.select = data |
| | | // this.componentData.selectField.receiveUserName.select = data |
| | | this.personList = data |
| | | }) |
| | | }, |
| | | handleRatify(row){ |
| | | this.$confirm('æ¯å¦æ¹åéè¿?', 'æç¤º', { |
| | | confirmButtonText: 'éè¿', |
| | | cancelButtonText: 'ä¸éè¿', |
| | | type: 'warning', |
| | | closeOnClickModal: false, // ç¦æ¢ç¹å»é®ç½©å±å
³é |
| | | distinguishCancelAndClose: true, |
| | | beforeClose: (action, instance, done) => { |
| | | if (action === 'confirm') { |
| | | // ç¹å»âç¡®å®âæé®ï¼å
许å
³é |
| | | this.$axios.post(this.$api.manageRecordCancel.ratifyManageRecordCancel, {id:row.id,ratifyState:'éè¿'}).then(res => { |
| | | if (res.code === 201) return |
| | | this.refreshTable() |
| | | done(); |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æäº¤æå' |
| | | }) |
| | | }) |
| | | .catch(err => { |
| | | |
| | | }) |
| | | } else if (action === 'cancel') { |
| | | // ç¹å»âåæ¶âæé®ï¼ä¸å
许å
³é |
| | | this.$axios.post(this.$api.manageRecordCancel.ratifyManageRecordCancel, {id:row.id,ratifyState:'ä¸éè¿'}).then(res => { |
| | | if (res.code === 201) return |
| | | this.refreshTable() |
| | | done(); |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æäº¤æå' |
| | | }) |
| | | }) |
| | | .catch(err => { |
| | | |
| | | }) |
| | | console.log("åæ¶æé®ç¹å»äºä»¶ï¼ä¸å
³éå¼¹æ¡"); |
| | | } else if (action === 'close') { |
| | | // ç¹å»âÃâæé®ï¼ä¸å
许å
³é |
| | | done(); |
| | | console.log("Ãæé®ç¹å»äºä»¶ï¼ä¸å
³éå¼¹æ¡"); |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .title { |
| | | height: 60px; |
| | | line-height: 60px; |
| | | } |
| | | .search { |
| | | background-color: #fff; |
| | | height: 80px; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .search_thing { |
| | | width: 350px; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .search_label { |
| | | width: 110px; |
| | | font-size: 14px; |
| | | text-align: right; |
| | | } |
| | | |
| | | .search_input { |
| | | width: calc(100% - 110px); |
| | | } |
| | | |
| | | .table { |
| | | margin-top: 10px; |
| | | background-color: #fff; |
| | | width: calc(100% - 40px); |
| | | height: calc(100% - 60px - 80px - 10px - 40px); |
| | | padding: 20px; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <!-- æä»¶å®æå®¡æ¥è®°å½ --> |
| | | <div class="PeriodicDocumentReviewRecords"> |
| | | <el-row class="title"> |
| | | <el-col :span="12" style="padding-left: 20px;text-align: left;">æä»¶å®æå®¡æ¥è®°å½</el-col> |
| | | <!-- <el-col :span="12" style="text-align: right;"> |
| | | <el-button size="medium" type="primary" @click="openAdd" v-if="addPower">æ°å¢</el-button> |
| | | <el-upload :action="action" :show-file-list="false" |
| | | accept='.doc,.docx' :headers="headers" :on-change="beforeUpload" |
| | | :on-error="onError" ref='upload' v-if="upPower" :on-success="handleSuccessUp" style="display:inline-block;margin-left: 20px;"> |
| | | <el-button type="primary" size="medium">导å
¥</el-button></el-upload> |
| | | <el-button size="medium" type="primary" @click="handleDown" :loading="outLoading" v-if="outPower" style="display:inline-block;margin-left: 20px;">导åº</el-button> |
| | | </el-col> --> |
| | | </el-row> |
| | | <el-tabs type="border-card" v-model="activeName" style="height: 100%;"> |
| | | <el-tab-pane label="å¡«å" name="å¡«å" style="height: 100%;"> |
| | | <div class="search"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">æä»¶åç§°ï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable v-model="componentData.entity.documentName" |
| | | @keyup.enter.native="refreshTable()"></el-input></div> |
| | | </div> |
| | | <div class="search_thing"> |
| | | <div class="search_label">æä»¶ç¼å·ï¼</div> |
| | | <div class="search_input"> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable v-model="componentData.entity.documentCode" |
| | | @keyup.enter.native="refreshTable()"></el-input> |
| | | </div> |
| | | </div> |
| | | <div class="search_thing" style="padding-left: 30px;"> |
| | | <el-button size="small" @click="refresh()">é ç½®</el-button> |
| | | <el-button size="small" type="primary" @click="refreshTable()">æ¥ è¯¢</el-button> |
| | | </div> |
| | | <div class="btns"> |
| | | <el-button size="medium" type="primary" @click="openAdd" v-if="addPower">æ°å¢</el-button> |
| | | <el-upload :action="action" :multiple="false" |
| | | :show-file-list="false" |
| | | accept='.doc,.docx' :headers="headers" :on-change="beforeUpload" |
| | | :on-error="onError" ref='upload' v-if="upPower" :on-success="handleSuccessUp" style="display:inline-block;margin-left: 20px;"> |
| | | <el-button type="primary" size="medium">导å
¥</el-button></el-upload> |
| | | </div> |
| | | </div> |
| | | <div class="table"> |
| | | <ValueTable ref="ValueTable" :url="$api.manageRecordIntervals.pageManageRecordIntervals" |
| | | :delUrl="$api.manageRecordIntervals.delManageRecordIntervals" |
| | | :componentData="componentData" :upUrl="$api.manageRecordIssueRecycle.doManageRecordIssueRecycle" :key="upIndex"/> |
| | | </div> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="åå²è®°å½" name="åå²è®°å½" style="height: 100%;"> |
| | | <div class="search"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">å¹´ï¼</div> |
| | | <div class="search_input"> |
| | | <el-date-picker |
| | | v-model="componentData0.entity.year" |
| | | type="year" |
| | | placeholder="鿩年" format="yyyy" |
| | | value-format="yyyy" size="small" @change="refreshTable()"> |
| | | </el-date-picker> |
| | | </div> |
| | | </div> |
| | | <div class="search_thing" style="padding-left: 30px;"> |
| | | <el-button size="small" @click="refresh(1)">é ç½®</el-button> |
| | | <el-button size="small" type="primary" @click="refreshTable(1)">æ¥ è¯¢</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="table"> |
| | | <ValueTable ref="ValueTable0" :url="$api.manageRecordIntervals.pageManageRecordIntervalsTotal" |
| | | :componentData="componentData0" :key="upIndex"/> |
| | | </div> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | <el-dialog |
| | | :title="title" |
| | | :visible.sync="addDialogVisible" |
| | | width="400px" top="6vh"> |
| | | <el-row> |
| | | <el-col :span="24" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label"><span style="color: red;margin-left: 4px;">* </span>æä»¶ç¼å·ï¼</div> |
| | | <div class="search_input"> |
| | | <el-select v-model="addInfo.documentCode" size="small" style="width: 100%;" @change="getCurrentFile" allow-create clearable filterable> |
| | | <el-option |
| | | v-for="item in fileList" |
| | | :key="item.documentCode" |
| | | :label="item.title" |
| | | :value="item.documentCode"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="24" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">æä»¶åç§°ï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable v-model="addInfo.documentName"></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="24" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">çæ¬å·ï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable v-model="addInfo.documentVersion"></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="24" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">修订å·ï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable v-model="addInfo.revision"></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="24" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">é宿§ï¼</div> |
| | | <div class="search_input"> |
| | | <el-select v-model="addInfo.suitability" placeholder="è¯·éæ©" size="small" style="width: 100%;"> |
| | | <el-option |
| | | v-for="item in typeList" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="24" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">夿³¨ï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable v-model="addInfo.remark" type="textarea" |
| | | :rows="2"></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="addDialogVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="handleAdd" :loading="addLoading">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <!-- 详æ
/å®¡æ ¸ --> |
| | | <el-dialog |
| | | :title="title0" |
| | | :visible.sync="lookDialogVisible" |
| | | width="800px" top="5vh"> |
| | | <filePreview v-if="lookDialogVisible" :fileUrl="javaApi+'/word/'+currentInfo.url" |
| | | :currentFile="{}" style="max-height: 70vh;overflow-y: auto;"/> |
| | | <span slot="footer" class="dialog-footer" v-if="title0=='å®¡æ ¸'||title0=='æ¹å'"> |
| | | <el-button @click="submitCheck('ä¸éè¿')" :loading="noCheckLoading">ä¸éè¿</el-button> |
| | | <el-button type="primary" @click="submitCheck('éè¿')" :loading="checkLoading">é è¿</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import ValueTable from '../tool/value-table.vue' |
| | | import filePreview from '../tool/file-preview.vue' |
| | | export default { |
| | | components: { |
| | | ValueTable, |
| | | filePreview |
| | | }, |
| | | data() { |
| | | return { |
| | | activeName:'å¡«å', |
| | | title0:'æ°å¢', |
| | | addPower:true, |
| | | outPower:true, |
| | | upPower:true, |
| | | outLoading:false, |
| | | addLoading:false, |
| | | lookDialogVisible:false, |
| | | noCheckLoading:false, |
| | | checkLoading:false, |
| | | componentData: { |
| | | entity: { |
| | | documentName: null, |
| | | documentCode: null, |
| | | orderBy: { |
| | | field: 'id', |
| | | order: 'desc' |
| | | } |
| | | }, |
| | | isIndex: true, |
| | | showSelect: false, |
| | | select: false, |
| | | // selectMethod: 'handleChangeTask', |
| | | do: [{ |
| | | id: 'delete', |
| | | font: 'å é¤', |
| | | type: 'text', |
| | | method: 'doDiy', |
| | | }, { |
| | | id: 'handleEdit', |
| | | font: 'ä¿®æ¹', |
| | | type: 'text', |
| | | method: 'handleEdit', |
| | | field:[], |
| | | }], |
| | | tagField: { |
| | | // documentType:{ |
| | | // select: [] |
| | | // }, |
| | | // receiveUserName:{ |
| | | // select: [] |
| | | // }, |
| | | }, |
| | | selectField: { |
| | | // documentType:{ |
| | | // select: [] |
| | | // }, |
| | | // receiveUserName:{ |
| | | // select: [] |
| | | // }, |
| | | }, |
| | | addUpload:['signatoryUrl'], |
| | | requiredAdd: [], |
| | | requiredUp: [], |
| | | datePicker:['receiveDate'], |
| | | noHead:['signedUserName','signedDate','departLims'],//ä¸å䏿°å¢ç¼è¾çåæ®µ |
| | | needSort: [], |
| | | inputType:'' |
| | | }, |
| | | componentData0: { |
| | | entity: { |
| | | year: null, |
| | | orderBy: { |
| | | field: 'id', |
| | | order: 'desc' |
| | | } |
| | | }, |
| | | isIndex: true, |
| | | showSelect: false, |
| | | select: false, |
| | | do: [{ |
| | | id: 'handleLook', |
| | | font: 'æ¥ç', |
| | | type: 'text', |
| | | method: 'handleLook', |
| | | disabFun: (row, index) => { |
| | | return !row.url |
| | | } |
| | | }, { |
| | | id: 'handleDown0', |
| | | font: 'ä¸è½½', |
| | | type: 'text', |
| | | method: 'handleDown0', |
| | | disabFun: (row, index) => { |
| | | return !row.url |
| | | } |
| | | }, |
| | | { |
| | | id: 'handleSubmit', |
| | | font: 'æäº¤', |
| | | type: 'text', |
| | | method: 'handleSubmit', |
| | | disabFun: (row, index) => { |
| | | return !!row.submitUserName |
| | | } |
| | | },{ |
| | | id: 'handleApproval', |
| | | font: 'æ¹å', |
| | | type: 'text', |
| | | method: 'handleApproval', |
| | | disabFun: (row, index) => { |
| | | return !row.submitUserName||!!row.ratifyUserName |
| | | } |
| | | }], |
| | | tagField: {}, |
| | | selectField: {}, |
| | | requiredAdd: [], |
| | | requiredUp: [], |
| | | needSort: [], |
| | | inputType:'' |
| | | }, |
| | | entityCopy: {}, |
| | | entityCopy0: {}, |
| | | upIndex: 0, |
| | | addInfo:{}, |
| | | title:'æ°å¢', |
| | | addInfo:{}, |
| | | addDialogVisible:false, |
| | | fileList:[], |
| | | typeList:[], |
| | | currentInfo:{}, |
| | | } |
| | | }, |
| | | // ç¨äºä¸ä¼ æä»¶çä¿¡æ¯ |
| | | computed: { |
| | | headers() { |
| | | return { |
| | | 'token': sessionStorage.getItem('token') |
| | | } |
| | | }, |
| | | action() { |
| | | return this.javaApi +this.$api.manageRecordIntervals.exportInManageRecordIntervals |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.entityCopy = this.HaveJson(this.componentData.entity); |
| | | this.entityCopy0 = this.HaveJson(this.componentData0.entity); |
| | | this.getPower() |
| | | this.getFileList() |
| | | this.selectEnumByCategory() |
| | | }, |
| | | methods:{ |
| | | getPower(){ |
| | | let power = JSON.parse(sessionStorage.getItem('power')) |
| | | let add = false |
| | | let del = false |
| | | let up = false; |
| | | let out = false; |
| | | let submit = false |
| | | let ratify = false |
| | | for (var i = 0; i < power.length; i++) { |
| | | if (power[i].menuMethod == 'addManageRecordIntervals') { |
| | | add = true |
| | | } |
| | | if (power[i].menuMethod == 'delManageRecordIntervals') { |
| | | del = true |
| | | } |
| | | if (power[i].menuMethod == 'exportInManageRecordIntervals') { |
| | | up = true |
| | | } |
| | | if (power[i].menuMethod == 'exportOutManageRecordIntervals') { |
| | | out = true |
| | | } |
| | | if (power[i].menuMethod == 'submitManageRecordIntervalsTotal') { |
| | | submit = true |
| | | } |
| | | if (power[i].menuMethod == 'ratifyManageRecordIntervalsTotal') { |
| | | ratify = true |
| | | } |
| | | } |
| | | if (!ratify) { |
| | | this.componentData0.do.splice(3, 1) |
| | | } |
| | | if (!submit) { |
| | | this.componentData0.do.splice(2, 1) |
| | | } |
| | | if (!add) { |
| | | this.componentData.do.splice(1, 1) |
| | | } |
| | | if (!del) { |
| | | this.componentData.do.splice(0, 1) |
| | | } |
| | | this.addPower = add |
| | | this.outPower = out |
| | | this.upPower = up |
| | | }, |
| | | // æ°å¢ |
| | | openAdd(){ |
| | | // this.$refs.ValueTable.openAddDia(this.$api.manageRecordIssueRecycle.addManageRecordIssueRecycle); |
| | | this.addInfo = {} |
| | | this.title = 'æ°å¢' |
| | | this.addDialogVisible = true; |
| | | }, |
| | | // å¯¼åº |
| | | handleDown(){ |
| | | this.outLoading = true |
| | | this.$axios.post(this.$api.manageRecordIntervals.exportOutManageRecordIntervals,{entity:this.componentData.entity},{headers: { 'Content-Type': 'application/json' }}).then(res => { |
| | | this.outLoading = false |
| | | if(res.code==201) return this.$message.error('导åºå¤±è´¥') |
| | | this.$message.success('å¯¼åºæå') |
| | | let url = this.javaApi+'word/'+res.message |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = 'æä»¶å®æå®¡æ¥è®°å½'; |
| | | link.click(); |
| | | }) |
| | | }, |
| | | refreshTable(num) { |
| | | if(num){ |
| | | this.$refs['ValueTable0'].selectList() |
| | | }else{ |
| | | this.$refs['ValueTable'].selectList() |
| | | } |
| | | }, |
| | | refresh(num) { |
| | | if(num){ |
| | | this.componentData0.entity = this.HaveJson(this.entityCopy0) |
| | | this.upIndex++ |
| | | }else{ |
| | | this.componentData.entity = this.HaveJson(this.entityCopy) |
| | | this.upIndex++ |
| | | } |
| | | }, |
| | | beforeUpload(file) { |
| | | if (file.size > 1024 * 1024 * 10) { |
| | | this.$message.error('ä¸ä¼ æä»¶ä¸è¶
è¿10M'); |
| | | this.$refs.upload.clearFiles() |
| | | return false; |
| | | } else { |
| | | // this.upLoading = true; |
| | | return true; |
| | | } |
| | | }, |
| | | onError(err, file, fileList) { |
| | | this.$message.error('ä¸ä¼ 失败') |
| | | this.$refs.upload.clearFiles() |
| | | }, |
| | | handleSuccessUp(response) { |
| | | this.upLoading = false; |
| | | if (response.code == 200) { |
| | | this.$message.success('ä¸ä¼ æå'); |
| | | this.$refs['ValueTable'].selectList() |
| | | }else{ |
| | | this.$message.error('ä¸ä¼ 失败'); |
| | | } |
| | | }, |
| | | getCurrentFile(e){ |
| | | let obj = this.fileList.find(m=>m.documentCode==e) |
| | | if(obj){ |
| | | this.$set(this.addInfo,'documentName',obj.name) |
| | | this.$set(this.addInfo,'documentVersion',obj.version) |
| | | // this.addInfo.documentName = obj.name |
| | | // this.addInfo.documentVersion = obj.version |
| | | } |
| | | }, |
| | | // è·åæä»¶å表--æä»¶æ¸
å |
| | | getFileList(){ |
| | | this.$axios.post(this.$api.manageDocumentList.pageManageDocumentList,{ |
| | | entity: { |
| | | orderBy: { |
| | | field: 'id', |
| | | order: 'asc' |
| | | } |
| | | }, |
| | | page:{ |
| | | current:-1, |
| | | size:-1 |
| | | } |
| | | },{headers: { |
| | | 'Content-Type': 'application/json' |
| | | }}).then(res=>{ |
| | | this.fileList = res.data.body.records.map(m=>{ |
| | | m.title = m.documentCode |
| | | return m |
| | | }) |
| | | }).catch(err=>{}) |
| | | }, |
| | | selectEnumByCategory() { |
| | | this.$axios.post(this.$api.enums.selectEnumByCategory, { |
| | | category: "é宿§" |
| | | }).then(res => { |
| | | this.typeList = res.data |
| | | }) |
| | | }, |
| | | // æäº¤ |
| | | handleAdd(){ |
| | | if(!this.addInfo.documentCode) return this.$message.error('请è¾å
¥æä»¶ç¼å·') |
| | | this.addLoading = true |
| | | let obj = {} |
| | | if(this.title=='æ°å¢'){ |
| | | obj = this.HaveJson(this.addInfo) |
| | | }else{ |
| | | let {id,documentCode,documentName,documentVersion,revision,suitability,remark} = this.addInfo |
| | | obj = {id,documentCode,documentName,documentVersion,revision,suitability,remark} |
| | | } |
| | | this.$axios.post(this.$api.manageRecordIntervals[this.title=='æ°å¢'?'addManageRecordIntervals':'doManageRecordIntervals'], obj,{headers: { 'Content-Type': 'application/json' },noQs:true}).then(res => { |
| | | this.addLoading = false |
| | | if (res.code == 201) { |
| | | return |
| | | } |
| | | this.addDialogVisible = false |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æä½æå!' |
| | | }); |
| | | this.refreshTable() |
| | | }).catch(err => {}) |
| | | }, |
| | | // ä¿®æ¹ |
| | | handleEdit(row){ |
| | | this.addInfo = row |
| | | this.title = 'ç¼è¾' |
| | | this.addDialogVisible = true; |
| | | }, |
| | | submitCheck(state){ |
| | | if(state=='éè¿'){ |
| | | this.checkLoading = true |
| | | }else{ |
| | | this.noCheckLoading = true |
| | | } |
| | | this.$axios.post(this.$api.manageRecordIntervals.ratifyManageRecordIntervalsTotal,{ |
| | | id:this.currentInfo.id, |
| | | ratifyState:state |
| | | }).then(res=>{ |
| | | this.checkLoading = false |
| | | if(res.code==201){ |
| | | return |
| | | } |
| | | this.noCheckLoading = false |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æä½æå!' |
| | | }); |
| | | this.$refs['ValueTable0'].selectList() |
| | | this.lookDialogVisible = false |
| | | }).catch(err=>{}); |
| | | }, |
| | | // æ¥ç |
| | | handleLook(row){ |
| | | this.title0 = 'æ¥ç' |
| | | this.commonFun(row) |
| | | }, |
| | | commonFun(row,callbanck){ |
| | | this.currentInfo = row |
| | | this.lookDialogVisible = true |
| | | if(callbanck){ |
| | | callbanck() |
| | | } |
| | | }, |
| | | handleDown0(row){ |
| | | let url = this.javaApi+'word/'+row.url |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = row.month+' æææä»¶å®ææ£æ¥è®°å½'; |
| | | link.click(); |
| | | }, |
| | | // æäº¤ |
| | | handleSubmit(row){ |
| | | this.$confirm('æ¯å¦æäº¤ '+row.year+' å¹´çæ°æ®', 'æäº¤', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.$axios.post(this.$api.manageRecordIntervals.submitManageRecordIntervalsTotal,{ |
| | | id:row.id |
| | | }).then(res=>{ |
| | | if (res.code === 201) return |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æäº¤æå!' |
| | | }); |
| | | this.$refs['ValueTable0'].selectList() |
| | | }).catch(err=>{}); |
| | | }) |
| | | }, |
| | | // æ¹å |
| | | handleApproval(row){ |
| | | this.title0 = 'æ¹å' |
| | | this.commonFun(row) |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .title { |
| | | height: 60px; |
| | | line-height: 60px; |
| | | } |
| | | .search { |
| | | background-color: #fff; |
| | | height: 40px; |
| | | display: flex; |
| | | align-items: center; |
| | | position: relative; |
| | | } |
| | | |
| | | .search_thing { |
| | | width: 350px; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .search_label { |
| | | width: 110px; |
| | | font-size: 14px; |
| | | text-align: right; |
| | | } |
| | | |
| | | .search_input { |
| | | width: calc(100% - 110px); |
| | | } |
| | | |
| | | .table { |
| | | margin-top: 10px; |
| | | background-color: #fff; |
| | | width: calc(100% - 40px); |
| | | height: calc(100% - 60px - 140px); |
| | | padding: 20px; |
| | | } |
| | | >>>.el-tabs__content{ |
| | | height: 100%; |
| | | } |
| | | .btns{ |
| | | position: absolute; |
| | | right: 20px; |
| | | top: 5px; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import html2canvas from "html2canvas"; |
| | | import jsPDF from "jspdf"; |
| | | |
| | | export async function exportHtmlToPDF(element,name='exported') { |
| | | try { |
| | | // å° HTML å
ç´ è½¬æ¢ä¸º canvas |
| | | console.log("æ£å¨å° HTML 转æ¢ä¸º canvas...",element); |
| | | const canvas = await html2canvas(element,{useCORS: true}); |
| | | const imgData = canvas.toDataURL("image/png"); |
| | | |
| | | // å建 PDF |
| | | const pdf = new jsPDF("p", "mm", "a4"); |
| | | const pdfWidth = pdf.internal.pageSize.getWidth(); |
| | | const pdfHeight = (canvas.height * pdfWidth) / canvas.width; |
| | | |
| | | pdf.addImage(imgData, "PNG", 10, 10, pdfWidth-20, pdfHeight-20); |
| | | pdf.save(name+".pdf"); |
| | | console.log("PDF å¯¼åºæåï¼"); |
| | | } catch (error) { |
| | | console.error("å¯¼åº PDF 失败ï¼", error); |
| | | } |
| | | } |