| | |
| | | </el-select> |
| | | |
| | | </el-form-item> |
| | | <!-- 坐标系 --> |
| | | <!-- 拉伸因子 --> |
| | | <el-form-item |
| | | v-show="insertLayer.showFactor" |
| | | :label="$t('dataManage.vmobj.labe17')" |
| | |
| | | style="width: 100%;" |
| | | ></el-input-number> |
| | | </el-form-item> |
| | | |
| | | <el-form-item :label="$t('dataManage.vmobj.labe19')"> |
| | | <el-select |
| | | size="small" |
| | | placeholder="请选择颜色表" |
| | | v-model="colorTableType" |
| | | style="width: 100%;" |
| | | > |
| | | <el-option |
| | | v-for="(item, i) in colorTableOptions" |
| | | :key="i" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | ></el-option> |
| | | |
| | | </el-select> |
| | | </el-form-item> |
| | | <!-- 颜色表 --> |
| | | <el-form-item |
| | | v-show="colorTableType != 2" |
| | | :label="$t('dataManage.vmobj.labe18')" |
| | | > |
| | | <el-select |
| | | v-model="renderType" |
| | | placeholder="请选择渲染类型" |
| | | size="small" |
| | | @change="changeSelection(renderType)" |
| | | ref="selectColor" |
| | | style="width: 100%;" |
| | | clearable |
| | | > |
| | | <el-option |
| | | v-for="(item, i) in renderTypeOptions" |
| | | :key="i" |
| | | :label="item.name" |
| | | :value="item.name" |
| | | > |
| | | <div |
| | | style=" |
| | | height: 30px; |
| | | width: 100%; |
| | | position: relative; |
| | | top: 50%; |
| | | left: 50%; |
| | | transform: translate(-50%, -50%); |
| | | " |
| | | :style="item.domCss" |
| | | ></div> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | |
| | | <!-- 坐标系 --> |
| | | <el-form-item :label="$t('dataManage.vmobj.labe16')"> |
| | | <el-select |
| | |
| | | publish_deletesSjServices, |
| | | publish_update, |
| | | publish_insertSjService, |
| | | publish_selectSjColorTables |
| | | } from '../../api/api.js' |
| | | import { conditions } from '../Archive/Archive'; |
| | | import { method_option, nodata_Option, server_option, system_Option, type_option } from './js/layerManage'; |
| | |
| | | serverOption: [], |
| | | enhanceOption: [], |
| | | epsgOption: [], |
| | | noDataOption: [] |
| | | noDataOption: [], |
| | | renderType: null, |
| | | renderTypeOptions: [], |
| | | colorTableType: null, |
| | | colorTableOptions: [ |
| | | { |
| | | value: 2, |
| | | label: "请选择颜色表", |
| | | }, |
| | | { |
| | | value: 0, |
| | | label: "普通颜色表", |
| | | }, |
| | | { |
| | | value: 1, |
| | | label: "直方图均衡", |
| | | }] |
| | | } |
| | | }, |
| | | methods: { |
| | |
| | | for (var i in this.multipleSelection) { |
| | | std.push(this.multipleSelection[i].id) |
| | | } |
| | | var color1 = null; |
| | | var color2 = null; |
| | | var level = null; |
| | | var val_data = []; |
| | | |
| | | for (var i in this.renderTypeOptions) { |
| | | if (this.renderTypeOptions[i].name == this.renderType.value) { |
| | | val_data.push(this.renderTypeOptions[i].content.levels); |
| | | } |
| | | } |
| | | if (val_data.length > 0) { |
| | | level = val_data[0]; |
| | | } |
| | | |
| | | if (this.colorTableType == 0) { |
| | | color1 = level; |
| | | } else if (this.colorTableType == 1) { |
| | | color2 = level; |
| | | } |
| | | var obj = { |
| | | colorTable: color1, // 普通颜色表,可不设 |
| | | gradientColorTable: color2, |
| | | dircode: this.formInline.dirid, |
| | | name: name, |
| | | ids: std, |
| | |
| | | } else { |
| | | this.insertLayer.showFactor = false; |
| | | } |
| | | this.colorTableType = 2; |
| | | this.renderType = null; |
| | | this.insertLayer.name = this.multipleSelection[0].name |
| | | this.insertDialogVisible = true; |
| | | |
| | | }, |
| | |
| | | return father.pid == 0 // 返回一级菜单 |
| | | }) |
| | | }, |
| | | async getColorJson() { |
| | | var dt = await publish_selectSjColorTables({ |
| | | pageIndex: 1, |
| | | pageSize: 100000, |
| | | }); |
| | | |
| | | if (!dt.result) return |
| | | this.renderTypeOptions = dt.result.item_list; |
| | | |
| | | this.renderTypeOptions.forEach((e) => { |
| | | let css = ""; |
| | | let css1 = ""; |
| | | e.content.levels.forEach((v) => { |
| | | if ("r_start" in v) { |
| | | css += `rgb(${v.r_start}, ${v.g_start}, ${v.b_start}),rgb(${v.r_end}, ${v.g_end}, ${v.b_end}),`; |
| | | } else if ("r" in v) { |
| | | css1 += `rgb(${v.r}, ${v.g}, ${v.b}),`; |
| | | } |
| | | }); |
| | | |
| | | let cssColor = `${css1}${css}`; |
| | | let cssStr = ""; |
| | | |
| | | if (cssColor.length == 19) { |
| | | cssStr = `background: ${cssColor.slice(0, -1)}`; |
| | | } else { |
| | | cssStr = `background-image:linear-gradient(to right, ${cssColor.slice( |
| | | 0, |
| | | -1 |
| | | )})`; |
| | | } |
| | | e.domCss = cssStr; |
| | | }); |
| | | }, |
| | | changeSelection(scope) { |
| | | // if (scope == "") { |
| | | // this.$refs.selectColor.$el.children[0].children[0].removeAttribute("style"); |
| | | // this.$refs.selectColor.$el.children[0].children[0].children[0].removeAttribute( |
| | | // "style" |
| | | // ); |
| | | // this.$refs.selectColor.$el.children[0].children[0].children[0].children[0].removeAttribute( |
| | | // "style" |
| | | // ); |
| | | // return; |
| | | // } |
| | | // for (let index in this.renderTypeOptions) { |
| | | // let obj = this.renderTypeOptions[index]; |
| | | // if (obj.name == scope) { |
| | | // this.$refs.selectColor.$el.children[0].children[0].setAttribute( |
| | | // "style", |
| | | // `background-image: linear-gradient(to right,${obj.domCss}); |
| | | // width: 100%; height: 100%; |
| | | // border: none; |
| | | // height: 33px;` |
| | | // ); |
| | | // this.$refs.selectColor.$el.children[0].children[0].children[0].setAttribute( |
| | | // "style", |
| | | // `display: flex; |
| | | // justify-content: flex-end; |
| | | // background:transparent;` |
| | | // ); |
| | | // this.$refs.selectColor.$el.children[0].children[0].children[0].children[0].setAttribute( |
| | | // "style", |
| | | // `display: none;` |
| | | // ); |
| | | // } |
| | | // } |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.active = 'first'; |
| | |
| | | this.serverOption = server_option; |
| | | this.epsgOption = system_Option; |
| | | this.noDataOption = nodata_Option; |
| | | this.enhanceOption = method_option |
| | | this.enhanceOption = method_option; |
| | | this.getColorJson() |
| | | this.setPageStart(); |
| | | this.setOptions(); |
| | | |