| | |
| | | </div> |
| | | <el-dialog |
| | | title="修改详情" |
| | | top="5vh" |
| | | top="2vh" |
| | | style="overflow: hidden" |
| | | :before-close="removeUpdate" |
| | | :visible.sync="dialogFormVisible" |
| | |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button @click="removeUpdate">取 消</el-button> |
| | | <el-button type="primary" @click="updateForm">确 定</el-button> |
| | | <el-button @click="removeUpdate">{{$t('common.close')}}</el-button> |
| | | <el-button type="primary" @click="updateForm">{{$t('common.confirm')}}</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | <el-dialog |
| | |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button @click="insertFromDataClose">取 消</el-button> |
| | | <el-button type="primary" @click="insertFromData">确 定</el-button> |
| | | <el-button @click="insertFromDataClose">{{$t('common.close')}}</el-button> |
| | | <el-button type="primary" @click="insertFromData">{{$t('common.confirm')}}</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | <div class="leftTree" v-if="showDirCata"> |
| | |
| | | showinfoBox: false, |
| | | itemdetail: {}, |
| | | ruleForm: { |
| | | name: '', |
| | | }, |
| | | |
| | | backupData: [], |
| | |
| | | count: 0, |
| | | listData: { |
| | | name: null, |
| | | depName: null, |
| | | pageIndex: 1, |
| | | pageSize: 10, |
| | | }, |
| | |
| | | }, |
| | | selectDepCataName() { |
| | | this.showDepCata = false; |
| | | console.log(this.depFlag) |
| | | switch (this.depFlag) { |
| | | case 0: |
| | | // var data = this.$store.state.styleDirCateNodes; |
| | | this.insertform.depValue = this.$store.state.styleDepCateNodes.name; |
| | | this.insertform.depid = this.$store.state.styleDepCateNodes.id; |
| | | break; |
| | |
| | | if (this.listData.tab == '') { |
| | | delete this.listData.tab; |
| | | } |
| | | this.listData.name = this.ruleForm.name; |
| | | const data = await select_Style_ByPageAndCount(this.listData); |
| | | if (data.code != 200) { |
| | | this.$message.error('列表调用失败'); |
| | |
| | | }, |
| | | formatStatus(row, column) { |
| | | let date = row[column.property]; |
| | | return this.forMontStatus(date); |
| | | }, |
| | | forMontStatus(date) { |
| | | if (date === undefined || date === null) { |
| | | return ''; |
| | | return; |
| | | } |
| | | switch (date) { |
| | | case 1: |
| | |
| | | addstyle() { |
| | | this.$router.push('/addstyle'); |
| | | }, |
| | | async updateForm() { |
| | | if (this.upform.dirid == null || this.upform.depid == null) { |
| | | statusFormat(res){ |
| | | switch(res){ |
| | | case "启用": |
| | | return 1; |
| | | break; |
| | | case "停用": |
| | | return 0; |
| | | break; |
| | | case "Start Using": |
| | | return 1; |
| | | break; |
| | | case "Stop Using": |
| | | return 0; |
| | | break; |
| | | } |
| | | }, |
| | | async updateForm() { |
| | | if (this.upform.dirid == null || this.upform.depid == null) { |
| | | this.$message({ |
| | | message: '请选择样式所属的目录或单位', |
| | | type: 'warning', |
| | | }); |
| | | return; |
| | | } |
| | | const data = await updateStyle(this.upform); |
| | | if(Number.isInteger(this.upform.status) == false){ |
| | | this.upform.status = this.statusFormat(this.upform.status) |
| | | } |
| | | const data = await updateStyle(this.upform); |
| | | if (data.code == 200) { |
| | | this.dialogFormVisible = false; |
| | | this.upform = {}; |
| | |
| | | removeUpdate() { |
| | | this.upflag = false; |
| | | this.dialogFormVisible = false; |
| | | this.upform={} |
| | | this.upform = {} |
| | | }, |
| | | submitForm(formName) { |
| | | this.$refs[formName].validate((valid) => { |
| | | if (valid) { |
| | | this.searchName = this.ruleForm.name.trim(); |
| | | this.startFromData(); |
| | | } else { |
| | | console.log('error submit!!'); |
| | | return false; |
| | | } |
| | | }); |
| | | this.getRoleTabelData() |
| | | // this.$refs[formName].validate((valid) => { |
| | | // if (valid) { |
| | | // this.searchName = this.ruleForm.name.trim(); |
| | | // this.startFromData(); |
| | | // } else { |
| | | // console.log('error submit!!'); |
| | | // return false; |
| | | // } |
| | | // }); |
| | | }, |
| | | resetForm(formName) { |
| | | this.ruleForm ={} |
| | | this.getRoleTabelData(); |
| | | }, |
| | | showDetail(index, row) { |
| | | this.showinfoBox = true; |
| | | this.itemdetail = row; |
| | | this.itemdetail.createTime = this.formomentTime(this.itemdetail.createTime); |
| | | this.itemdetail.updateTime = this.formomentTime(this.itemdetail.updateTime); |
| | | |
| | | }, |
| | | closeDetial() { |
| | | this.showinfoBox = false; |
| | |
| | | this.upform = row; |
| | | this.upform.depValue = row.depName; |
| | | this.upform.dirValue = row.dirName; |
| | | this.upform.status = this.forMontStatus(row.status) |
| | | }, |
| | | handleDelete(index, row) { |
| | | this.$confirm('确定是否删除?', '提示', { |