| | |
| | | <div class="subpage_Box"> |
| | | <My-bread :list="[ |
| | | `${$t('dataManage.dataManage')}`, |
| | | `${$t('dataManage.catalogueManage')}`, |
| | | `${$t('dataManage.projectManagement')}`, |
| | | ]"></My-bread> |
| | | <el-divider /> |
| | | <div class="mainBox"> |
| | |
| | | > |
| | | <el-form-item |
| | | prop="name" |
| | | :label="$t('dataManage.dataUpObj.directoryName')" |
| | | :label="$t('dataManage.dataUpObj.name')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="itemdetail.name" |
| | | size="small" |
| | | style=" max-width: 420px" |
| | | :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valueone')" |
| | | :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valueName')" |
| | | clearable |
| | | /> |
| | | <!-- style="max-width: 400px"--> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('dataManage.dataUpObj.catalogDescription')" |
| | | :label="$t('dataManage.dataUpObj.explain')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="itemdetail.descr" |
| | | type="textarea" |
| | | style=" max-width: 420px" |
| | | :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valueone')" |
| | | :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valueexplain')" |
| | | clearable |
| | | /> |
| | | </el-form-item> |
| | |
| | | <el-select |
| | | style="width: 420px" |
| | | v-model="itemdetail.checks" |
| | | :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valueexamine')" |
| | | multiple |
| | | > |
| | | <el-option |
| | |
| | | v-model="itemdetail.exts" |
| | | type="textarea" |
| | | style=" max-width: 420px" |
| | | :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valueone')" |
| | | :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuesuffix')" |
| | | clearable |
| | | /> |
| | | </el-form-item> |
| | |
| | | disabled |
| | | type="textarea" |
| | | style=" max-width: 420px" |
| | | :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valueone')" |
| | | autosize |
| | | /> |
| | | </el-form-item> |
| | |
| | | :rules="rules" |
| | | > |
| | | <el-form-item |
| | | :label="$t('dataManage.dataUpObj.directoryName')" |
| | | :label="$t('dataManage.dataUpObj.name')" |
| | | prop="name" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="ruleForm.name" |
| | | autocomplete="off" |
| | | :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valueName')" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('dataManage.dataUpObj.catalogDescription')" |
| | | :label="$t('dataManage.dataUpObj.explain')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="ruleForm.descr" |
| | | autocomplete="off" |
| | | :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valueexplain')" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | |
| | | type="textarea" |
| | | resize="none" |
| | | style="height: 100%; overflow: auto" |
| | | :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuesuffix')" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item |
| | |
| | | v-model="ruleForm.checks" |
| | | multiple |
| | | style="width:100%;" |
| | | :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valueexamine')" |
| | | > |
| | | <el-option |
| | | v-for="item in options" |
| | |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('dataManage.dataUpObj.catalogRemarks')" |
| | | :label="$t('dataManage.dataUpObj.Remarks')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="ruleForm.bak" |
| | | autocomplete="off" |
| | | :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valueRemarks')" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | |
| | | queryDirTree().then((res) => { |
| | | // console.log(res); |
| | | if (res.code == 200) { |
| | | |
| | | this.oriData = res.result; |
| | | this.newData = res.result; |
| | | this.dirList = this.treeData(res.result); |
| | |
| | | if (currentId != 0) { |
| | | const tempChildrenNodex1 = pchildNodes[currentId - 1]; |
| | | const tempChildrenNodex2 = pchildNodes[currentId]; |
| | | tempChildrenNodex2.orderNum = |
| | | pchildNodes[currentId - 1].data.orderNum; |
| | | tempChildrenNodex1.orderNum = pchildNodes[currentId].data.orderNum; |
| | | // tempChildrenNodex2.orderNum = |
| | | // pchildNodes[currentId - 1].data.orderNum; |
| | | // tempChildrenNodex1.orderNum = pchildNodes[currentId].data.orderNum; |
| | | var arr = []; |
| | | this.oriData.filter((res) => { |
| | | if (res.id == tempChildrenNodex2.data.id) { |
| | | res.orderNum = tempChildrenNodex2.orderNum; |
| | | // res.orderNum = tempChildrenNodex2.orderNum; |
| | | arr.push(res); |
| | | } else if (res.id == tempChildrenNodex1.data.id) { |
| | | res.orderNum = tempChildrenNodex1.orderNum; |
| | | // res.orderNum = tempChildrenNodex1.orderNum; |
| | | arr.push(res); |
| | | } |
| | | }); |
| | | const orderNum = arr[1].orderNum |
| | | arr[1].orderNum = arr[0].orderNum |
| | | arr[0].orderNum = orderNum |
| | | this.newData = arr; |
| | | this.sendChange(); |
| | | } else { |
| | |
| | | if (currentId < pchildNodes.length - 1) { |
| | | const tempChildrenNodex1 = pchildNodes[currentId + 1]; |
| | | const tempChildrenNodex2 = pchildNodes[currentId]; |
| | | tempChildrenNodex2.orderNum = |
| | | pchildNodes[currentId + 1].data.orderNum; |
| | | tempChildrenNodex1.orderNum = pchildNodes[currentId].data.orderNum; |
| | | // tempChildrenNodex2.orderNum = |
| | | // pchildNodes[currentId + 1].data.orderNum; |
| | | // tempChildrenNodex1.orderNum = pchildNodes[currentId].data.orderNum; |
| | | var arr = []; |
| | | this.oriData.filter((res) => { |
| | | if (res.id == tempChildrenNodex2.data.id) { |
| | | res.orderNum = tempChildrenNodex2.orderNum; |
| | | // res.orderNum = tempChildrenNodex2.orderNum; |
| | | arr.push(res); |
| | | } else if (res.id == tempChildrenNodex1.data.id) { |
| | | res.orderNum = tempChildrenNodex1.orderNum; |
| | | // res.orderNum = tempChildrenNodex1.orderNum; |
| | | arr.push(res); |
| | | } |
| | | }); |
| | | const orderNum = arr[1].orderNum |
| | | arr[1].orderNum = arr[0].orderNum |
| | | arr[0].orderNum = orderNum |
| | | this.newData = arr; |
| | | this.sendChange(); |
| | | } else { |
| | |
| | | if (valid) { |
| | | this.fullscreenLoading = true; |
| | | var val = this.ruleForm; |
| | | val.checks = this.ruleForm.checks.toString() |
| | | if (this.ruleForm.checks) { |
| | | val.checks = this.ruleForm.checks.toString() |
| | | } else { |
| | | val.checks = '' |
| | | } |
| | | |
| | | |
| | | insertDir(val) |
| | | .then((res) => { |
| | | setTimeout(() => { |
| | |
| | | } |
| | | item.orderNum = i + 1; |
| | | }); |
| | | // console.log(nodeData); |
| | | //更新原始整体数据 |
| | | |
| | | let arr = []; |
| | | this.oriData.forEach((e) => { |
| | | nodeData.forEach((item) => { |
| | |
| | | this.getDirTree(); |
| | | return; |
| | | } else { |
| | | this.$message.error("修改失败,请重试!"); |
| | | this.$message.error("移动失败,请重试!"); |
| | | } |
| | | }) |
| | | .catch(() => { |
| | | this.$message.error("修改失败,请重试!"); |
| | | this.$message.error("移动失败,请重试!"); |
| | | }); |
| | | }, |
| | | |