| | |
| | | @click="onSubmit('ruleForm')" |
| | | icon="el-icon-search" |
| | | size="small" |
| | | >{{ $t('common.iquery') }}</el-button |
| | | >{{ $t("common.iquery") }}</el-button |
| | | > |
| | | <el-button |
| | | v-if="btnStatus.insert" |
| | | @click="InsertFormdialog = true" |
| | | icon="el-icon-plus" |
| | | size="small" |
| | | >{{ $t('common.append') }}</el-button |
| | | >{{ $t("common.append") }}</el-button |
| | | > |
| | | <el-button |
| | | @click="resetForm('ruleForm')" |
| | | icon="el-icon-delete" |
| | | size="small" |
| | | >{{ $t('common.empty') }}</el-button |
| | | >{{ $t("common.empty") }}</el-button |
| | | > |
| | | </el-form-item> |
| | | </el-form> |
| | |
| | | <el-table-column min-width="150" :label="$t('common.operate')"> |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | v-if="btnStatus.update" |
| | | @click="handleEdit(scope.$index, scope.row)" |
| | | type="warning" |
| | | size="small" |
| | | >{{ $t('common.update') }}</el-button |
| | | >{{ $t("common.update") }}</el-button |
| | | > |
| | | <el-button |
| | | v-if="btnStatus.delete" |
| | | @click="handleDelete(scope.$index, scope.row)" |
| | | type="danger" |
| | | size="small" |
| | | >{{ $t('common.delete') }}</el-button |
| | | >{{ $t("common.delete") }}</el-button |
| | | > |
| | | </template> |
| | | </el-table-column> |
| | |
| | | disabled |
| | | ></el-input> |
| | | <el-button style="margin-left: 20px" @click="showVerTree(2)">{{ |
| | | $t('common.choose') |
| | | $t("common.choose") |
| | | }}</el-button> |
| | | </el-form-item> |
| | | <el-form-item |
| | |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button @click="editFromDataClose">{{ |
| | | $t('common.close') |
| | | $t("common.close") |
| | | }}</el-button> |
| | | <el-button @click="editFromData" type="primary">{{ |
| | | $t('common.confirm') |
| | | $t("common.confirm") |
| | | }}</el-button> |
| | | </div> |
| | | </el-dialog> |
| | |
| | | disabled |
| | | ></el-input> |
| | | <el-button style="margin-left: 20px" @click="showVerTree(3)">{{ |
| | | $t('common.choose') |
| | | $t("common.choose") |
| | | }}</el-button> |
| | | </el-form-item> |
| | | |
| | |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button @click="insertFromDataClose">{{ |
| | | $t('common.close') |
| | | $t("common.close") |
| | | }}</el-button> |
| | | <el-button @click="insertFromData" type="primary">{{ |
| | | $t('common.confirm') |
| | | $t("common.confirm") |
| | | }}</el-button> |
| | | </div> |
| | | </el-dialog> |
| | |
| | | </div> |
| | | <div class="btnBox"> |
| | | <el-button type="primary" size="small" @click="selectCataName">{{ |
| | | $t('common.confirm') |
| | | $t("common.confirm") |
| | | }}</el-button> |
| | | <el-button type="primary" size="small" @click="showCata = false">{{ |
| | | $t('common.close') |
| | | $t("common.close") |
| | | }}</el-button> |
| | | </div> |
| | | </div> |
| | |
| | | insertVersion, |
| | | deleteVersion, |
| | | updateVersion, |
| | | } from '../../api/api'; |
| | | import verDirTree from './verDirTree.vue'; |
| | | import MyBread from '../../components/MyBread.vue'; |
| | | import verDirTrees from './verDirTrees.vue'; |
| | | import moment from 'moment'; |
| | | } from "../../api/api"; |
| | | import verDirTree from "./verDirTree.vue"; |
| | | import MyBread from "../../components/MyBread.vue"; |
| | | import verDirTrees from "./verDirTrees.vue"; |
| | | import moment from "moment"; |
| | | export default { |
| | | name: 'versionManage', |
| | | name: "versionManage", |
| | | components: { MyBread, verDirTree, verDirTrees }, |
| | | data() { |
| | | return { |
| | | showCata: false, |
| | | formLabelWidth: '100px', |
| | | formLabelWidth: "100px", |
| | | dialogFormVisible: false, |
| | | InsertFormdialog: false, |
| | | showinfoBox: false, |
| | |
| | | pageIndex: 1, |
| | | pageSize: 10, |
| | | }, |
| | | btnStatus: { |
| | | select: false, |
| | | delete: false, |
| | | upload: false, |
| | | download: false, |
| | | insert: false, |
| | | update: false, |
| | | }, |
| | | }; |
| | | }, |
| | | created() { |
| | | this.getRoleTabelData(); |
| | | this.showPermsBtn(); |
| | | }, |
| | | computed: { |
| | | pathId() { |
| | |
| | | }, |
| | | }, |
| | | methods: { |
| | | showPermsBtn() { |
| | | let currentPerms = this.$store.state.currentPerms; |
| | | let permsEntity = this.$store.state.permsEntity; |
| | | permsEntity |
| | | .filter((item) => item.perms == currentPerms) |
| | | .map((item) => (this.btnStatus[item.tag.substr(1)] = true)); |
| | | }, |
| | | resetForm() { |
| | | this.ruleForm = {}; |
| | | this.$store.state.verCateNode = {}; |
| | | this.$bus.$emit('clearTressLabel', true); |
| | | this.$bus.$emit("clearTressLabel", true); |
| | | this.getRoleTabelData(); |
| | | }, |
| | | onSubmit() { |
| | | this.getRoleTabelData(); |
| | | }, |
| | | async getRoleTabelData() { |
| | | if (this.listData.tab == '') { |
| | | if (this.listData.tab == "") { |
| | | delete this.listData.tab; |
| | | } |
| | | |
| | | this.listData.name = this.ruleForm.name; |
| | | this.listData.depName = this.$store.state.verCateNode.name; |
| | | console.log(this.listData); |
| | | const data = await select_Ver_ByPageAndCount(this.listData); |
| | | console.log(data); |
| | | |
| | | if (data.code != 200) { |
| | | this.$message.error('列表调用失败'); |
| | | this.$message.error("列表调用失败"); |
| | | } |
| | | this.tableData = data.result; |
| | | this.count = data.count; |
| | |
| | | async editFromData() { |
| | | if (this.upform.depName == null) { |
| | | this.$message({ |
| | | message: '请选择角色所属单位', |
| | | type: 'warning', |
| | | message: "请选择角色所属单位", |
| | | type: "warning", |
| | | }); |
| | | return; |
| | | } |
| | |
| | | this.dialogFormVisible = false; |
| | | this.upform = {}; |
| | | this.$message({ |
| | | message: '修改成功!', |
| | | type: 'success', |
| | | message: "修改成功!", |
| | | type: "success", |
| | | }); |
| | | this.getRoleTabelData(); |
| | | } else { |
| | | this.$message({ |
| | | message: '修改失败!', |
| | | type: 'warning', |
| | | message: "修改失败!", |
| | | type: "warning", |
| | | }); |
| | | } |
| | | }, |
| | |
| | | async insertFromData() { |
| | | if (this.insertform.dirid == null) { |
| | | this.$message({ |
| | | message: '请选择角色所属单位', |
| | | type: 'warning', |
| | | message: "请选择角色所属单位", |
| | | type: "warning", |
| | | }); |
| | | return; |
| | | } |
| | |
| | | this.InsertFormdialog = false; |
| | | this.insertform = {}; |
| | | this.$message({ |
| | | message: '添加成功!', |
| | | type: 'success', |
| | | message: "添加成功!", |
| | | type: "success", |
| | | }); |
| | | this.getRoleTabelData(); |
| | | } else { |
| | | this.$message({ |
| | | message: '添加失败!', |
| | | type: 'warning', |
| | | message: "添加失败!", |
| | | type: "warning", |
| | | }); |
| | | } |
| | | }, |
| | | formatTime(row, column) { |
| | | let date = row[column.property]; |
| | | if (date === undefined || date === null) { |
| | | return ''; |
| | | return ""; |
| | | } |
| | | return moment(parseInt(date)).format('YYYY-MM-DD HH:mm:ss'); |
| | | return moment(parseInt(date)).format("YYYY-MM-DD HH:mm:ss"); |
| | | }, |
| | | async handleDelete(index, row) { |
| | | const data = await deleteVersion(row.id); |
| | | if (data.code == 200) { |
| | | this.InsertFormdialog = false; |
| | | this.$message({ |
| | | message: '删除成功!', |
| | | type: 'success', |
| | | message: "删除成功!", |
| | | type: "success", |
| | | }); |
| | | this.getRoleTabelData(); |
| | | } else { |
| | | this.$message({ |
| | | message: '删除失败!', |
| | | type: 'warning', |
| | | message: "删除失败!", |
| | | type: "warning", |
| | | }); |
| | | } |
| | | }, |