diff --git a/package.json b/package.json index f6dcfb44ba61dc4bee2dd2b72d619f272ff8641f..328b30ea0e63d3958519248287b17e6ef1e9eec8 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "@antv/g6": "^3.4.8", "@fortawesome/fontawesome-free": "^5.8.0", "ace-builds": "^1.4.11", + "axios": "^0.19.2", "babel-polyfill": "^6.26.0", "codemirror": "^5.45.0", "echarts": "^4.2.1", @@ -20,6 +21,7 @@ "js-yaml": "^3.13.1", "json2yaml": "^1.1.0", "material-design-icons-iconfont": "^4.0.5", + "qs": "^6.9.4", "string-format": "^2.0.0", "svg-sprite-loader": "^4.2.6", "vue": "^2.6.10", diff --git a/src/assets/css/index.css b/src/assets/css/index.css index 449dea62b0134ffacefd29a31078238d59544fcf..022de203bf3254b54eca77f0dcf31cada5e8d63c 100644 --- a/src/assets/css/index.css +++ b/src/assets/css/index.css @@ -471,6 +471,9 @@ width: 620px!important; .el-radio__input.is-checked .el-radio__inner::after { background-color: #e56600; } +.el-radio__inner:hover { + border-color: #e56600; +} /* 面包屑样式 */ .bread_crumb { margin: 20px; diff --git a/src/components/table-input.vue b/src/components/table-input.vue index 482758730dcf40adb46ab9b36e8c44e0711a51fc..9779b4ef70006b56780282f12c508b424db2eb5d 100644 --- a/src/components/table-input.vue +++ b/src/components/table-input.vue @@ -1,13 +1,44 @@ @@ -28,8 +59,7 @@ export default { default: "" }, name: { - type: String, - default: "" + type: String }, rowId: { type: Number, @@ -38,15 +68,29 @@ export default { couldNotEdit: { type: Boolean, default: false + }, + type: { + type: String, + default: "" + }, + typeHead: { + type: String, + default: "" } }, data: () => ({ - inputText: "" + inputText: "", + fileArray: [], + anotherData: { + directory: "file" + }, + inputTextUp: "" }), mounted() { this.inputText = this.item; }, methods: { + // input changeValue() { this.$emit("changeInputValue", { rowId: this.rowId, @@ -54,7 +98,31 @@ export default { inputValue: this.inputText, id: this.id }); - } + }, + // upload + beforeUpload(file) {}, + handleSuccess(response, file, fileList) { + if (response.success == 1) { + this.fileArray.push({ + url: response.data, + name: response.data + }); + this.inputTextUp = file.name; + this.$emit("changeUpFile", { + rowId: this.rowId, + header: this.header, + inputValue: this.inputTextUp, + id: this.id, + fileUrl: response.data + }); + } else { + this.$message.error("上传文件失败,请重试"); + } + }, + handleError(err, file, fileList) { + this.$message.error("上传文件失败,请重试"); + }, + handleRemove(file, fileList) {} } }; @@ -62,7 +130,9 @@ export default { .text-xs-center { height: 32px; } - +.table_upload { + height: 32px; +} .table_in_input { text-align: center; font-size: 14px; @@ -75,6 +145,22 @@ export default { border-radius: 4px; } .text-xs-center .el-input.is-disabled .el-input__inner { - color: #70747C; + color: #70747c; +} +.table_upload input { + width: 100%; + background-color: #f7f8f9; + border-radius: 4px; +} +.table_upload .el-input.is-disabled .el-input__inner { + color: #70747c; +} +.table_upload .el-button { + background-color: #0f2683 !important; + color: #ffffff !important; + border-radius: 0 4px 4px 0; +} +.table_upload .el-input-group__append ul { + display: none; } \ No newline at end of file diff --git a/src/components/table-select.vue b/src/components/table-select.vue index 3e92e50fa08ba85cf5dac7af2831aeedec9dac3b..04c5a32526e883ff9def77e107d3b6627d637834 100644 --- a/src/components/table-select.vue +++ b/src/components/table-select.vue @@ -11,10 +11,10 @@ > @@ -44,12 +44,10 @@ export default { default: "" }, name: { - type: String, - default: "" + type: String }, rowId: { - type: Number, - default: 0 + type: Number }, couldNotEdit: { type: Boolean, @@ -57,12 +55,16 @@ export default { } }, data: () => ({ - selectValue: "1" + selectValue: "0" }), mounted() { this.selectValue = this.item; - if (!this.selectValue || this.selectValue == "") { - this.selectValue = this.selectArr[0].value; + if (this.selectValue == null || !this.selectValue || this.selectValue == "") { + if (this.selectArr && this.selectArr.length != 0) { + this.selectValue = this.selectArr[0].value; + } else { + this.selectValue = ""; + } } }, methods: { diff --git a/src/components/table-um.vue b/src/components/table-um.vue index 3b592fbca72adb9290042b4ec43182c69b3ada74..438836ea481d29671ea7e9898bfce4346c887bdd 100644 --- a/src/components/table-um.vue +++ b/src/components/table-um.vue @@ -144,21 +144,24 @@ > - - + + {{ scope.row[item.prop] }} @@ -243,19 +249,19 @@