| | |
| | | ></My-bread> |
| | | <el-divider /> |
| | | <div class="verSionContent"> |
| | | <div class="verSion_leftTree"> |
| | | <!-- <div class="verSion_leftTree"> |
| | | <ver-dir-tree></ver-dir-tree> |
| | | </div> |
| | | </div> --> |
| | | <div class="verSion_rightContent"> |
| | | <el-form ref="ruleForm" :model="ruleForm" :inline="true"> |
| | | <el-form-item :label="$t('dataManage.vmobj.keyword')" prop="name"> |
| | | <el-form-item> |
| | | <el-cascader |
| | | v-model="ruleForm.dirid" |
| | | :show-all-levels="false" |
| | | :options="companyOption" |
| | | @change="handleChange" |
| | | :props="{ |
| | | label: 'name', |
| | | value: 'id', |
| | | children: 'children', |
| | | checkStrictly: true, |
| | | emitPath: false, |
| | | }" |
| | | ></el-cascader> |
| | | </el-form-item> |
| | | <el-form-item > |
| | | <el-input |
| | | v-model="ruleForm.name" |
| | | :placeholder="$t('common.pleaseInput')" |
| | |
| | | </el-form-item> |
| | | </el-form> |
| | | <el-divider class="eldivider" /> |
| | | <div style="height: 80%"> |
| | | <div style="height: 73%"> |
| | | <el-table :data="tableData" style="width: 100%" height="99%"> |
| | | <el-table-column |
| | | align="center" |
| | |
| | | <el-table-column |
| | | align="center" |
| | | prop="name" |
| | | :label="$t('dataManage.vmobj.name')" |
| | | :label="$t('common.versionName')" |
| | | /> |
| | | <el-table-column |
| | | align="center" |
| | |
| | | /> |
| | | <el-table-column |
| | | align="center" |
| | | prop="createUser" |
| | | prop="createName" |
| | | :label="$t('dataManage.vmobj.createonuser')" |
| | | /> |
| | | <el-table-column |
| | |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | v-if="btnStatus.update" |
| | | @click="handleEdit(scope.$index, scope.row)" |
| | | @click=" |
| | | handleEdit(scope.$index, scope.row); |
| | | getSelectdirTab(); |
| | | " |
| | | type="warning" |
| | | size="small" |
| | | >{{ $t('common.update') }}</el-button |
| | |
| | | <el-cascader |
| | | style="width: 300px" |
| | | v-model="upform.dirid" |
| | | :options="catalogOption" |
| | | :options="editcatalogOption" |
| | | @change="upCatalogChange" |
| | | :props="cascader" |
| | | ></el-cascader> |
| | |
| | | }}</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | |
| | | <!-- <div class="searchComp"> |
| | | <el-form ref="ruleForm" :model="ruleForm" :inline="true"> |
| | | <el-form-item :label="$t('dataManage.vmobj.keyword')" prop="name"> |
| | |
| | | data() { |
| | | return { |
| | | catalogOption: [], |
| | | editcatalogOption: [], |
| | | showCata: false, |
| | | formLabelWidth: '100px', |
| | | dialogFormVisible: false, |
| | |
| | | ruleForm: {}, |
| | | insertform: {}, |
| | | tableData: [], |
| | | companyOption:[], |
| | | count: 0, |
| | | rowFlag: null, |
| | | listData: { |
| | |
| | | }; |
| | | }, |
| | | created() { |
| | | this.getQueryDirTree(); |
| | | this.getRoleTabelData(); |
| | | this.showPermsBtn(); |
| | | }, |
| | |
| | | this.insertform.dirid = value; |
| | | }, |
| | | upCatalogChange(val) { |
| | | this.upform.dirid == value; |
| | | this.upform.dirid == val; |
| | | }, |
| | | //目录列表获取 |
| | | async getQueryDirTree() { |
| | | const res = await selectdirTab(); |
| | | if (res.code != 200) { |
| | | this.$message.error('目录列表获取失败'); |
| | | return; |
| | | } |
| | | this.companyOption = this.treeData(res.result); |
| | | this.ruleForm.dirid= this.companyOption[0].id |
| | | |
| | | }, |
| | | handleChange(val){ |
| | | |
| | | this.ruleForm.dirid=val; |
| | | this.onSubmit(); |
| | | }, |
| | | //目录列表获取 |
| | | async getSelectdirTab() { |
| | |
| | | this.$message.error('目录列表获取失败'); |
| | | return; |
| | | } |
| | | this.insertform.name = this.getYMD(); |
| | | this.insertform.path = 1; |
| | | this.insertform.dirid = 1; |
| | | this.upform.dirid == 1; |
| | | this.catalogOption = this.treeData(res.result); |
| | | this.editcatalogOption = this.treeData(res.result); |
| | | }, |
| | | getYMD() { |
| | | let myDate = new Date(); |
| | | let myYear = myDate.getFullYear(); //获取完整的年份(4位,1970-????) |
| | | let myMonth = myDate.getMonth() + 1; //获取当前月份(0-11,0代表1月) |
| | | let myToday = myDate.getDate(); //获取当前日(1-31) |
| | | myMonth = myMonth > 9 ? myMonth : '0' + myMonth; |
| | | myToday = myToday > 9 ? myToday : '0' + myToday; |
| | | let nowDate = 'V' + myYear + myMonth + myToday; |
| | | return nowDate; |
| | | }, |
| | | |
| | | //树列表生成 |
| | | treeData(source) { |
| | | let cloneData = JSON.parse(JSON.stringify(source)); // 对源数据深度克隆 |
| | |
| | | }, |
| | | resetForm() { |
| | | this.ruleForm = {}; |
| | | this.ruleForm.dirid= this.companyOption[0].id |
| | | this.$store.state.verCateNode = {}; |
| | | this.$bus.$emit('clearTressLabel', true); |
| | | this.getRoleTabelData(); |
| | | }, |
| | | onSubmit() { |
| | | this.listData.pageIndex = 1; |
| | | this.listData.pageSize = 10; |
| | | this.getRoleTabelData(); |
| | | }, |
| | | async getRoleTabelData() { |
| | |
| | | } |
| | | |
| | | this.listData.name = this.ruleForm.name; |
| | | this.listData.depName = this.$store.state.verCateNode.name; |
| | | this.listData.dirid = this.ruleForm.dirid; |
| | | |
| | | const data = await select_Ver_ByPageAndCount(this.listData); |
| | | |
| | | if (data.code != 200) { |
| | |
| | | <style lang="less" scoped> |
| | | //@import url(); 引入公共css类 |
| | | .verSionBox { |
| | | height: 81%; |
| | | width: 97%; |
| | | position: absolute; |
| | | box-sizing: border-box; |
| | | height: 98%; |
| | | width: 98%; |
| | | padding: 1%; |
| | | .verSionContent { |
| | | width: 100%; |
| | | height: 92%; |
| | |
| | | justify-content: space-between; |
| | | .verSion_leftTree { |
| | | width: 15%; |
| | | height: 95%; |
| | | height: 91%; |
| | | border: 1px solid white; |
| | | border-radius: 5px; |
| | | padding: 1%; |
| | |
| | | overflow-y: auto; |
| | | } |
| | | .verSion_rightContent { |
| | | width: 80%; |
| | | height: 95%; |
| | | width: 98%; |
| | | height: 91%; |
| | | border: 1px solid white; |
| | | border-radius: 5px; |
| | | padding: 1%; |