fix: 达梦数据库密码加密
							parent
							
								
									8ceb66034d
								
							
						
					
					
						commit
						6d9ed92fcb
					
				| 
						 | 
				
			
			@ -23,7 +23,7 @@
 | 
			
		|||
      </el-col>
 | 
			
		||||
      <el-col :span="12">
 | 
			
		||||
        <basic-form-item label="数据库密码:" prop="dm_password" validate="required">
 | 
			
		||||
          <el-input v-model="itemData.dm_password" placeholder="请输入SYSDBA & SYSAUDITOR密码"></el-input>
 | 
			
		||||
          <el-input v-model="itemData.dm_password" auto-complete="off" show-password placeholder="请输入SYSDBA & SYSAUDITOR密码"></el-input>
 | 
			
		||||
        </basic-form-item>
 | 
			
		||||
      </el-col>
 | 
			
		||||
    </el-row>
 | 
			
		||||
| 
						 | 
				
			
			@ -32,6 +32,7 @@
 | 
			
		|||
<script>
 | 
			
		||||
import node from '../../mixins/index'
 | 
			
		||||
import show from '../../mixins/show'
 | 
			
		||||
import { encrypt, decrypt } from 'utils/crypto'
 | 
			
		||||
 | 
			
		||||
export default {
 | 
			
		||||
  mixins: [node, show],
 | 
			
		||||
| 
						 | 
				
			
			@ -48,6 +49,30 @@ export default {
 | 
			
		|||
        }
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  created() {
 | 
			
		||||
    this.itemData.dm_password = decrypt(this.itemData.dm_password)
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    handlePostData() {
 | 
			
		||||
      const returnData = {
 | 
			
		||||
        dm_database: this.itemData.dm_database,
 | 
			
		||||
        dm_instance: this.itemData.dm_instance,
 | 
			
		||||
        install_dir: this.itemData.install_dir,
 | 
			
		||||
        dm_port: this.itemData.dm_port,
 | 
			
		||||
        dm_password: encrypt(this.itemData.dm_password)
 | 
			
		||||
      }
 | 
			
		||||
      return returnData
 | 
			
		||||
    },
 | 
			
		||||
    getPostData() {
 | 
			
		||||
      let data = false
 | 
			
		||||
      this.$refs.form.validate(valid => {
 | 
			
		||||
        if (valid) {
 | 
			
		||||
          data = this.handlePostData()
 | 
			
		||||
        }
 | 
			
		||||
      })
 | 
			
		||||
      return data
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
</script>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue