| | |
| | | manageRecordCancel, |
| | | manageRecordAudit, |
| | | personnel, |
| | | clientSatisfaction, |
| | | } |
| | | } |
| | | |
| | |
| | | const personnel = { |
| | | selectCNSAPersonTree: '/personBasicInfo/selectCNSAPersonTree', // æ¥è¯¢CNAS人åä¾§è¾¹æ |
| | | } |
| | | |
| | | // 8.3 å®¢æ·æ»¡æåº¦è°æ¥ |
| | | const clientSatisfaction = { |
| | | pageClientSatisfaction:'/clientSatisfaction/pageClientSatisfaction', // å®¢æ·æ»¡æåº¦è°æ¥å表 |
| | | addClientSatisfaction:'/clientSatisfaction/addClientSatisfaction', // æ°å¢å®¢æ·æ»¡æåº¦è°æ¥ |
| | | updateClientSatisfaction:'/clientSatisfaction/updateClientSatisfaction', // ä¿®æ¹æ°å¢å®¢æ·æ»¡æåº¦è°æ¥ |
| | | delClientSatisfaction:'/clientSatisfaction/delClientSatisfaction', // å 餿°å¢å®¢æ·æ»¡æåº¦è°æ¥ |
| | | pageAnalyseFile:'/clientSatisfaction/pageAnalyseFile', // æ¥è¯¢å®¢æ·åæéä»¶ |
| | | uploadAnalyseFile:'/clientSatisfaction/uploadAnalyseFile', // æ°å¢å®¢æ·åæéä»¶ |
| | | delAnalyseFile:'/clientSatisfaction/delAnalyseFile', // å é¤å®¢æ·åæéä»¶ |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="table_card"> |
| | | <div v-if="showTitle" class="title"> |
| | | <span style="font-weight: bold">{{ title }}</span> |
| | | </div> |
| | | <div v-if="showForm" class="table_card_form"> |
| | | <slot name="form"></slot> |
| | | </div> |
| | | <div> |
| | | <slot name="table"></slot> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | <script> |
| | | export default { |
| | | props: { |
| | | title: { |
| | | type: String, |
| | | default: 'æ é¢' |
| | | }, |
| | | showTitle: { |
| | | type: Boolean, |
| | | default: true |
| | | }, |
| | | showForm: { |
| | | type: Boolean, |
| | | default: true |
| | | } |
| | | }, |
| | | data() { |
| | | return {}; |
| | | } |
| | | }; |
| | | </script> |
| | | <style scoped> |
| | | .table_card { |
| | | text-align: left; |
| | | } |
| | | |
| | | .title { |
| | | position: relative; |
| | | font-size: 18px; |
| | | color: #333; |
| | | font-weight: 400; |
| | | padding-left: 10px; |
| | | margin-left: 15px; |
| | | } |
| | | |
| | | .title::before { |
| | | position: absolute; |
| | | left: 0; |
| | | top: 4px; |
| | | content: ''; |
| | | width: 4px; |
| | | height: 18px; |
| | | background-color: #3A7BFA; |
| | | border-radius: 2px; |
| | | } |
| | | |
| | | .table_card_form { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | height: 34px; |
| | | padding: 0 15px; |
| | | margin-bottom: 10px; |
| | | } |
| | | |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!-- |
| | | * @FileDescription: è¡¨æ ¼ç»ä»¶ |
| | | * @Author: æ¹ç¿ |
| | | * @Date: 2024/09/29 |
| | | * @LastEditors: licp lichunping@guanfang.com.cn |
| | | * @LastEditTime: 2024-12-03 11:05:06 |
| | | --> |
| | | <template> |
| | | <div> |
| | | <!-- è¡¨æ ¼ --> |
| | | <el-table |
| | | ref="multipleTable" |
| | | v-loading="tableLoading" |
| | | :border="border" |
| | | :data="tableData" |
| | | :header-cell-style="{ background: '#0e3372', color: '#cccccc' }" |
| | | :height="height" |
| | | :highlight-current-row="highlightCurrentRow" |
| | | :row-class-name="rowClassName" |
| | | :row-style="rowStyle" |
| | | :row-key="rowKey" |
| | | stripe |
| | | style="width: 100%; " |
| | | tooltip-effect="dark" |
| | | @row-click="rowClick" |
| | | @current-change="currentChange" |
| | | @selection-change="handleSelectionChange" |
| | | > |
| | | <template v-if="isSelection"> |
| | | <el-table-column type="selection" width="55" /> |
| | | </template> |
| | | <template> |
| | | <el-table-column align="center" label="åºå·" type="index" width="60" /> |
| | | </template> |
| | | |
| | | <template v-for="(item, index) in column"> |
| | | <el-table-column :column-key="item.columnKey" :filter-method="item.filterHandler" |
| | | :filter-multiple="item.filterMultiple" :filtered-value="item.filteredValue" |
| | | :filters="item.filters" :fixed="item.fixed" :label="item.label" |
| | | :min-width="item.minWidth" :prop="item.prop" |
| | | :show-overflow-tooltip="item.showOverflowTooltip" |
| | | :sortable="item.sortable ? true : false" :type="item.type" :width="item.width" |
| | | align="center"> |
| | | |
| | | <!-- <div class="123" v-if="item.type == ''"> --> |
| | | <template v-if="item.hasOwnProperty('colunmTemplate')" :slot="item.colunmTemplate" |
| | | slot-scope="scope"> |
| | | <slot v-if="item.theadSlot" :index="index" :name="item.theadSlot" :row="scope.row" /> |
| | | </template> |
| | | |
| | | <template slot-scope="scope"> |
| | | <!-- ææ§½ --> |
| | | <div v-if="item.dataType == 'slot'"> |
| | | <slot v-if="item.slot" :index="scope.$index" :name="item.slot" :row="scope.row" /> |
| | | </div> |
| | | |
| | | |
| | | <!-- è¿åº¦æ¡ --> |
| | | <div v-else-if="item.dataType == 'progress'"> |
| | | <el-progress :percentage="Number(scope.row[item.prop])" /> |
| | | </div> |
| | | |
| | | <!-- tag --> |
| | | <div v-else-if="item.dataType == 'tag'"> |
| | | <el-tag v-if="typeof dataTypeFn(scope.row[item.prop], item.formatData) == 'string'" |
| | | :title="scope.row[item.prop] | formatters(item.formatData)" |
| | | :type="formatType(scope.row[item.prop], item.formatType)">{{ scope.row[item.prop] | formatters(item.formatData) }}</el-tag> |
| | | <el-tag v-for="(tag, index) in dataTypeFn(scope.row[item.prop], item.formatData)" |
| | | v-else-if="typeof dataTypeFn(scope.row[item.prop], item.formatData) == 'object'" |
| | | :key="index" :title="scope.row[item.prop] | formatters(item.formatData)" |
| | | :type="formatType(tag, item.formatType)">{{ item.tagGroup ? tag[item.tagGroup.label] ? tag[item.tagGroup.label] : tag : tag }}</el-tag> |
| | | <el-tag v-else :title="scope.row[item.prop] | formatters(item.formatData)" |
| | | :type="formatType(scope.row[item.prop], item.formatType)">{{ scope.row[item.prop] | formatters(item.formatData) }}</el-tag> |
| | | </div> |
| | | |
| | | <!-- æé® --> |
| | | <div v-else-if="item.dataType == 'action'"> |
| | | <template v-for="(o, key) in item.operation"> |
| | | <el-button |
| | | v-if="o.type!='upload'" |
| | | v-show="o.showHide ? o.showHide(scope.row) : true" |
| | | :disabled="o.disabled ? o.disabled(scope.row) : false" |
| | | :icon="o.icon | iconFn(scope.row)" |
| | | :plain="o.plain" :size="o.size" |
| | | :style="{ 'color': o.color }" |
| | | :type="o.type | typeFn(scope.row)" |
| | | @click="o.clickFun(scope.row)"> |
| | | {{ o.name }} |
| | | </el-button> |
| | | <el-upload |
| | | action="#" |
| | | :on-change="(file, fileList)=>o.clickFun(scope.row,file, fileList)" |
| | | :multiple="o.multiple?o.multiple:false" |
| | | :limit="o.limit?o.limit:1" |
| | | :disabled="o.disabled ? o.disabled(scope.row) : false" |
| | | :accept="o.accept?o.accept:'.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar'" |
| | | v-if="o.type=='upload'" style="display: inline-block;width: 50px;" |
| | | v-show="o.showHide ? o.showHide(scope.row) : true" |
| | | :auto-upload="false" |
| | | :on-exceed="onExceed" |
| | | :show-file-list="false"> |
| | | <el-button :size="o.size?o.size:'small'" type="text" :disabled="o.disabled ? o.disabled(scope.row) : false">{{o.name}}</el-button> |
| | | </el-upload> |
| | | </template> |
| | | </div> |
| | | |
| | | <!-- --> |
| | | |
| | | <!-- é»è®¤çº¯å±ç¤ºæ°æ® --> |
| | | <div v-else> |
| | | <span v-if="!item.formatData">{{ scope.row[item.prop] }}</span> |
| | | <span v-else>{{ scope.row[item.prop] | formatters(item.formatData) }}</span> |
| | | </div> |
| | | |
| | | </template> |
| | | |
| | | <!-- </div> --> |
| | | |
| | | </el-table-column> |
| | | </template> |
| | | </el-table> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | // 注ï¼ä»¥ä¸æ¯ææé
置项ï¼å
¶ä¸æå¸¸ä½¿ç¨çå°±æ¯labelãwidthãpropãdataTypeãslot |
| | | // label ï¼ååï¼å°±æ¯è¡¨å¤´ä¸çæ ç¾å«ä»ä¹äºä»ä¹ï¼ç±»å string |
| | | // widthï¼è¯¥åå®½åº¦ï¼ string |
| | | // propï¼ tableç»å®æ°æ®å段 string,è¿ä¸åè¦å±ç¤ºåªä¸ªtableDataéé¢çåæ®µå°±ååªä¸ªå段 |
| | | // dataTypeï¼ å
ç½®å¤ä¸ªåºæ¬çelementç»ä»¶å¯ä¾ç´æ¥ä½¿ç¨ string |
| | | // slot å½`dataType`为`slot`æ¶å¿
另忰ï¼åæ°å¼ä¸ºææ§½ç `slot` å¼ stringï¼å
·ä½ä½¿ç¨æ¹æ³è¯·çä¸é¢ç第4ç¹slotææ§½çä½¿ç¨ |
| | | // fixedï¼åæ¯å¦åºå®å¨å·¦ä¾§æè
å³ä¾§ï¼true 表示åºå®å¨å·¦ä¾§ string, boolean |
| | | // sortable 对åºåæ¯å¦å¯ä»¥æåº boolean, string |
| | | // filters æ°æ®è¿æ»¤çéé¡¹ï¼æ°ç»æ ¼å¼ï¼æ°ç»ä¸çå
ç´ éè¦æ text å value 屿§ãArray |
| | | // columnKey ï¼column ç keyï¼å¦æéè¦ä½¿ç¨ filter-change äºä»¶ï¼åéè¦æ¤å±æ§æ è¯æ¯åªä¸ª column çç鿡件 |
| | | // filteredValue éä¸çæ°æ®è¿æ»¤é¡¹ï¼å¦æéè¦èªå®ä¹è¡¨å¤´è¿æ»¤çæ¸²ææ¹å¼ï¼å¯è½ä¼éè¦æ¤å±æ§ã |
| | | // filterMultiple æ°æ®è¿æ»¤çé项æ¯å¦å¤é |
| | | // minWidth 对åºåçæå°å®½åº¦ï¼ä¸ width çåºå«æ¯ width æ¯åºå®çï¼min-width 伿å©ä½å®½åº¦ææ¯ä¾åé
ç»è®¾ç½®äº min-width çå string |
| | | // formatData å¯¹æ°æ®è¿è¡æ°æ®å¤çï¼æ¥åä¸ä¸ªåè°å½æ° (params?: {prop}) => {} |
| | | // formatType å½ `dataType`为 `tag`æ¶ï¼å¯¹æ ç¾é¢è²è®¾ç½® (params?: {prop}) => { return 'danger'| 'success'... }` |
| | | // operation å½ `dataType` 为 `option`æ¶ï¼å¯¹æé®ç é
ç½®ï¼å
·ä½é
置项以ä¸å¾ä¸ºåobject |
| | | // tagGroup å½ `dataType`为 `tag`æ¶ï¼ç»å®æ°æ®éåæ®µæ¾ç¤ºåç§° object |
| | | /** |
| | | * ææ§½çä½¿ç¨æ¹æ³: |
| | | */ |
| | | /* <div |
| | | slot="protocolSlot" |
| | | slot-scope="scope" |
| | | > |
| | | <span>{{ scope.row.protocol }}</span> |
| | | </div> |
| | | */ |
| | | /** |
| | | * 使ç¨formatDataè¿è¡æ°æ®å¤ç |
| | | */ |
| | | // { |
| | | // type: '', |
| | | // label: 'å¯ç¨ç¶æ', |
| | | // prop: 'is_active', |
| | | // formatData: (item) => { |
| | | // const str = item == true ? 'å·²å¯ç¨' : 'æªå¯ç¨' |
| | | // return str |
| | | // } |
| | | // }, |
| | | /** |
| | | * operationé
ç½® |
| | | */ |
| | | // operationé
ç½®ä¸»è¦æ¯æ¥ç¨äºè¡¨æ ¼éé¢çæä½é£ä¸åï¼é叏就伿å¾å¤æé®ï¼æä»¥ä¸åæ°ï¼ |
| | | // nameï¼æé®åç§°ï¼string |
| | | // typeï¼æé®ç±»åï¼`string` | `danger | success`ï¼ä»¥elementUi åæ°ä¸ºå |
| | | // sizeï¼æé®å¤§å°ï¼ä»¥elementUi åæ°ä¸ºå |
| | | // iconï¼æé®ä¸çiconï¼ä»¥elementUi åæ°ä¸ºå |
| | | // plainï¼æelementUi ææ¡£ä¸ºå |
| | | // clickFunï¼æé®çåè°å½æ° |
| | | export default { |
| | | name: 'ZTTable', |
| | | filters: { |
| | | iconFn(val, row) { |
| | | if (typeof (val) === 'function') { |
| | | return val(row); |
| | | } else return val; |
| | | }, |
| | | typeFn(val, row) { |
| | | // console.log(val, row, '11111111'); |
| | | if (typeof (val) === 'function') { |
| | | return val(row); |
| | | } else return val; |
| | | }, |
| | | describeConts(val, describeCont) { |
| | | if (typeof (describeCont) === 'function') { |
| | | return describeCont(val); |
| | | } else return val; |
| | | }, |
| | | formatters(val, format) { |
| | | if (typeof (format) === 'function') { |
| | | return format(val); |
| | | } else return val; |
| | | } |
| | | }, |
| | | props: { |
| | | isSelection: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | height: { |
| | | type: String, |
| | | default: null |
| | | }, |
| | | tableLoading: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | handleSelectionChange: { |
| | | type: Function, |
| | | default: () => { |
| | | return () => { |
| | | }; |
| | | } |
| | | }, |
| | | rowClick: { |
| | | type: Function, |
| | | default: () => { |
| | | return () => { |
| | | }; |
| | | } |
| | | }, |
| | | currentChange: { |
| | | type: Function, |
| | | default: () => { |
| | | return () => { |
| | | }; |
| | | } |
| | | }, |
| | | border: { |
| | | type: Boolean, |
| | | default: true |
| | | }, |
| | | highlightCurrentRow: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | headerCellStyle: { |
| | | type: Object, |
| | | default: () => { |
| | | return {}; |
| | | } |
| | | }, |
| | | column: { |
| | | type: Array, |
| | | default() { |
| | | return []; |
| | | } |
| | | }, |
| | | rowClassName: { |
| | | type: Function, |
| | | default: () => { |
| | | |
| | | } |
| | | }, |
| | | rowStyle: { |
| | | type: Function, |
| | | default: () => { |
| | | |
| | | } |
| | | }, |
| | | tableData: { |
| | | type: Array, |
| | | default() { |
| | | return []; |
| | | } |
| | | }, |
| | | rowKey: { |
| | | type: String, |
| | | default: undefined |
| | | } |
| | | }, |
| | | |
| | | methods: { |
| | | formatType(val, format) { |
| | | if (typeof (format) === 'function') { |
| | | return format(val); |
| | | } else return ''; |
| | | }, |
| | | dataTypeFn(val, format) { |
| | | if (typeof (format) === 'function') { |
| | | return format(val); |
| | | } else return val; |
| | | }, |
| | | setCurrent(row) { |
| | | this.$refs.multipleTable.setCurrentRow(); |
| | | }, |
| | | onExceed(){ |
| | | this.$message.warning('è¶
åºæä»¶ä¸ªæ°'); |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .el-table >>> .el-table__empty-text { |
| | | text-align: center |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" |
| | | :visible.sync="formDia" |
| | | title="å®¢æ·æ»¡æåº¦è°æ¥è¡¨" |
| | | width="70%" |
| | | @close="closeFormDia"> |
| | | <table border="1" cellspacing="10" class="tables"> |
| | | <tr> |
| | | <td class="td-title"> |
| | | <p>åä½åç§°ï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="2"> |
| | | <el-input v-model="form.unitName" |
| | | placeholder="请è¾å
¥å
容" |
| | | size="small"> |
| | | </el-input> |
| | | </td> |
| | | <td class="td-title"> |
| | | <p>æ¥æï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="2"> |
| | | <el-date-picker |
| | | v-model="form.fillDate" |
| | | format="yyyy-MM-dd" |
| | | placeholder="éæ©æ¥æ" |
| | | size="small" |
| | | type="date" |
| | | value-format="yyyy-MM-dd"> |
| | | </el-date-picker> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="td-title"> |
| | | <p>å§åï¼</p> |
| | | </td> |
| | | <td class="td-info"> |
| | | <el-input v-model="form.userName" |
| | | placeholder="请è¾å
¥å
容" |
| | | size="small"> |
| | | </el-input> |
| | | </td> |
| | | <td class="td-title"> |
| | | <p>é¨é¨ï¼</p> |
| | | </td> |
| | | <td class="td-info"> |
| | | <el-input v-model="form.department" |
| | | placeholder="请è¾å
¥å
容" |
| | | size="small"> |
| | | </el-input> |
| | | </td> |
| | | <td class="td-title"> |
| | | <p>èç³»çµè¯ï¼</p> |
| | | </td> |
| | | <td class="td-info"> |
| | | <el-input v-model="form.contactNumber" |
| | | placeholder="请è¾å
¥å
容" |
| | | size="small"> |
| | | </el-input> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="td-title"> |
| | | <p>æå¡æåº¦ï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="2"> |
| | | <el-radio-group v-model="form.serviceAttitude" v-removeAriaHidden> |
| | | <el-radio :label="0">满æ</el-radio> |
| | | <el-radio :label="1">ä¸è¬</el-radio> |
| | | <el-radio :label="2">䏿»¡æ</el-radio> |
| | | </el-radio-group> |
| | | </td> |
| | | <td class="td-title"> |
| | | <p>建议ï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="2"> |
| | | <el-input v-model="form.serviceAttitudeSuggestion" |
| | | placeholder="请è¾å
¥å
容" |
| | | size="small"> |
| | | </el-input> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="td-title"> |
| | | <p>ææ¯è½åï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="2"> |
| | | <el-radio-group v-model="form.technicalCompetence" v-removeAriaHidden> |
| | | <el-radio :label="0">满æ</el-radio> |
| | | <el-radio :label="1">ä¸è¬</el-radio> |
| | | <el-radio :label="2">䏿»¡æ</el-radio> |
| | | </el-radio-group> |
| | | </td> |
| | | <td class="td-title"> |
| | | <p>建议ï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="2"> |
| | | <el-input v-model="form.technicalCompetenceSuggestion" |
| | | placeholder="请è¾å
¥å
容" |
| | | size="small"> |
| | | </el-input> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="td-title"> |
| | | <p>æ£æµå·¥ä½ï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="2"> |
| | | <el-radio-group v-model="form.inspectionWork" v-removeAriaHidden> |
| | | <el-radio :label="0">满æ</el-radio> |
| | | <el-radio :label="1">ä¸è¬</el-radio> |
| | | <el-radio :label="2">䏿»¡æ</el-radio> |
| | | </el-radio-group> |
| | | </td> |
| | | <td class="td-title"> |
| | | <p>建议ï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="2"> |
| | | <el-input v-model="form.inspectionWorkSuggestion" |
| | | placeholder="请è¾å
¥å
容" |
| | | size="small"> |
| | | </el-input> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="td-title"> |
| | | <p>æ¶è´¹åçæ§ï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="2"> |
| | | <el-radio-group v-model="form.reasonableFees" v-removeAriaHidden> |
| | | <el-radio :label="0">满æ</el-radio> |
| | | <el-radio :label="1">ä¸è¬</el-radio> |
| | | <el-radio :label="2">䏿»¡æ</el-radio> |
| | | </el-radio-group> |
| | | </td> |
| | | <td class="td-title"> |
| | | <p>建议ï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="2"> |
| | | <el-input v-model="form.reasonableFeesSuggestion" |
| | | placeholder="请è¾å
¥å
容" |
| | | size="small"> |
| | | </el-input> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="td-title"> |
| | | <p>æ¨å¯¹æä»¬ç叿ï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="5"> |
| | | <el-input v-model="form.remark" |
| | | :rows="4" |
| | | placeholder="请è¾å
¥å
容" |
| | | size="small" |
| | | type="textarea"> |
| | | </el-input> |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="closeFormDia">å æ¶</el-button> |
| | | <el-button :loading="editLoad" type="primary" @click="handleEdit">æ 交</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | name: 'formDialog', |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: {}, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | formDia: false, |
| | | form: { |
| | | unitName: '', |
| | | fillDate: '', |
| | | userName: '', |
| | | department: '', |
| | | contactNumber: '', |
| | | serviceAttitude: '', |
| | | technicalCompetence: '', |
| | | technicalCompetenceSuggestion: '', |
| | | inspectionWork: '', |
| | | inspectionWorkSuggestion: '', |
| | | reasonableFees: '', |
| | | reasonableFeesSuggestion: '', |
| | | remark: '', |
| | | clientSatisfactionId: '', |
| | | }, |
| | | operationType: '', |
| | | editLoad: false, |
| | | |
| | | }; |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | openDia (type, row) { |
| | | this.formDia = true; |
| | | this.operationType = type |
| | | if (this.operationType === 'edit') { |
| | | this.form = {...row} |
| | | } |
| | | }, |
| | | handleEdit () { |
| | | if (!this.form.unitName ) { |
| | | this.$message.warning('请填ååä½åç§°') |
| | | return |
| | | } |
| | | if (!this.form.department ) { |
| | | this.$message.warning('请填åé¨é¨') |
| | | return |
| | | } |
| | | this.editLoad = true |
| | | if (this.operationType === 'add') { |
| | | this.$axios.post(this.$api.clientSatisfaction.addClientSatisfaction, this.form, { |
| | | headers: { |
| | | "Content-Type": "application/json" |
| | | }, |
| | | noQs: true |
| | | }).then(res => { |
| | | this.editLoad = false |
| | | if (res.code === 201) return |
| | | this.$message.success('æäº¤æå') |
| | | this.closeFormDia() |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.editLoad = false |
| | | }) |
| | | } else { |
| | | this.$axios.post(this.$api.clientSatisfaction.updateClientSatisfaction, this.form, { |
| | | headers: { |
| | | "Content-Type": "application/json" |
| | | }, |
| | | noQs: true |
| | | }).then(res => { |
| | | this.editLoad = false |
| | | if (res.code === 201) return |
| | | this.$message.success('æäº¤æå') |
| | | this.closeFormDia() |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.editLoad = false |
| | | }) |
| | | } |
| | | }, |
| | | closeFormDia () { |
| | | this.formDia = false; |
| | | this.$emit('closeFormDia') |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | >>>.el-dialog { |
| | | margin: 10vh auto 50px !important; |
| | | } |
| | | .tables { |
| | | table-layout: fixed; |
| | | width: 100%; |
| | | margin-top: 10px; |
| | | } |
| | | .td-title { |
| | | height: 40px; |
| | | width: 170px; |
| | | text-align: center; |
| | | font-size: 14px; |
| | | word-wrap: break-word; |
| | | white-space: normal; |
| | | padding: 6px; |
| | | } |
| | | .td-info { |
| | | padding: 6px; |
| | | } |
| | | .td-info1 { |
| | | display: inline-block; |
| | | width: 100%; |
| | | text-align: left; |
| | | font-size: 14px; |
| | | word-wrap: break-word; |
| | | white-space: normal; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <div> |
| | | <div class="view-title"> |
| | | <span>å®¢æ·æ»¡æåº¦</span> |
| | | <span> |
| | | <el-button v-if="tabIndex === '0'" size="medium" type="primary" @click="openFormDia('add')">æ° å¢</el-button> |
| | | <el-upload v-if="tabIndex === '1'" ref='upload' |
| | | :action="action" |
| | | :before-upload="beforeUpload" :headers="headers" :on-error="onError" |
| | | :on-success="handleSuccessUp" :show-file-list="false" accept='.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar'> |
| | | <el-button :loading="upLoading" size="small" type="primary">导å
¥</el-button> |
| | | </el-upload> |
| | | </span> |
| | | </div> |
| | | <div class="search-background"> |
| | | <span v-if="tabIndex === '0'" class="search-group"> |
| | | <span style="width: 150px">åä½åç§°ï¼</span> |
| | | <el-input v-model="searchForm.unitName" clearable size="small"></el-input> |
| | | </span> |
| | | <span v-if="tabIndex === '1'" class="search-group"> |
| | | <span style="width: 150px">æä»¶åç§°ï¼</span> |
| | | <el-input v-model="searchForm1.fileName" clearable size="small"></el-input> |
| | | </span> |
| | | <span class="search-group"> |
| | | <el-button size="medium" @click="resetSearchForm">é ç½®</el-button> |
| | | <el-button size="medium" type="primary" @click="searchList">æ¥ è¯¢</el-button> |
| | | </span> |
| | | </div> |
| | | <div class="table"> |
| | | <div class="table-tab"> |
| | | <el-radio-group v-model="tabIndex" @change="searchList"> |
| | | <el-radio-button label="0">å®¢æ·æ»¡æåº¦</el-radio-button> |
| | | <el-radio-button label="1">综ååæ</el-radio-button> |
| | | </el-radio-group> |
| | | </div> |
| | | <div v-if="tabIndex === '0'"> |
| | | <TableCard :showForm="false" :showTitle="false"> |
| | | <template v-slot:table> |
| | | <ZTTable |
| | | :column="tableColumn" |
| | | :height="'calc(100vh - 27em)'" |
| | | :table-data="tableData" |
| | | :table-loading="tableLoading" |
| | | style="padding: 0 15px;margin-bottom: 16px"> |
| | | </ZTTable> |
| | | </template> |
| | | </TableCard> |
| | | <el-pagination :current-page="1" :page-size="page.size" :page-sizes="[10, 20, 30, 50, 100]" |
| | | :total="total" layout="->,total, sizes, prev, pager, next, jumper" |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange"> |
| | | </el-pagination> |
| | | </div> |
| | | <div v-if="tabIndex === '1'"> |
| | | <TableCard :showForm="false" :showTitle="false"> |
| | | <template v-slot:table> |
| | | <ZTTable |
| | | :column="tableColumn1" |
| | | :height="'calc(100vh - 27em)'" |
| | | :table-data="tableData1" |
| | | :table-loading="tableLoading1" |
| | | style="padding: 0 15px;margin-bottom: 16px"> |
| | | </ZTTable> |
| | | </template> |
| | | </TableCard> |
| | | <el-pagination :current-page="1" :page-size="page.size" :page-sizes="[10, 20, 30, 50, 100]" |
| | | :total="total1" layout="->,total, sizes, prev, pager, next, jumper" |
| | | @size-change="handleSizeChange1" |
| | | @current-change="handleCurrentChange1"> |
| | | </el-pagination> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <el-dialog |
| | | :visible.sync="lookDialogVisible" |
| | | fullscreen |
| | | title="æ¥çéä»¶" top="5vh" width="800px"> |
| | | <filePreview v-if="lookDialogVisible" :currentFile="{}" |
| | | :fileUrl="javaApi+'/word/'+currentInfo.fileUrl" style="height: 90vh;overflow-y: auto;"/> |
| | | </el-dialog> |
| | | <FormDialog v-if="formDialog" ref="formDialog" @closeFormDia="closeFormDia"></FormDialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import TableCard from '../caorui/TableCard/index.vue'; |
| | | import ZTTable from '../caorui/ZTTable/index.vue'; |
| | | import FormDialog from '../do/a8-customer-satisfaction/formDialog.vue'; |
| | | import filePreview from '../tool/file-preview.vue'; |
| | | |
| | | export default { |
| | | name: 'a8-customer-satisfaction', |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: { filePreview, FormDialog, ZTTable, TableCard }, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | searchForm: { |
| | | unitName: '', |
| | | }, |
| | | searchForm1: { |
| | | fileName: '', |
| | | }, |
| | | tabIndex: '0', |
| | | tableColumn: [ |
| | | { |
| | | label: 'åä½åç§°', |
| | | prop: 'unitName', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'æ¥æ', |
| | | prop: 'fillDate', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'å§å', |
| | | prop: 'userName', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'é¨é¨', |
| | | prop: 'department', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'èç³»çµè¯', |
| | | prop: 'contactNumber', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'åå»ºæ¥æ', |
| | | prop: 'createTime', |
| | | minWidth: '100', |
| | | }, |
| | | { |
| | | dataType: 'action', |
| | | minWidth: '80', |
| | | label: 'æä½', |
| | | operation: [ |
| | | { |
| | | name: 'ç¼è¾', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.openFormDia('edit', row); |
| | | }, |
| | | }, |
| | | { |
| | | name: 'å é¤', |
| | | type: 'text', |
| | | color: '#f56c6c', |
| | | clickFun: (row) => { |
| | | this.delPlan(row) |
| | | } |
| | | } |
| | | ] |
| | | } |
| | | ], |
| | | tableData: [], |
| | | tableLoading: false, |
| | | page: { |
| | | size: 20, |
| | | current: 1, |
| | | }, |
| | | total: 0, |
| | | tableColumn1: [ |
| | | { |
| | | label: 'éä»¶åç§°', |
| | | prop: 'fileName', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'å建人', |
| | | prop: 'userName', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'å建æ¶é´', |
| | | prop: 'createTime', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | dataType: 'action', |
| | | minWidth: '50', |
| | | label: 'æä½', |
| | | operation: [ |
| | | { |
| | | name: 'é¢è§', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.handleLook(row) |
| | | } |
| | | }, |
| | | { |
| | | name: 'ä¸è½½', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.upload(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: 'å é¤', |
| | | type: 'text', |
| | | color: '#f56c6c', |
| | | clickFun: (row) => { |
| | | this.delFile(row) |
| | | } |
| | | } |
| | | ] |
| | | } |
| | | ], |
| | | tableData1: [], |
| | | tableLoading1: false, |
| | | page1: { |
| | | size: 20, |
| | | current: 1, |
| | | }, |
| | | total1: 0, |
| | | formDialog: false, |
| | | upLoading: false, |
| | | currentInfo:{}, |
| | | lookDialogVisible: false, |
| | | }; |
| | | }, |
| | | mounted() { |
| | | this.searchList() |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | // æ¥è¯¢å表 |
| | | searchList () { |
| | | const entity = this.tabIndex === '0' ? this.searchForm : this.searchForm1 |
| | | const page = this.tabIndex === '0' ? this.page : this.page1 |
| | | if (this.tabIndex === '0') { |
| | | this.tableLoading = true |
| | | this.$axios.post(this.$api.clientSatisfaction.pageClientSatisfaction, {entity, page}, { |
| | | headers: { |
| | | "Content-Type": "application/json" |
| | | }, |
| | | noQs: true |
| | | }).then(res => { |
| | | this.tableLoading = false |
| | | if (res.code === 201) return |
| | | this.tableData = res.data.records |
| | | this.total = res.data.total |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.tableLoading = false |
| | | }) |
| | | } else { |
| | | this.tableLoading1 = true |
| | | this.$axios.post(this.$api.clientSatisfaction.pageAnalyseFile, {entity, page}, { |
| | | headers: { |
| | | "Content-Type": "application/json" |
| | | }, |
| | | noQs: true |
| | | }).then(res => { |
| | | this.tableLoading1 = false |
| | | if (res.code === 201) return |
| | | this.tableData1 = res.data.records |
| | | this.total1 = res.data.total |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.tableLoading1 = false |
| | | }) |
| | | } |
| | | }, |
| | | openFormDia (type, row) { |
| | | this.formDialog = true |
| | | this.$nextTick(() => { |
| | | this.$refs.formDialog.openDia(type, row); |
| | | }) |
| | | }, |
| | | closeFormDia () { |
| | | this.formDialog = false |
| | | this.searchList() |
| | | }, |
| | | // éç½®æ¥è¯¢æ¡ä»¶ |
| | | resetSearchForm () { |
| | | this.searchForm.unitName = ''; |
| | | this.searchForm1.fileName = ''; |
| | | this.searchList() |
| | | }, |
| | | // 导å
¥æµç¨ |
| | | 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.searchList() |
| | | } |
| | | }, |
| | | // å é¤å®¢æ·æ»¡æåº¦ |
| | | delPlan (row) { |
| | | this.$confirm('æ¤æä½å°æ°¸ä¹
å é¤è¯¥æ°æ®, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.tableLoading = true |
| | | this.$axios.get(this.$api.clientSatisfaction.delClientSatisfaction + '?clientSatisfactionId=' + row.clientSatisfactionId).then(res => { |
| | | this.tableLoading = false |
| | | if (res.code === 201) return |
| | | this.$message.success('å 餿å') |
| | | this.searchList() |
| | | }).catch(err => { |
| | | this.tableLoading = false |
| | | console.log('err---', err); |
| | | }) |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已忶å é¤' |
| | | }); |
| | | }); |
| | | }, |
| | | // æ¥çæä»¶ |
| | | handleLook(row){ |
| | | this.currentInfo = row |
| | | this.lookDialogVisible = true |
| | | }, |
| | | // ä¸è½½å®¢æ·ç¦å»º |
| | | upload (row) { |
| | | let url = ''; |
| | | if(row.type==1){ |
| | | url = this.javaApi+'/img/'+row.fileUrl |
| | | file.downloadIamge(url,row.fileName) |
| | | }else{ |
| | | url = this.javaApi+'/word/'+row.fileUrl |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = row.fileName; |
| | | link.click(); |
| | | } |
| | | }, |
| | | // å é¤å®¢æ·åæéä»¶ |
| | | delFile (row) { |
| | | this.$confirm('æ¤æä½å°æ°¸ä¹
å é¤è¯¥æ°æ®, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.tableLoading = true |
| | | this.$axios.get(this.$api.clientSatisfaction.delAnalyseFile + '?analyseFileId=' + row.analyseFileId).then(res => { |
| | | this.tableLoading = false |
| | | if (res.code === 201) return |
| | | this.$message.success('å 餿å') |
| | | this.searchList() |
| | | }).catch(err => { |
| | | this.tableLoading = false |
| | | console.log('err---', err); |
| | | }) |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已忶å é¤' |
| | | }); |
| | | }); |
| | | }, |
| | | // å页 |
| | | handleSizeChange(val) { |
| | | this.page.size = val; |
| | | this.searchList(); |
| | | }, |
| | | handleCurrentChange(val) { |
| | | this.page.current = val; |
| | | this.searchList(); |
| | | }, |
| | | // |
| | | // å页 |
| | | handleSizeChange1(val) { |
| | | this.page1.size = val; |
| | | this.searchList(); |
| | | }, |
| | | handleCurrentChange1(val) { |
| | | this.page1.current = val; |
| | | this.searchList(); |
| | | }, |
| | | // |
| | | }, |
| | | // ç¨äºä¸ä¼ æä»¶çä¿¡æ¯ |
| | | computed: { |
| | | headers() { |
| | | return { |
| | | 'token': sessionStorage.getItem('token') |
| | | } |
| | | }, |
| | | action() { |
| | | return this.javaApi + this.$api.clientSatisfaction.uploadAnalyseFile |
| | | } |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .view-title { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | height: 60px; |
| | | padding-left: 20px; |
| | | } |
| | | |
| | | .search-background { |
| | | width: 100%; |
| | | height: 80px; |
| | | line-height: 80px; |
| | | background-color: #ffffff; |
| | | display: flex; |
| | | } |
| | | |
| | | .search-group { |
| | | display: flex; |
| | | align-items: center; |
| | | margin: 0 20px; |
| | | } |
| | | |
| | | .table { |
| | | margin-top: 20px; |
| | | background-color: #ffffff; |
| | | padding-top: 20px; |
| | | } |
| | | .table-tab { |
| | | margin: 0 20px 20px 20px; |
| | | } |
| | | </style> |