| | |
| | | <template slot-scope="scope"> |
| | | <span v-if="scope.row.type == 1">World模板 </span> |
| | | <span v-else-if="scope.row.type == 2">Excel模板</span> |
| | | <span v-else-if="scope.row.type == 3">Zip模板</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | align="center" |
| | | prop="code" |
| | | :label="$t('common.domCode')" |
| | | :label="$t('common.templateType')" |
| | | :formatter="codeData" |
| | | /> |
| | | <!-- <el-table-column |
| | |
| | | v-model=" editForm.name" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item :label="$t('common.fileType')"> |
| | | <el-select |
| | | :popper-append-to-body="false" |
| | | v-model="editForm.type" |
| | | @change="selFileTypeChange" |
| | | placeholder="请选择活动区域" |
| | | style="width:85%" |
| | | > |
| | | <el-option |
| | | label="World模板" |
| | | value="1" |
| | | ></el-option> |
| | | <el-option |
| | | label="Excel模板" |
| | | value="2" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item :label="$t('common.domCode')"> |
| | | <el-form-item :label="$t('common.templateType')"> |
| | | <!-- <el-input |
| | | style="width:100%" |
| | | v-model=" editForm.code" |
| | |
| | | <el-select |
| | | :popper-append-to-body="false" |
| | | style="width:85%" |
| | | @change="selFileCodeChange" |
| | | v-model="editForm.code" |
| | | placeholder="请选择" |
| | | placeholder="请选择文件类型" |
| | | > |
| | | <el-option |
| | | v-for="item in options" |
| | |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item :label="$t('common.fileType')"> |
| | | <el-select |
| | | :popper-append-to-body="false" |
| | | v-model="editForm.type" |
| | | @change="selFileTypeChange" |
| | | placeholder="请选择模板类型" |
| | | style="width:85%" |
| | | > |
| | | <el-option |
| | | v-for="item in typeOption" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | > |
| | | </el-option> |
| | | <!-- <el-option |
| | | label="World模板" |
| | | value="1" |
| | | ></el-option> |
| | | <el-option |
| | | label="Excel模板" |
| | | value="2" |
| | | ></el-option> |
| | | <el-option |
| | | label="Zip模板" |
| | | value="3" |
| | | ></el-option> --> |
| | | </el-select> |
| | | </el-form-item> |
| | | |
| | | <el-form-item :label="$t('common.filePath')"> |
| | | <div class="BoxFlex"> |
| | | <div class="BoxFlexinput"> |
| | |
| | | </p> |
| | | <el-divider></el-divider> |
| | | <p> |
| | | <label> {{ $t('common.domCode') }}:</label> |
| | | <label> {{ $t('common.templateType') }}:</label> |
| | | <label class="boxlabel">{{ itemdetail.code }}</label> |
| | | </p> |
| | | <el-divider></el-divider> |
| | |
| | | label: "服务调用量统计", |
| | | }, |
| | | { |
| | | value: "countOperates ", |
| | | value: "countOperates", |
| | | label: "用户流量统计", |
| | | }, |
| | | { |
| | | value: "dataTable", |
| | | label: "上传数据表格模板", |
| | | }, |
| | | { |
| | | value: "uploadDir", |
| | | label: "上传目录结构模板", |
| | | }, |
| | | { |
| | | value: "dirFolder", |
| | | label: "目录结构文件夹模板", |
| | | }, |
| | | ], |
| | | itemdetail: {}, |
| | |
| | | styleVar: { |
| | | height: "calc(100% - 109px)", |
| | | }, |
| | | typeOption: [], |
| | | }; |
| | | }, |
| | | created() { |
| | |
| | | this.itemdetail.fileType = "World模板"; |
| | | } else if (parseInt(row.type) == 2) { |
| | | this.itemdetail.fileType = "Excel模板"; |
| | | } else if (parseInt(row.type) == 3) { |
| | | this.itemdetail.fileType = "Zip模板"; |
| | | } |
| | | if (row.code.indexOf("countSizes") != -1) { |
| | | this.itemdetail.code = "数据量统计"; |
| | | } else if (row.code.indexOf("countServices") != -1) { |
| | | this.itemdetail.code = "服务调用量统计"; |
| | | } else if (row.code.indexOf("countOperates") != -1) { |
| | | this.itemdetail.code = "用户流量统计"; |
| | | } |
| | | var val = this.options.filter(res => { |
| | | if (res.value == row.code) { |
| | | return res |
| | | } |
| | | }) |
| | | this.itemdetail.code = val[0].label; |
| | | // if (row.code.indexOf("countSizes") != -1) { |
| | | // this.itemdetail.code = "数据量统计"; |
| | | // } else if (row.code.indexOf("countServices") != -1) { |
| | | // this.itemdetail.code = "服务调用量统计"; |
| | | // } else if (row.code.indexOf("countOperates") != -1) { |
| | | // this.itemdetail.code = "用户流量统计"; |
| | | // } else if (row.code.indexOf("countOperates") != -1) { |
| | | // this.itemdetail.code = "用户流量统计"; |
| | | // } else if (row.code.indexOf("countOperates") != -1) { |
| | | // this.itemdetail.code = "用户流量统计"; |
| | | // } |
| | | |
| | | this.itemdetail.cTime = this.format(row.createTime); |
| | | if (row.updateTime) { |
| | |
| | | this.selectFileType = ".docx"; |
| | | } else if (parseInt(val) == 2) { |
| | | this.selectFileType = ".xlsx"; |
| | | } else if (parseInt(val) == 3) { |
| | | this.selectFileType = ".zip"; |
| | | } |
| | | }, |
| | | selFileCodeChange(res) { |
| | | var name; |
| | | for (var i in this.options) { |
| | | if (this.options[i].value == res) { |
| | | name = this.options[i].label |
| | | break; |
| | | } |
| | | } |
| | | |
| | | if (name.indexOf('统计') > -1) { |
| | | this.typeOption = [{ |
| | | label: "World模板", |
| | | value: "1" |
| | | }, { |
| | | label: "Excel模板", |
| | | value: "2" |
| | | }] |
| | | |
| | | } else { |
| | | this.typeOption = [{ |
| | | label: "World模板", |
| | | value: "1" |
| | | }, { |
| | | label: "Excel模板", |
| | | value: "2" |
| | | }, { |
| | | label: "Zip模板", |
| | | value: "3" |
| | | }] |
| | | } |
| | | this.editForm.type = this.typeOption[0].value |
| | | }, |
| | | |
| | | |
| | | |
| | | |
| | | //修改 |
| | | handleEdit(index, row) { |
| | | this.behavior = "修改"; |
| | |
| | | handleSelectionChange(val) { |
| | | this.multipleSelection = val; |
| | | }, |
| | | |
| | | editFormStart() { |
| | | this.editForm.code = "countSizes"; |
| | | var name; |
| | | for (var i in this.options) { |
| | | if (this.options[i].value == this.editForm.code) { |
| | | name = this.options[i].label |
| | | break; |
| | | } |
| | | } |
| | | |
| | | if (name.indexOf('统计') > -1) { |
| | | this.typeOption = [{ |
| | | label: "World模板", |
| | | value: "1" |
| | | }, { |
| | | label: "Excel模板", |
| | | value: "2" |
| | | }] |
| | | |
| | | } else { |
| | | this.typeOption = [{ |
| | | label: "World模板", |
| | | value: "1" |
| | | }, { |
| | | label: "Excel模板", |
| | | value: "2" |
| | | }, { |
| | | label: "Zip模板", |
| | | value: "3" |
| | | }] |
| | | } |
| | | this.editForm.type = this.typeOption[0].value |
| | | }, |
| | | |
| | | //新增弹窗 |
| | | setTableInsert() { |
| | | this.editFormStart(); |
| | | this.behavior = "新增"; |
| | | this.dialogVisible = true; |
| | | }, |